/* ═══════════════════════════════════════════════════════════════
   شحن جو — Premium visual system
   Luxury maritime identity over the existing component API.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --navy-950: #041018;
  --navy-900: #0a334c;
  --navy-800: #114f73;
  --navy-700: #1a6a96;
  --gold-500: #c9a227;
  --gold-400: #e3c15a;
  --gold-100: #fbf4df;
  --bg: #f3efe6;
  --bg-soft: #ebe6db;
  --card: #fffcf7;
  --text: #12202c;
  --muted: #5d6e7c;
  --border: #e4ddd0;
  --border-strong: #cfc5b4;
  --success: #147a4d;
  --success-bg: #e6f6ee;
  --warning: #a86b10;
  --warning-bg: #fff4de;
  --danger: #c43c3c;
  --danger-bg: #fdeeee;
  --info: #1a7a9c;
  --info-bg: #e6f5fa;
  --sidebar: 276px;
  --sidebar-collapsed: 80px;
  --topbar: 70px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 32px rgba(10, 40, 58, 0.07);
  --shadow-lg: 0 28px 64px rgba(4, 16, 24, 0.16);
  --shadow-gold: 0 10px 28px rgba(201, 162, 39, 0.28);
  --font: "IBM Plex Sans Arabic", "Cairo", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Cairo", "IBM Plex Sans Arabic", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ring: 0 0 0 4px rgba(201, 162, 39, 0.22);
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: rgba(201, 162, 39, 0.32);
  color: var(--navy-950);
}

body {
  font-family: var(--font);
  letter-spacing: 0.01em;
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, rgba(201, 162, 39, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(17, 79, 115, 0.06), transparent 50%),
    var(--bg);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-weight: 800;
}

a {
  transition: color 0.18s var(--ease);
}

/* ── Buttons ── */
.btn {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  letter-spacing: 0.01em;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s ease, border-color 0.2s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(180deg, #16587c 0%, var(--navy-900) 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(10, 51, 76, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #1a6a96 0%, #0e4462 100%);
}

.btn-gold {
  background: linear-gradient(180deg, #f0d078 0%, var(--gold-500) 100%);
  color: var(--navy-950);
  box-shadow: var(--shadow-gold);
  font-weight: 800;
}

.btn-gold:hover {
  background: linear-gradient(180deg, #f6dc94 0%, #d4ad3a 100%);
}

.btn-outline {
  background: rgba(255, 252, 247, 0.7);
  border: 1px solid var(--border-strong);
  color: var(--navy-900);
}

.btn-outline:hover {
  background: #fff;
  border-color: var(--gold-500);
}

.btn-danger {
  box-shadow: 0 8px 18px rgba(196, 60, 60, 0.22);
}

.file-field input[type="file"] {
  padding: 12px 14px;
  background: var(--bg-soft);
  cursor: pointer;
}

.file-field input[type="file"]::file-selector-button {
  margin-inline-end: 12px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--navy-900);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn-danger:hover {
  filter: brightness(1.06);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.table-actions form {
  display: inline;
  margin: 0;
}

td.col-actions,
th.col-actions {
  width: 1%;
  white-space: nowrap;
}

.btn-ghost-light {
  backdrop-filter: blur(8px);
}

/* ── Forms ── */
.field label {
  color: var(--navy-900);
  font-family: var(--font-display);
  letter-spacing: 0;
}

.field input,
.field select,
.field textarea,
.search,
.toolbar select,
.toolbar input {
  border-radius: 14px;
  border-color: var(--border);
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search:focus,
.global-search-input:focus,
.toolbar select:focus,
.toolbar input:focus {
  border-color: var(--gold-500);
  box-shadow: var(--ring);
}

/* ── Cards ── */
.card,
.panel {
  background: var(--card);
  border: 1px solid rgba(228, 221, 208, 0.9);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.card {
  position: relative;
}

/* ── Public header ── */
.public-header {
  background: rgba(4, 16, 24, 0.88);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(243, 208, 120, 0.12);
}

@media (min-width: 861px) {
  body:has(.landing-hero) .public-header,
  body:has(.public-page-hero) .public-header,
  body:has(.track-lookup-hero) .public-header {
    background: linear-gradient(180deg, rgba(4, 16, 24, 0.78), rgba(4, 16, 24, 0.12));
    backdrop-filter: blur(16px);
  }
}

.public-nav {
  min-height: 80px;
}

.brand {
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.brand-mark {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-mark small {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold-400);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  gap: 4px;
}

.nav-links a:not(.btn) {
  position: relative;
  color: #d5e4ef;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.94rem;
}

.nav-links a:not(.btn):hover,
.nav-links a:not(.btn).is-current {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-links a:not(.btn).is-current::after {
  content: "";
  position: absolute;
  inset-inline: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold-400);
}

.nav-links .btn-gold {
  margin-inline-start: 6px;
  padding-inline: 16px;
}

/* ── Public footer ── */
.public-footer {
  margin-top: 0;
  padding: 56px 0 28px;
  background:
    radial-gradient(ellipse 50% 80% at 90% 0%, rgba(201, 162, 39, 0.12), transparent 50%),
    linear-gradient(180deg, #071621, var(--navy-950));
  color: #c5d6e4;
  border-top: 1px solid rgba(243, 208, 120, 0.12);
}

.public-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.public-footer-brand-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.public-footer-brand-block .brand {
  font-size: 1.2rem;
}

.public-footer-brand-block p {
  margin: 0;
  max-width: 36ch;
  color: #9eb4c4;
  line-height: 1.7;
}

.public-footer h4 {
  color: var(--gold-400);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.public-footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.public-footer-col a {
  color: #c5d6e4;
  font-weight: 600;
}

.public-footer-col a:hover {
  color: var(--gold-400);
}

.public-footer-col .tel-ltr,
.contact-info-row .tel-ltr {
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}

.public-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
}

.public-footer-copy {
  color: #7e96a8;
  font-size: 0.88rem;
}

.public-footer-credit {
  margin: 0;
  color: #9eb4c4;
  font-size: 0.88rem;
  font-weight: 600;
}

.public-footer-credit-name {
  color: #e3c15a;
  font-weight: 800;
}

.public-footer-credit a {
  color: #d7e6f2;
  font-weight: 700;
}

.public-footer-credit a:hover {
  color: var(--gold-400);
}

.public-footer-credit-sep {
  opacity: 0.55;
  margin-inline: 4px;
}

.public-footer-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #d7e6f2;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
}

/* ── Landing hero ── */
.public-page-hero,
.track-lookup-hero {
  background:
    radial-gradient(ellipse 70% 55% at 80% -10%, rgba(243, 208, 120, 0.22), transparent 52%),
    radial-gradient(ellipse 50% 45% at 8% 90%, rgba(26, 106, 150, 0.35), transparent 50%),
    linear-gradient(165deg, #041018 0%, #0a334c 48%, #114f73 100%);
}

.landing-hero {
  padding-top: clamp(108px, 13vw, 140px);
  background-color: #041018;
  background-image: url("../img/home/hero-sea.png");
  background-size: cover;
  background-position: center;
}

.landing-reveal,
.landing-reveal.is-visible {
  opacity: 1 !important;
  transform: none !important;
}

.landing-title {
  font-size: clamp(2.15rem, 5vw, 3.65rem);
  line-height: 1.18;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.landing-badge {
  background: rgba(243, 208, 120, 0.12);
  border-color: rgba(243, 208, 120, 0.4);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.08);
}

.landing-track-panel,
.track-lookup-panel {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.landing-step-card,
.landing-feature,
.service-card,
.about-value-card,
.journey-step-card,
.track-lookup-help-card,
.services-compare-card {
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.25s ease;
}

.landing-step-card:hover,
.landing-feature:hover,
.about-value-card:hover,
.service-card:hover,
.journey-step-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201, 162, 39, 0.35);
}

.landing-stats {
  background:
    linear-gradient(180deg, #fffcf7, #f7f2e8);
}

.landing-stat-value {
  font-family: var(--font-display);
  color: var(--navy-900);
}

.landing-cta-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(243, 208, 120, 0.18);
}

.landing-cta-card::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(243, 208, 120, 0.14);
  filter: blur(20px);
  inset-inline-end: -80px;
  top: -90px;
  pointer-events: none;
}

/* ── New home sections ── */
.home-modes {
  background: var(--bg-soft);
}

.home-modes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.home-mode-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: clamp(26px, 3.5vw, 36px);
  min-height: 280px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

.home-mode-sea {
  background:
    radial-gradient(circle at 90% 10%, rgba(243, 208, 120, 0.18), transparent 40%),
    linear-gradient(160deg, #0a334c, #062433);
}

.home-mode-air {
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.12), transparent 40%),
    linear-gradient(160deg, #1a6a96, #0a334c);
}

.home-mode-fcl {
  background:
    radial-gradient(circle at 80% 0%, rgba(255, 236, 180, 0.28), transparent 42%),
    linear-gradient(160deg, #8a6a14, #0a334c 58%, #062433);
  box-shadow: 0 24px 50px rgba(201, 162, 39, 0.22);
  border: 1px solid rgba(243, 208, 120, 0.35);
}

.home-mode-tag-gold {
  background: var(--gold-500);
  color: var(--navy-950);
}

.home-mode-points {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.home-mode-points li {
  position: relative;
  padding-inline-start: 18px;
  color: #f4ead0;
  font-size: 0.92rem;
  font-weight: 600;
}

.home-mode-points li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-400);
}

.home-mode-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 18px;
  color: var(--gold-400);
}

.home-mode-icon svg {
  width: 30px;
  height: 30px;
}

.home-mode-card h3 {
  color: #fff;
  font-size: 1.45rem;
  margin-bottom: 8px;
}

.home-mode-card p {
  margin: 0;
  color: #cfe0ec;
  max-width: 36ch;
}

.home-mode-tag {
  position: absolute;
  top: 22px;
  inset-inline-end: 22px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(243, 208, 120, 0.18);
  color: var(--gold-400);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.home-corridor {
  overflow: hidden;
}

.home-corridor-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: corridor-marquee 28s linear infinite;
}

.home-corridor-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-weight: 700;
  color: var(--navy-900);
  white-space: nowrap;
}

.home-corridor-chip span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.18);
}

@keyframes corridor-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

html[dir="ltr"] .home-corridor-track {
  animation-direction: reverse;
}

.home-quote {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(28px, 4vw, 44px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(201, 162, 39, 0.12), transparent 50%),
    var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.home-quote blockquote {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 700;
  line-height: 1.55;
  color: var(--navy-950);
}

.home-quote cite {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.home-quote-mark {
  font-size: 3rem;
  line-height: 1;
  color: var(--gold-500);
  font-family: Georgia, serif;
  display: block;
  margin-bottom: 8px;
}

/* ── Auth / login ── */
.login-body {
  background: #041018;
}

.login-page-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  padding: 0;
}

.login-showcase {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: transparent;
}

.login-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  pointer-events: none;
}

.login-showcase::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(4, 16, 24, 0.12) 0%, rgba(4, 16, 24, 0.38) 100%),
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(243, 208, 120, 0.1), transparent 55%);
  pointer-events: none;
}

.auth-bg-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-bg-slides--solid {
  background:
    radial-gradient(ellipse 70% 50% at 90% -10%, rgba(201, 162, 39, 0.22), transparent 52%),
    linear-gradient(165deg, #041018 0%, #0a334c 48%, #114f73 100%);
}

.auth-bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.06);
  animation: auth-bg-fade 28s infinite;
}

.auth-bg-slide:nth-child(1) {
  opacity: 1;
  animation-name: auth-bg-fade-first;
  animation-delay: 0s;
}

.auth-bg-slide:nth-child(2) { animation-delay: 7s; }
.auth-bg-slide:nth-child(3) { animation-delay: 14s; }
.auth-bg-slide:nth-child(4) { animation-delay: 21s; }

@keyframes auth-bg-fade {
  0% { opacity: 0; transform: scale(1.06); }
  4% { opacity: 1; }
  21% { opacity: 1; transform: scale(1); }
  25% { opacity: 0; transform: scale(1); }
  100% { opacity: 0; }
}

@keyframes auth-bg-fade-first {
  0% { opacity: 1; transform: scale(1.06); }
  21% { opacity: 1; transform: scale(1); }
  25% { opacity: 0; transform: scale(1); }
  96% { opacity: 0; }
  100% { opacity: 1; transform: scale(1.06); }
}

.auth-bg-slides--page {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
}

.auth-bg-slides--page::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, rgba(4, 16, 24, 0.28), rgba(10, 51, 76, 0.4));
}

.login-page-split,
.auth-shell {
  position: relative;
  z-index: 1;
}

.login-showcase-inner {
  position: relative;
  z-index: 2;
}

.login-showcase h2 {
  color: #fff;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  max-width: 16ch;
  margin: 36px 0 14px;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.login-showcase p {
  color: #c5d6e4;
  max-width: 38ch;
  margin: 0;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.login-showcase-stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.login-showcase-stat {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-showcase-stat strong {
  display: block;
  color: var(--gold-400);
  font-size: 1.15rem;
  margin-bottom: 2px;
}

.login-showcase-stat span {
  font-size: 0.8rem;
  color: #9eb4c4;
}

.login-form-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 20px 20px 40px;
  padding-top: max(20px, env(safe-area-inset-top));
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  background: transparent;
}

.login-panel {
  width: min(360px, 100%);
  margin-block: auto;
  position: relative;
  z-index: 1;
  border-radius: 20px;
  padding: 22px 20px 18px;
  background: rgba(255, 252, 247, 0.58);
  backdrop-filter: blur(14px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 22px 48px rgba(4, 16, 24, 0.22);
}

.login-panel .field {
  margin-bottom: 10px;
}

.login-panel .field input {
  padding: 10px 12px;
  font-size: 0.92rem;
}

.login-panel .btn-lg {
  padding: 10px 16px;
  font-size: 0.95rem;
}

.login-brand img,
.sidebar-brand img,
.auth-aside .brand img {
  border-radius: 14px;
}

.login-roles li {
  background: var(--gold-100);
  color: #8a5a10;
}

.login-panel-choose {
  width: min(560px, 100%);
}

.login-program-badge {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #8a5a10;
  background: var(--gold-100);
}

.login-program-grid {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.login-program-grid-pair {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .login-program-grid-pair {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

.login-program-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #0a334c;
  background: rgba(10, 51, 76, 0.08);
  margin-bottom: 4px;
}

.login-program-icon svg {
  width: 22px;
  height: 22px;
}

.login-program-icon-gold {
  color: #8a5a10;
  background: rgba(201, 162, 39, 0.18);
}

.register-approval-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #5b4a18;
  background: rgba(243, 208, 120, 0.22);
  border: 1px solid rgba(201, 162, 39, 0.28);
}

.pending-accounts-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, rgba(243, 208, 120, 0.28), rgba(255, 252, 247, 0.9));
  border: 1px solid rgba(201, 162, 39, 0.35);
  box-shadow: 0 10px 24px rgba(4, 16, 24, 0.06);
}

.pending-accounts-banner strong {
  font-size: 0.95rem;
}

.pending-accounts-banner span {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: #8a5a10;
}

.login-program-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 16px 14px;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(10, 51, 76, 0.1);
  box-shadow: 0 10px 24px rgba(4, 16, 24, 0.08);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-program-card:hover {
  transform: translateY(-2px);
  border-color: rgba(201, 162, 39, 0.55);
  box-shadow: 0 14px 28px rgba(4, 16, 24, 0.12);
}

.login-program-card-gold {
  background: linear-gradient(180deg, rgba(243, 208, 120, 0.22), rgba(255, 255, 255, 0.7));
}

.login-program-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #8a5a10;
  background: var(--gold-100);
  padding: 2px 8px;
  border-radius: 999px;
}

.login-program-card strong {
  font-size: 1.15rem;
}

.login-program-card span {
  font-size: 0.86rem;
  color: #5b6f7d;
  line-height: 1.55;
}

.login-program-card em {
  margin-top: auto;
  padding-top: 8px;
  font-style: normal;
  font-weight: 700;
  color: #8a5a10;
}

.login-switch-program {
  margin: 12px 0 0;
  text-align: center;
}

.login-switch-program a {
  font-size: 0.86rem;
  color: #5b6f7d;
}

.auth-shell {
  min-height: 100vh;
}

.auth-aside {
  position: relative;
  overflow: hidden;
  background: #041018;
}

.auth-aside > :not(.auth-bg-slides) {
  position: relative;
  z-index: 2;
}

.auth-aside::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(4, 16, 24, 0.4) 0%, rgba(4, 16, 24, 0.78) 100%),
    radial-gradient(circle at 20% 20%, rgba(243, 208, 120, 0.16), transparent 32%);
  pointer-events: none;
}

.auth-aside-points {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.auth-aside-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d7e6f2;
  font-weight: 600;
}

.auth-aside-points li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-400);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.18);
}

.auth-card {
  border: 1px solid var(--border);
}

.auth-card-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy-950);
  font-weight: 800;
  font-family: var(--font-display);
  margin-bottom: 22px;
}

.auth-card-brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

/* ── App shell ── */
.app-body {
  background:
    radial-gradient(circle at 100% 0, rgba(201, 162, 39, 0.1), transparent 28%),
    radial-gradient(circle at 0% 100%, rgba(17, 79, 115, 0.06), transparent 32%),
    var(--bg);
}

.sidebar {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(243, 208, 120, 0.14), transparent 46%),
    linear-gradient(180deg, #041018 0%, #0a2c42 100%);
  border-inline-end: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 12px max(20px, env(safe-area-inset-bottom));
  contain: layout;
}

@media (max-width: 860px) {
  .sidebar {
    contain: none;
  }
}

body.sidebar-collapsed .sidebar {
  contain: none;
}

.sidebar-brand {
  padding: 10px 10px 18px;
}

.sidebar-brand img {
  width: 42px;
  height: 42px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.sidebar-brand strong {
  font-family: var(--font-display);
  font-size: 1.12rem;
}

.side-nav a {
  border-radius: 12px;
  transition: background 0.16s ease, box-shadow 0.16s ease;
  transform: none;
}

.side-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: none;
}

.side-nav a.active {
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.22), rgba(255, 255, 255, 0.06));
  color: #fff;
  box-shadow: inset 3px 0 0 var(--gold-400);
}

html[dir="rtl"] .side-nav a.active {
  box-shadow: inset -3px 0 0 var(--gold-400);
}

.side-group {
  color: #8eabc0;
  letter-spacing: 0.02em;
  text-transform: none;
}

.topbar {
  background: rgba(243, 239, 230, 0.78);
  backdrop-filter: blur(18px) saturate(1.15);
  border-bottom: 1px solid rgba(228, 221, 208, 0.9);
}

.global-search-input {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.user-chip {
  background: #fff;
  box-shadow: 0 4px 14px rgba(10, 40, 58, 0.06);
}

.user-avatar {
  background: linear-gradient(180deg, #1a6a96, var(--navy-900));
  font-weight: 800;
}

#top-title {
  font-family: var(--font-display);
  font-weight: 800;
}

.main {
  padding: 26px 26px 40px;
}

.page-head {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.page-head h1 {
  font-size: clamp(1.45rem, 2vw, 1.85rem);
}

.page-head .muted {
  margin: 0;
}

/* ── Stats ── */
.stat-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 18px 16px;
  padding-inline-start: 20px;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--gold-400), var(--navy-700));
  opacity: 0.85;
}

.stat-card-link {
  display: flex;
  color: inherit;
  text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.stat-card-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201, 162, 39, 0.35);
}

.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--gold-100);
  color: var(--navy-900);
}

.stat-card-icon svg {
  width: 22px;
  height: 22px;
}

.stat-card-body {
  min-width: 0;
  flex: 1;
}

.stat-card .label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}

.stat-card .value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--navy-950);
  line-height: 1.15;
}

.stat-tone-gold::before { background: var(--gold-500); }
.stat-tone-sea::before { background: #1a6a96; }
.stat-tone-air::before { background: var(--info); }
.stat-tone-danger::before { background: var(--danger); }
.stat-tone-success::before { background: var(--success); }

.stat-tone-gold .stat-card-icon { background: var(--gold-100); }
.stat-tone-sea .stat-card-icon { background: #e6f1f7; color: var(--navy-800); }
.stat-tone-air .stat-card-icon { background: var(--info-bg); color: var(--info); }
.stat-tone-danger .stat-card-icon { background: var(--danger-bg); color: var(--danger); }
.stat-tone-success .stat-card-icon { background: var(--success-bg); color: var(--success); }

.dash-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
  padding: 22px 24px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(201, 162, 39, 0.16), transparent 42%),
    linear-gradient(135deg, #0a334c, #062433);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.dash-hero .page-head {
  margin: 0;
  padding: 0;
  border: 0;
  flex: 1;
}

.dash-hero h1 {
  color: #fff;
}

.dash-hero .muted {
  color: #b8cdd9;
}

.dash-hero .btn-outline {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

.dash-hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.14);
}

.dash-section-title {
  margin: 28px 0 14px;
  font-size: 1.05rem;
  color: var(--navy-800);
}

/* ── Tables ── */
.table-wrap {
  border-radius: 14px;
}

table.data thead th {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #f7f2e8;
  color: #6a7c8a;
  position: sticky;
  top: 0;
}

table.data tbody tr {
  transition: background 0.15s ease;
}

table.data tbody tr:hover {
  background: rgba(201, 162, 39, 0.06);
}

table.data td a strong {
  color: var(--navy-900);
}

.toolbar {
  padding: 4px 0 12px;
  align-items: center;
}

.toolbar .search,
.toolbar select {
  min-height: 44px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--border);
}

.pill {
  letter-spacing: 0.01em;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.empty {
  padding: 56px 20px;
}

.empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--gold-100);
  color: var(--navy-900);
}

.empty-icon svg {
  width: 28px;
  height: 28px;
}

.empty p {
  margin: 0;
}

.card > .toolbar {
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.home-corridor .container {
  overflow: hidden;
}

/* ── Toast / modal ── */
.toast {
  border-radius: 14px;
  backdrop-filter: blur(10px);
  animation: toast-in 0.35s var(--ease);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.modal {
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.modal-backdrop {
  backdrop-filter: blur(6px);
  background: rgba(4, 16, 24, 0.52);
}

/* ── 404 ── */
.error-page {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 120px 16px 72px;
}

.error-page-card {
  max-width: 520px;
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 12vw, 7rem);
  line-height: 0.9;
  background: linear-gradient(180deg, var(--gold-400), var(--navy-800));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 900;
  margin-bottom: 12px;
}

/* ── Contact ── */
.contact-info-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--gold-100);
  color: var(--navy-900);
  font-size: 0;
}

.contact-info-icon svg {
  width: 22px;
  height: 22px;
}

.contact-form {
  padding: 28px;
}

.contact-info-card,
.contact-app-placeholder {
  border-radius: 20px;
}

/* ── Address / profile ── */
.address-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(201, 162, 39, 0.16), transparent 46%),
    linear-gradient(180deg, #fff, #f8f1e3);
}

.profile-hero {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ── Site float ── */
.site-float-wa {
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.35);
}

/* ── Scrollbar ── */
.side-nav::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.side-nav::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 99px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(10, 51, 76, 0.18);
}

#dash-overview.stats-grid,
#dash-volumes.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.portal-welcome {
  background:
    radial-gradient(circle at 100% 0%, rgba(201, 162, 39, 0.16), transparent 42%),
    linear-gradient(135deg, #0a334c, #062433);
  color: #fff;
  border: 0;
  box-shadow: var(--shadow-lg);
}

.portal-welcome h2 {
  color: #fff;
}

.portal-welcome .muted {
  color: #b8cdd9 !important;
}

.portal-welcome-code {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(243, 208, 120, 0.25);
  color: #fff;
}

.portal-welcome-code strong {
  color: var(--gold-400);
  font-family: var(--font-display);
}

.track-search-card {
  max-width: 640px;
  margin-inline: auto;
  padding: 28px;
}

.dash-section-sub {
  margin: -6px 0 16px;
  max-width: 52ch;
}

.dash-charts,
.dash-charts-side {
  display: grid;
  gap: 16px;
}

.dash-charts {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  margin-bottom: 16px;
  align-items: start;
}

.dash-charts-secondary {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
}

.dchart-card {
  padding: 20px 22px 18px;
  overflow: hidden;
}

.dchart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.dchart-head h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: var(--navy-900);
}

.dchart-head .muted {
  margin: 0;
  font-size: 0.86rem;
}

.dchart-kicker {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--navy-900);
  background: var(--gold-100);
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}

.dchart-caption {
  margin: 14px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.dchart-flow {
  display: flex;
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 18px;
  background: #efe8d8;
}

.dchart-flow-seg {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  padding: 8px 10px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(4, 16, 24, 0.35);
}

.dchart-flow-seg strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.1;
}

.dchart-flow-seg small {
  font-size: 0.68rem;
  opacity: 0.92;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dchart-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.dchart-bar-row {
  display: grid;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.dchart-bar-row:hover .dchart-bar-label,
.dchart-legend a:hover .dchart-legend-text span {
  color: var(--navy-700);
}

.dchart-bar-row:hover .dchart-bar-fill {
  filter: brightness(1.08);
}

.dchart-bar-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.dchart-bar-label {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--navy-900);
}

.dchart-bar-nums {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.dchart-bar-nums strong {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--navy-950);
}

.dchart-bar-nums small {
  color: var(--muted);
  font-weight: 700;
}

.dchart-bar-track {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: #efe8d8;
  overflow: hidden;
}

.dchart-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: inline-start;
  animation: dchart-bar 0.75s var(--ease) forwards;
}

.dchart-donut-layout {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 16px 18px;
  align-items: center;
}

.dchart-donut-wrap {
  position: relative;
  width: 168px;
  height: 168px;
  margin-inline: auto;
}

.dchart-donut {
  width: 100%;
  height: 100%;
}

.dchart-donut-track,
.dchart-donut-slice {
  fill: none;
  stroke-width: 12;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.dchart-donut-track {
  stroke: #efe8d8;
}

.dchart-donut-slice {
  stroke-linecap: butt;
  animation: dchart-fade 0.6s var(--ease) both;
}

.dchart-donut-center {
  position: absolute;
  inset: 22%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.dchart-donut-center strong {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--navy-950);
  line-height: 1;
}

.dchart-donut-center span {
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.dchart-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.dchart-legend li a,
.dchart-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.dchart-swatch {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  flex-shrink: 0;
}

.dchart-legend-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.dchart-legend-text span {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--navy-900);
}

.dchart-legend-text small {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.dchart-cols {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(36px, 1fr);
  gap: 8px;
  min-height: 220px;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 4px;
}

.dchart-col {
  display: grid;
  grid-template-rows: 22px minmax(140px, 1fr) auto;
  justify-items: center;
  min-width: 0;
}

.dchart-col-val {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1;
}

.dchart-col-track {
  width: 100%;
  max-width: 28px;
  height: 100%;
  border-radius: 10px 10px 4px 4px;
  background: #efe8d8;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.dchart-col-fill {
  display: block;
  width: 100%;
  border-radius: inherit;
  transform: scaleY(0);
  transform-origin: bottom;
  animation: dchart-col 0.75s var(--ease) forwards;
}

.dchart-col-label {
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.dchart-col.is-empty .dchart-col-track {
  opacity: 0.55;
}

.dchart-money {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.dchart-money div {
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, var(--bg-soft));
  border: 1px solid var(--border);
}

.dchart-money span {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.dchart-money strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--navy-950);
}

@keyframes dchart-bar {
  to { transform: scaleX(1); }
}

@keyframes dchart-col {
  to { transform: scaleY(1); }
}

@keyframes dchart-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.track-choice-accent {
  border-color: rgba(201, 162, 39, 0.4);
  background:
    radial-gradient(circle at 100% 0%, rgba(201, 162, 39, 0.1), transparent 50%),
    var(--card);
}

@media (max-width: 1100px) {
  .public-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .login-page-split {
    grid-template-columns: 1fr;
  }
  .login-showcase {
    display: none;
  }
  .login-form-col,
  .auth-main {
    background: transparent;
  }
  .home-modes-grid {
    grid-template-columns: 1fr;
  }
  .dash-charts,
  .dash-charts-secondary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .public-footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .brand-mark small {
    display: none;
  }
  .dash-hero {
    flex-direction: column;
    align-items: stretch;
  }
  .dchart-donut-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .dchart-flow-seg small {
    display: none;
  }
}

@media (max-width: 560px) {
  .login-panel {
    padding: 18px 16px;
  }
  .main {
    padding: 14px 12px 88px;
  }
  .home-corridor-track {
    animation-duration: 22s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-corridor-track,
  .btn,
  .landing-step-card,
  .stat-card-link,
  .dchart-bar-fill,
  .dchart-col-fill,
  .dchart-donut-slice,
  .auth-bg-slide {
    animation: none;
    transition: none;
  }
  .auth-bg-slide {
    opacity: 0;
    transform: none;
  }
  .auth-bg-slide:nth-child(1) {
    opacity: 1;
  }
  .landing-card-media img,
  .landing-step-card:hover .landing-card-media img,
  .landing-feature:hover .landing-card-media img {
    transform: none;
  }
  .dchart-bar-fill,
  .dchart-col-fill {
    transform: none;
  }
}

/* ── Dark / light appearance ── */
html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070d12;
  --bg-soft: #0c151d;
  --card: #121c26;
  --text: #e7eef4;
  --muted: #9aafbe;
  --border: #243746;
  --border-strong: #355066;
  --gold-100: #2c2614;
  --success-bg: #10261c;
  --warning-bg: #2a210e;
  --danger-bg: #2c1515;
  --info-bg: #102430;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 28px 64px rgba(0, 0, 0, 0.5);
  --ring: 0 0 0 4px rgba(201, 162, 39, 0.18);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, rgba(201, 162, 39, 0.07), transparent 50%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(17, 79, 115, 0.12), transparent 50%),
    var(--bg);
  color: var(--text);
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] .topbar strong,
html[data-theme="dark"] .login-brand,
html[data-theme="dark"] .auth-card-brand,
html[data-theme="dark"] .user-meta strong,
html[data-theme="dark"] table.data td a strong {
  color: #f3f7fa;
}

html[data-theme="dark"] a {
  color: #8ec4e4;
}

html[data-theme="dark"] .muted,
html[data-theme="dark"] .login-lead,
html[data-theme="dark"] .field label {
  color: var(--muted);
}

html[data-theme="dark"] .btn-outline {
  color: #d7e6f2;
  border-color: var(--border-strong);
}

html[data-theme="dark"] .btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .app-body,
html[data-theme="dark"] .public-body,
html[data-theme="dark"] .login-body,
html[data-theme="dark"] .auth-body {
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, rgba(201, 162, 39, 0.08), transparent 48%),
    var(--bg);
}

html[data-theme="dark"] .login-body {
  background:
    radial-gradient(circle at 12% 18%, rgba(201, 162, 39, 0.12), transparent 32%),
    radial-gradient(circle at 88% 82%, rgba(21, 99, 148, 0.16), transparent 36%),
    #070d12;
}

html[data-theme="dark"] .auth-main {
  background: #0a141c;
}

html[data-theme="dark"] .login-form-col {
  background: transparent;
}

html[data-theme="dark"] .topbar {
  background: rgba(10, 20, 28, 0.88);
  border-bottom-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .landing-step-card,
html[data-theme="dark"] .landing-feature,
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .about-value-card,
html[data-theme="dark"] .journey-step-card,
html[data-theme="dark"] .track-lookup-help-card,
html[data-theme="dark"] .services-compare-card,
html[data-theme="dark"] .contact-info-card,
html[data-theme="dark"] .home-quote,
html[data-theme="dark"] .user-chip,
html[data-theme="dark"] .lang-switch {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .auth-card {
  background: rgba(16, 28, 40, 0.94);
}

html[data-theme="dark"] .login-panel {
  background: rgba(10, 20, 28, 0.48);
  border-color: rgba(255, 255, 255, 0.16);
}

html[data-theme="dark"] .login-program-card {
  background: rgba(12, 22, 32, 0.72);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e8f1f7;
}

html[data-theme="dark"] .login-program-card-gold {
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.18), rgba(12, 22, 32, 0.72));
}

html[data-theme="dark"] .login-program-card span {
  color: #9eb4c4;
}

html[data-theme="dark"] .register-approval-note {
  color: #f3e2b0;
  background: rgba(201, 162, 39, 0.14);
  border-color: rgba(201, 162, 39, 0.28);
}

html[data-theme="dark"] .pending-accounts-banner {
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.16), rgba(12, 22, 32, 0.85));
  border-color: rgba(201, 162, 39, 0.3);
  color: #e8f1f7;
}

html[data-theme="dark"] .login-program-icon {
  color: #d7e6f2;
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .search,
html[data-theme="dark"] .toolbar select,
html[data-theme="dark"] .toolbar input,
html[data-theme="dark"] .global-search-input,
html[data-theme="dark"] .filter-field input,
html[data-theme="dark"] .filter-field select {
  background: #0c1620;
  color: var(--text);
  border-color: var(--border);
  color-scheme: dark;
  box-shadow: none;
}

html[data-theme="dark"] select option,
html[data-theme="dark"] select optgroup {
  background-color: #121c26;
  color: var(--text);
}

html[data-theme="dark"] table.data thead th {
  background: #0c1620;
  color: var(--muted);
}

html[data-theme="dark"] table.data td,
html[data-theme="dark"] table.data th {
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] table.data tbody tr:hover {
  background: rgba(201, 162, 39, 0.08);
}

html[data-theme="dark"] .landing-stats,
html[data-theme="dark"] .landing-features-section,
html[data-theme="dark"] .landing-section,
html[data-theme="dark"] .home-modes,
html[data-theme="dark"] .home-corridor,
html[data-theme="dark"] .section {
  background-color: transparent;
}

html[data-theme="dark"] .landing-stats {
  background: linear-gradient(180deg, #101820, #0b141c);
}

html[data-theme="dark"] .landing-features-section {
  background: #0b141c;
}

html[data-theme="dark"] .landing-stat-value,
html[data-theme="dark"] .stat-card strong,
html[data-theme="dark"] .dchart-kpi strong {
  color: var(--gold-400);
}

html[data-theme="dark"] .landing-feature-icon {
  background: rgba(201, 162, 39, 0.16);
  color: var(--gold-400);
}

html[data-theme="dark"] .step-no,
html[data-theme="dark"] .login-roles li {
  background: var(--gold-100);
  color: #e3c15a;
}

html[data-theme="dark"] .icon-btn {
  background: var(--card);
  border-color: var(--border);
  color: #d7e6f2;
}

html[data-theme="dark"] .btn-outline {
  background: rgba(18, 28, 38, 0.72);
  color: #d7e6f2;
  border-color: var(--border-strong);
}

html[data-theme="dark"] .btn-outline:hover {
  background: #1a2834;
  border-color: var(--gold-500);
}

html[data-theme="dark"] .modal,
html[data-theme="dark"] .ptrack-story-card,
html[data-theme="dark"] .stat-card {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .ptrack-story-item.is-wait .ptrack-story-card {
  background: #16222c;
}

html[data-theme="dark"] .ptrack-dot {
  background: var(--card);
  border-color: var(--border-strong);
}

html[data-theme="dark"] .stat-tone-sea .stat-card-icon {
  background: #143044;
  color: #8ec4e4;
}

html[data-theme="dark"] .global-search-icon {
  color: #8ea6b6;
}

html[data-theme="dark"] .kv-row,
html[data-theme="dark"] .timeline-item,
html[data-theme="dark"] .notif-item {
  border-color: var(--border);
}

html[data-theme="dark"] .notif-item.is-read {
  background: transparent;
}

html[data-theme="dark"] .page-tabs {
  background: #0c1620;
  border-color: var(--border);
}

html[data-theme="dark"] .page-tabs-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

html[data-theme="dark"] .page-tabs-item.is-active {
  background: var(--card);
  color: var(--text);
}

html[data-theme="dark"] .page-tabs-count {
  background: rgba(201, 162, 39, 0.18);
  color: var(--gold-400);
}

html[data-theme="dark"] .public-header .lang-switch,
html[data-theme="dark"] .sidebar-lang .lang-switch {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

@media (max-width: 1100px) {
  html[data-theme="dark"] .auth-main,
  html[data-theme="dark"] .login-form-col {
    background: transparent;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chat-shell {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  min-height: min(72vh, 760px);
}

.chat-inbox,
.chat-thread,
.chat-inbox.card,
.chat-thread.card {
  display: flex;
  flex-direction: column;
  min-height: min(72vh, 760px);
  padding: 0;
  overflow: hidden;
}

.chat-inbox-title {
  margin: 0;
  padding: 18px 18px 8px;
  font-size: 1.05rem;
}

.chat-pick {
  display: grid;
  gap: 8px;
  padding: 0 18px 14px;
  border-bottom: 1px solid var(--border);
}

.chat-pick label {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--muted);
}

.chat-pick-input,
.chat-pick input[type="search"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 12px;
  background: var(--bg);
  color: var(--text);
}

.chat-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow: auto;
  flex: 1;
}

.chat-list-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
}

.chat-list-item:hover,
.chat-list-item.is-active {
  background: var(--bg-soft);
}

.chat-list-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #1a6a96, var(--navy-900));
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
}

.chat-list-body {
  min-width: 0;
  display: grid;
}

.chat-list-body strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-list-body small,
.chat-list-meta time {
  color: var(--muted);
  font-size: 0.78rem;
}

.chat-list-body small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-list-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.chat-unread {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--gold-500);
  color: var(--navy-950);
  font-size: 0.72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.chat-thread-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}

.chat-thread-head small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.chat-thread-log {
  flex: 1;
  overflow: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(circle at 10% 0%, rgba(201, 162, 39, 0.06), transparent 40%),
    var(--bg);
}

.chat-bubble {
  max-width: min(78%, 42ch);
  padding: 10px 12px 8px;
  border-radius: 16px 16px 16px 4px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.chat-bubble.is-mine {
  margin-inline-start: auto;
  background: #d8f5e6;
  border-color: rgba(20, 125, 78, 0.16);
  border-radius: 16px 16px 4px 16px;
}

.chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.chat-ticks {
  display: inline-flex;
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--card);
}

.chat-composer textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  resize: vertical;
  min-height: 48px;
  background: var(--bg);
  color: var(--text);
}

.chat-thread-empty,
.chat-empty {
  margin: auto;
  padding: 28px 18px;
  text-align: center;
  color: var(--muted);
}

html[data-theme="dark"] .chat-bubble.is-mine {
  background: #163328;
  border-color: rgba(83, 189, 235, 0.12);
  color: var(--text);
}

html[data-theme="dark"] .chat-list-item:hover,
html[data-theme="dark"] .chat-list-item.is-active,
html[data-theme="dark"] .chat-thread-head {
  background: #0c1620;
}

html[data-theme="dark"] .chat-composer textarea,
html[data-theme="dark"] .chat-pick-input {
  background: #0c1620;
}

@media (max-width: 860px) {
  .chat-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .chat-inbox,
  .chat-thread {
    min-height: 0;
  }
  .chat-thread-log {
    min-height: 360px;
  }
}

