/* Track Page Styles - Theme Support (match FAQ header & breadcrumb) */
:root {
  --gold: #f2b705;
  --gold-dark: #c98a00;
  --amber: #f5d061;
  --charcoal: #1e1f24;
  --white: #ffffff;

  /* Dark mode (default) */
  --bg-primary: #0f1014;
  --bg-secondary: #1a1b23;
  --bg-tertiary: #16171f;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-input: rgba(255, 255, 255, 0.04);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.5);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-input: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] {
  /* Light mode */
  --bg-primary: #e8e9ea;
  --bg-secondary: #f0f1f2;
  --bg-tertiary: #d8d9da;
  --bg-card: rgba(240, 241, 242, 0.95);
  --bg-input: rgba(0, 0, 0, 0.03);
  --text-primary: #2a2b35;
  --text-secondary: rgba(42, 43, 53, 0.7);
  --text-tertiary: rgba(42, 43, 53, 0.5);
  --border-color: rgba(0, 0, 0, 0.06);
  --border-input: rgba(0, 0, 0, 0.08);
}

* {
  scrollbar-width: none;
}

/* Auth Header Styles (exact same as FAQ) */
.auth-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .auth-header {
  background: rgba(240, 241, 242, 0.9);
}

.auth-header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.auth-logo:hover {
  opacity: 0.8;
}

.auth-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(242, 183, 5, 0.3));
}

.auth-company-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background: var(--bg-input);
  border-color: var(--gold);
  transform: scale(1.05);
}

.theme-icon {
  position: absolute;
  width: 20px;
  height: 20px;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-icon-dark {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-icon-light {
  opacity: 0;
  transform: rotate(90deg) scale(0);
}

[data-theme="light"] .theme-icon-dark {
  opacity: 0;
  transform: rotate(-90deg) scale(0);
}

[data-theme="light"] .theme-icon-light {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.track-page {
  min-height: 100vh;
  padding-top: 80px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  padding-bottom: 4rem;
}

.track-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

.track-header {
  text-align: center;
  margin-bottom: 2.25rem;
  padding-top: 2rem;
}

.track-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.track-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
}

.track-ref-hint {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.track-ref-hint strong {
  font-family: "Space Grotesk", monospace;
  letter-spacing: 0.03em;
  color: var(--gold);
}

.track-section {
  background: var(--bg-card);
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  padding: 2rem 2rem 1.75rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.track-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.track-form .form-group {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.track-form .form-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem; /* more space below "Reference Number" label */
}

.track-form input[type="text"] {
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-input);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease;
  }

.track-form input[type="text"]::placeholder {
  color: var(--text-tertiary);
}

.track-form input[type="text"]:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(242, 183, 5, 0.3);
  }

  .track-submit-btn {
  padding: 0.9rem 1.5rem; /* default button padding */
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, var(--gold) 0%, var(--amber) 100%);
  color: var(--charcoal);
  box-shadow: 0 8px 18px rgba(242, 183, 5, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.track-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(242, 183, 5, 0.35);
  background: linear-gradient(135deg, var(--amber) 0%, var(--gold) 100%);
}

.track-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Variant to match input vertical padding only where needed */
.track-submit-btn-equal {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.track-status-message {
  margin-bottom: 1.5rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.track-result-card {
  margin-top: 0.5rem;
  padding: 1.75rem 1.5rem 1.5rem;
  border-radius: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

/* Skeleton Loader */
.track-result-skeleton {
  margin-top: 0.75rem;
}

.track-result-skeleton .track-result-card {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.15);
}

.skeleton-line {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.16),
    rgba(255, 255, 255, 0.06)
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.skeleton-line-short {
  width: 40%;
}

.skeleton-label {
  width: 60%;
  margin-bottom: 0.4rem;
}

.skeleton-badge {
  width: 90px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.08)
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
  }

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
}
  100% {
    background-position: -200% 0;
  }
}

.track-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.track-result-label {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 0.2rem;
}

.track-result-ref {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.track-status-badge {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  background: rgba(0, 0, 0, 0.2);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.track-status-pending {
  background: rgba(245, 208, 97, 0.15);
  border-color: rgba(245, 208, 97, 0.6);
  color: #f5d061;
}

.track-status-in-progress,
.track-status-under-review {
  background: rgba(80, 180, 255, 0.15);
  border-color: rgba(80, 180, 255, 0.6);
  color: #7ec3ff;
}

.track-status-approved {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.6);
  color: #4ade80;
}

.track-status-rejected,
.track-status-cancelled {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.7);
  color: #fca5a5;
}

.track-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.track-result-value {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.track-result-remarks {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

.track-help-text {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.track-help-text a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
}

.track-help-text a:hover {
  text-decoration: underline;
}

/* Empty State */
.track-empty-state {
  margin-top: 1.25rem;
  padding: 1.75rem 1.5rem;
  border-radius: 1rem;
  border: 1px dashed var(--border-color);
  background: var(--bg-card);
  text-align: center;
}

.track-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(242, 183, 5, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}

.track-empty-icon svg {
  width: 30px;
  height: 30px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.track-empty-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.track-empty-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 360px;
  margin: 0 auto;
}

/* Breadcrumb Navigation (exact same as FAQ) */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.breadcrumb-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

.breadcrumb-link:hover {
  color: var(--gold);
}

.breadcrumb-separator {
  color: var(--text-tertiary);
  margin: 0 0.25rem;
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

[data-theme="light"] .breadcrumb-nav {
  border-bottom-color: var(--border-color);
}

[data-theme="light"] .breadcrumb-link {
  color: var(--text-secondary);
}

[data-theme="light"] .breadcrumb-link:hover {
  color: var(--gold);
}

[data-theme="light"] .breadcrumb-current {
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .track-container {
    padding: 0 1.5rem;
  }

  .track-section {
    padding: 1.5rem;
  }

  .track-header {
    padding-top: 1.5rem;
  }

  .track-title {
    font-size: 2.25rem; /* match FAQ title size on tablet/mobile */
  }

  .track-result-card {
    padding: 1.15rem 1.15rem 1rem;
    margin-top: 0.6rem;
  }

  .track-result-header {
    flex-direction: column; /* Reference number on top, badge below */
    align-items: center; /* center both reference and badge */
    gap: 0.35rem;
    margin-bottom: 0.9rem;
  }

  .track-result-ref {
    font-size: 1rem;
  }

  .track-status-badge {
    align-self: center;
    font-size: 0.7rem;
    padding: 0.35rem 0.8rem;
    margin-left: 0; /* no push to the right on mobile */
    white-space: nowrap; /* prevent wrapping of badge text */
  }

  .track-result-grid {
    grid-template-columns: repeat(
      2,
      minmax(0, 1fr)
    ); /* 2 items per row on mobile */
    gap: 0.75rem 1rem; /* row gap, column gap */
    margin-bottom: 0.95rem;
  }

  .track-result-label {
    font-size: 0.75rem;
  }

  .track-result-value {
  font-size: 0.9rem;
  }

  .track-help-text {
    font-size: 0.8rem;
    margin-top: 0.9rem;
    text-align: center; /* center help text on mobile */
  }

  .track-form {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 0.9rem; /* slightly larger gap between input, button, and hint on mobile */
    column-gap: 0;
    align-items: stretch;
  }

  .track-form .form-group {
    margin-bottom: 0;
  }

  .track-form .form-group input[type="text"] {
    margin-bottom: 0;
    min-height: 44px; /* touch-friendly height on mobile */
    font-size: 0.95rem;
  }

  .track-submit-btn {
    width: 100%;
    justify-content: center;
    margin-top: 0.9rem; /* add top margin for button on mobile */
    display: block;
  }

  .track-ref-hint {
    text-align: center; /* center example text on mobile */
    margin-top: 1.1rem; /* extra space between button and example text on mobile */
  }
}

@media (max-width: 480px) {
  .track-container {
    padding: 0 1rem;
  }

  .track-title {
    font-size: 1.75rem; /* match FAQ mobile title size */
  }

  .track-section {
    padding: 1.25rem;
  }

  .track-result-card {
    padding: 1.1rem 1rem 1rem;
  }

  .track-subtitle {
    font-size: 0.9rem; /* match FAQ mobile subtitle size */
    margin-top: 1rem;
  }
}
