:root {
  --blue-dark: #073b78;
  --blue-primary: #0b5cab;
  --blue-hover: #084986;
  --blue-light: #eaf4ff;

  --yellow-primary: #f4c430;
  --yellow-light: #fff8d6;

  --white: #ffffff;
  --page-background: #f4f7fb;
  --border: #cbd5e1;

  --error-dark: #991b1b;
  --error-light: #fef2f2;
  --error-border: #fecaca;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--page-background);
  color: var(--text-primary);
}

.container {
  width: min(900px, calc(100% - 30px));
  max-width: 900px;
  margin: 30px auto;
}

.tracking-header,
.tracking-form,
.request-result {
  padding: 26px;
  background-color: var(--white);
  box-shadow: 0 5px 18px rgba(7, 59, 120, 0.1);
}

.tracking-header {
  border-top: 7px solid var(--yellow-primary);
  border-radius: 12px 12px 0 0;
  text-align: center;
}

.tracking-header h1 {
  margin: 0 0 10px;
  color: var(--blue-dark);
}

.tracking-header p {
  margin: 0;
  color: var(--text-secondary);
}

.tracking-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: end;
  border-top: 1px solid var(--border);
  border-radius: 0 0 12px 12px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--blue-dark);
  font-weight: bold;
}

input {
  width: 100%;
  min-height: 44px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background-color: var(--white);
  color: var(--text-primary);
  font: inherit;
}

input:hover {
  border-color: var(--blue-primary);
}

input:focus {
  border-color: var(--blue-primary);
  outline: 3px solid rgba(244, 196, 48, 0.45);
}

button {
  min-height: 44px;
  padding: 11px 22px;
  border: 2px solid var(--blue-primary);
  border-radius: 7px;
  background-color: var(--blue-primary);
  color: var(--white);
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  border-color: var(--blue-hover);
  background-color: var(--blue-hover);
}

button:focus {
  outline: 3px solid rgba(244, 196, 48, 0.65);
  outline-offset: 2px;
}

.success-message {
    margin-bottom: 20px;
    padding: 14px 16px;
    color: #166534;
    background-color: #ecfdf3;
    border: 1px solid #86efac;
    border-left: 4px solid #16a34a;
    border-radius: 8px;
}

.error-message {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--error-border);
  border-radius: 8px;
  background-color: var(--error-light);
  color: var(--error-dark);
}

.my-requests {
  margin-top: 24px;
  padding: 26px;
  background-color: var(--white);
  border-top: 7px solid var(--yellow-primary);
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(7, 59, 120, 0.1);
}

.my-requests-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.my-requests-heading h2 {
  margin: 4px 0 0;
  color: var(--blue-dark);
}

.request-count {
  padding: 6px 11px;
  border-radius: 999px;
  background-color: var(--blue-light);
  color: var(--blue-dark);
  font-weight: bold;
}

.my-request-list {
  display: grid;
  gap: 12px;
}

.my-request-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 9px;
}

.my-request-main,
.my-request-meta {
  display: grid;
  gap: 5px;
}

.my-request-number {
  color: var(--blue-dark);
  overflow-wrap: anywhere;
}

.my-request-certificate,
.my-request-meta > span:last-child {
  color: var(--text-secondary);
  font-size: 14px;
}

.view-request-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 18px;
  border: 2px solid var(--blue-primary);
  border-radius: 7px;
  color: var(--blue-primary);
  font-weight: bold;
  text-decoration: none;
}

.view-request-link:hover {
  color: var(--white);
  background-color: var(--blue-primary);
}

.my-request-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.remove-request-form {
  margin: 0;
}

.remove-request-button {
  min-height: 42px;
  padding: 9px 18px;
  border: 2px solid #b91c1c;
  border-radius: 7px;
  color: #b91c1c;
  background-color: var(--white);
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

.remove-request-button:hover {
  color: var(--white);
  background-color: #b91c1c;
}

.remove-request-button:disabled {
  color: #64748b;
  background-color: #e2e8f0;
  border-color: #cbd5e1;
  cursor: not-allowed;
}

.request-result {
  margin-top: 24px;
  border-top: 7px solid var(--yellow-primary);
  border-radius: 12px;
}

.result-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.result-heading h2 {
  margin: 5px 0 0;
  color: var(--blue-dark);
  overflow-wrap: anywhere;
}

.section-label,
.information-label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-secondary);
  font-size: 14px;
}

.status-badge {
  display: inline-block;
  padding: 7px 12px;
  border: 2px solid var(--yellow-primary);
  border-radius: 999px;
  background-color: var(--yellow-light);
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
}

.status-released {
  border-color: var(--blue-primary);
  background-color: var(--blue-light);
}

.status-rejected,
.status-verification-failed,
.status-cancelled {
  border-color: var(--error-border);
  background-color: var(--error-light);
  color: var(--error-dark);
}

.status-release-on-hold {
    border-color: #e7bd4c;
    background-color: #fff9df;
    color: #6f5000;
}

.request-information {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 24px 0;
}

.information-item {
  padding: 15px;
  border-left: 4px solid var(--yellow-primary);
  background-color: var(--blue-light);
}

.timeline-section {
  padding-top: 5px;
}

.timeline-section h2 {
  color: var(--blue-dark);
}

.timeline {
  position: relative;
  margin-left: 9px;
  padding-left: 28px;
  border-left: 3px solid var(--blue-primary);
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  top: 2px;
  left: -39px;
  width: 19px;
  height: 19px;
  border: 4px solid var(--yellow-primary);
  border-radius: 50%;
  background-color: var(--white);
}

.timeline-content {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: var(--white);
}

.timeline-title {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--blue-dark);
}

.timeline-title time {
  color: var(--text-secondary);
  font-size: 13px;
}

.timeline-content p {
  margin-bottom: 0;
  color: var(--text-secondary);
}

.empty-message {
  color: var(--text-secondary);
}

@media (max-width: 750px) {
  .container {
    width: calc(100% - 24px);
    margin: 12px auto;
  }

  .tracking-header,
  .tracking-form,
  .request-result {
    padding: 20px 16px;
  }

  .tracking-header {
    border-top-width: 5px;
  }

  .tracking-form {
    grid-template-columns: 1fr;
  }

  input {
    font-size: 16px;
  }

  button {
    width: 100%;
  }

  .result-heading {
    flex-direction: column;
  }

  .request-information {
    grid-template-columns: 1fr;
  }

  .timeline-title {
    flex-direction: column;
    gap: 5px;
  }

  .my-requests {
    padding: 20px 16px;
  }

  .my-requests-heading {
    align-items: flex-start;
  }

  .my-request-card {
    grid-template-columns: 1fr;
  }

  .view-request-link {
    width: 100%;
  }
}
