/* Rota Confirmada — consumer landing aesthetic
   Bright kelly-green brand, white surfaces, illustrated sections,
   Poppins rounded sans, centered hero, full-width green banner. */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500&display=swap');

:root {
  /* Brand greens — anchored to logo's #2BC866 */
  --green-700: #168d4a;
  --green-600: #21b059;
  --green-500: #2BC866;
  --green-400: #57d484;
  --green-300: #86efac;
  --green-200: #bbf7d0;
  --green-100: #dcfce7;
  --green-50:  #f0fdf4;

  --brand-blue: #1A52A2;
  --accent-yellow: #facc15;

  /* Neutrals */
  --bg:           #ffffff;
  --surface:      #ffffff;
  --surface-2:    #fafbf9;
  --surface-3:    #f3f5f4;
  --line:         #e6ebe8;
  --line-2:       #d8e0dc;

  --ink:          #1f2937;
  --ink-2:        #374151;
  --ink-3:        #6b7280;
  --ink-4:        #9ca3af;
  --ink-soft:     #4b5563;

  --button-dark:  #4b5560;
  --button-dark-hover: #374151;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  /* Type */
  --fs-xs:   12px;
  --fs-sm:   13.5px;
  --fs-base: 15px;
  --fs-md:   17px;
  --fs-lg:   22px;
  --fs-xl:   28px;
  --fs-2xl:  38px;
  --fs-3xl:  clamp(34px, 4.5vw, 46px);
  --fs-hero: clamp(36px, 5vw, 54px);

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-1: 0 1px 2px rgba(20, 50, 30, 0.04);
  --shadow-2: 0 4px 16px rgba(20, 50, 30, 0.06);
  --shadow-3: 0 12px 40px rgba(20, 50, 30, 0.12);
  --shadow-banner: 0 30px 60px -20px rgba(26, 185, 88, 0.4);

  /* z */
  --z-nav: 30;
  --z-overlay: 60;
  --z-toast: 80;

  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;

  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-strong: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.55;
  font-feature-settings: 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  text-wrap: balance;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
p { text-wrap: pretty; margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; height: auto; }
/* Defensive: stop SVGs from exploding if no specific class rule applies */
svg:not(:root) { max-width: 100%; max-height: 100%; }
button > svg, a > svg { width: 1em; height: 1em; flex-shrink: 0; }

::selection { background: var(--green-200); color: var(--green-700); }
.mono, .num { font-family: var(--font-mono); font-feature-settings: 'tnum'; letter-spacing: 0.01em; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--green-500); outline-offset: 2px; border-radius: var(--r-sm); }
.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; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- LAYOUT (mobile-first) ---------- */
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--sp-4);
  /* safe-area inset for landscape notch / round corners */
  padding-left: max(var(--sp-4), env(safe-area-inset-left));
  padding-right: max(var(--sp-4), env(safe-area-inset-right));
}
@media (min-width: 640px) {
  .container { padding-left: max(var(--sp-5), env(safe-area-inset-left)); padding-right: max(var(--sp-5), env(safe-area-inset-right)); }
}
main { flex: 1; }

/* ---------- HEADER ---------- */
.nav {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  padding-top: env(safe-area-inset-top);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: var(--sp-2) 0;
}
@media (min-width: 768px) {
  .nav-inner { min-height: 96px; }
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
  /* touch target on mobile */
  min-height: 44px;
}
.brand-logo {
  height: 72px;
  width: auto;
  display: block;
}
@media (min-width: 640px) {
  .brand-logo { height: 92px; }
}
@media (min-width: 1024px) {
  .brand-logo { height: 110px; }
}

/* Centered header layout: [spacer] [logo] [optional action] */
.nav-centered .nav-inner {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: var(--sp-3);
  min-height: 88px;
  padding: var(--sp-2) 0;
}
@media (min-width: 640px) {
  .nav-centered .nav-inner { min-height: 112px; }
}
.nav-centered .brand {
  justify-self: center;
  min-height: 0;
}
.nav-side { width: 44px; height: 44px; display: block; }
.nav-centered .nav-back {
  justify-self: end;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid var(--green-100);
  display: grid;
  place-items: center;
  transition: background 140ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.nav-centered .nav-back:active { background: var(--green-100); }
@media (hover: hover) { .nav-centered .nav-back:hover { background: var(--green-100); } }
.nav-centered .nav-back svg { width: 18px; height: 18px; }

.nav-actions { display: flex; align-items: center; gap: var(--sp-3); }
.btn-link {
  padding: 9px 22px;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  border: 1.5px solid var(--green-500);
  background: #fff;
  color: var(--green-600);
  cursor: pointer;
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out);
}
@media (hover: hover) { .btn-link:hover { background: var(--green-50); } }

.btn-cta {
  padding: 9px 22px;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  background: var(--green-500);
  color: #fff;
  border: 1.5px solid var(--green-500);
  cursor: pointer;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background 160ms var(--ease-out), transform 140ms var(--ease-out);
}
@media (hover: hover) { .btn-cta:hover { background: var(--green-600); border-color: var(--green-600); } }
.btn-cta:active { transform: translateY(1px); }

/* ---------- HERO (mobile-first, polished) ---------- */
.hero {
  text-align: center;
  padding: var(--sp-5) 0 var(--sp-3);
}
@media (min-width: 768px) {
  .hero { padding: var(--sp-9) 0 var(--sp-5); }
}
.hero .eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid var(--green-100);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 var(--sp-4);
}
.hero .eyebrow-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-500);
  box-shadow: 0 0 0 3px rgba(43,200,102,0.18);
}
.hero h1 {
  font-size: clamp(30px, 8vw, 56px);
  font-weight: 700;
  color: var(--green-600);
  letter-spacing: -0.025em;
  line-height: 1.05;
  max-width: 18ch;
  margin: 0 auto var(--sp-4);
}
@media (min-width: 768px) {
  .hero h1 { margin-bottom: var(--sp-5); letter-spacing: -0.022em; line-height: 1.08; }
}
@media (min-width: 1280px) {
  .hero h1 { font-size: 68px; line-height: 1.05; max-width: 18ch; }
}
.hero .lead {
  font-size: 15.5px;
  color: var(--ink-3);
  max-width: 38ch;
  margin: 0 auto var(--sp-5);
  line-height: 1.5;
}
@media (min-width: 768px) {
  .hero .lead { font-size: 17px; margin-bottom: var(--sp-6); max-width: 48ch; }
}

/* Track form CARD wrapper — gives the input a focal-card feel */
.track-form-wrap {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--green-100);
  border-radius: 20px;
  padding: var(--sp-3);
  box-shadow: 0 1px 0 rgba(20,50,30,0.02), 0 10px 30px -14px rgba(43,200,102,0.18);
}
@media (min-width: 768px) {
  .track-form-wrap { padding: var(--sp-4); border-radius: 24px; }
}
.track-form-wrap .form-helper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: var(--sp-3) 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
}
.track-form-wrap .form-helper svg { width: 14px; height: 14px; color: var(--green-600); }
.track-form-wrap .form-helper a {
  color: var(--green-700);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.track-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  background: transparent;
}
@media (min-width: 540px) {
  .track-form { flex-direction: row; gap: var(--sp-2); }
}

.input {
  flex: 1;
  width: 100%;
  padding: 15px 20px;
  background: #fff;
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-pill);
  font-size: 16px; /* iOS won't zoom in on focus when >=16px */
  color: var(--ink);
  min-height: 52px;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
/* Hero-specific input — slightly more polished */
.track-form-wrap .input {
  background: var(--green-50);
  border-color: var(--green-100);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.track-form-wrap .input::placeholder {
  color: var(--ink-3);
  font-weight: 400;
  letter-spacing: normal;
}
.track-form-wrap .input.is-mono { font-family: var(--font-mono); letter-spacing: 0.04em; font-feature-settings: 'tnum'; }
.track-form-wrap .input:focus-visible {
  background: #fff;
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(43,200,102,0.18);
}
.input::placeholder { color: var(--ink-4); }
.input:focus-visible {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px var(--green-100);
}
.input.is-mono { font-family: var(--font-mono); font-feature-settings: 'tnum'; letter-spacing: 0.04em; }
.input.is-error { border-color: #ef4444; box-shadow: 0 0 0 4px #fee2e2; }

.btn-dark {
  padding: 14px 28px;
  min-height: 52px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  border: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 160ms var(--ease-out), transform 140ms var(--ease-out), box-shadow 200ms var(--ease-out);
  white-space: nowrap;
  box-shadow: 0 8px 20px -8px rgba(31,41,55,0.5);
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .btn-dark:hover { background: #111827; transform: translateY(-1px); box-shadow: 0 12px 28px -10px rgba(31,41,55,0.55); }
}
.btn-dark:active { transform: translateY(1px); box-shadow: 0 4px 12px -4px rgba(31,41,55,0.45); }
.btn-dark svg { width: 18px; height: 18px; }
@media (min-width: 540px) {
  .btn-dark { padding: 14px 32px; }
}

.hero-illustration {
  margin: var(--sp-6) auto var(--sp-5);
  max-width: 360px;
  width: 100%;
}
@media (min-width: 640px) {
  .hero-illustration { max-width: 540px; margin: var(--sp-7) auto var(--sp-6); }
}
@media (min-width: 768px) {
  .hero-illustration { margin: var(--sp-7) auto var(--sp-9); max-width: 720px; }
}
@media (min-width: 1280px) {
  .hero-illustration { max-width: 900px; }
}
.hero-illustration svg,
.hero-illustration img { width: 100%; height: auto; display: block; }

/* ---------- FEATURES (mobile-first) ---------- */
.features {
  padding: var(--sp-6) 0 var(--sp-7);
  text-align: center;
}
@media (min-width: 768px) {
  .features { padding: var(--sp-7) 0 var(--sp-8); }
}
.features h2 {
  font-size: clamp(24px, 6vw, 42px);
  color: var(--green-600);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 22ch;
  margin: 0 auto var(--sp-4);
}
.features .lead {
  color: var(--ink-3);
  font-size: var(--fs-base);
  max-width: 56ch;
  margin: 0 auto var(--sp-6);
}
@media (min-width: 768px) {
  .features .lead { margin-bottom: var(--sp-8); }
}
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  max-width: 900px;
  margin: 0 auto;
}
@media (min-width: 800px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
}
.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fff;
  border: 1px solid var(--green-100);
  border-radius: 18px;
  padding: var(--sp-5) var(--sp-4);
  transition: transform 180ms var(--ease-out), box-shadow 200ms var(--ease-out), border-color 180ms var(--ease-out);
}
@media (min-width: 800px) {
  .feature { background: transparent; border: none; padding: 0; }
}
@media (hover: hover) {
  .feature:hover { transform: translateY(-2px); border-color: var(--green-200); box-shadow: 0 12px 28px -16px rgba(43,200,102,0.25); }
}
.feature-icon {
  width: 96px;
  height: 96px;
  margin-bottom: var(--sp-3);
  display: grid;
  place-items: center;
  background: var(--green-50);
  border-radius: 22px;
  padding: 12px;
}
@media (min-width: 800px) {
  .feature-icon { width: 140px; height: 140px; background: transparent; padding: 0; }
}
.feature-icon svg { width: 100%; height: 100%; }
.feature h3 {
  font-size: 17px;
  color: var(--green-700);
  font-weight: 700;
  margin: 0 0 var(--sp-2);
  letter-spacing: -0.005em;
}
@media (min-width: 800px) { .feature h3 { font-size: var(--fs-md); color: var(--green-600); margin-bottom: var(--sp-3); } }
.feature p {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.55;
  max-width: 30ch;
  margin: 0;
}
@media (min-width: 800px) { .feature p { font-size: var(--fs-sm); } }

/* ---------- CTA ROW ---------- */
.cta-row {
  text-align: center;
  padding: var(--sp-7) 0 var(--sp-8);
}
.cta-row h2 {
  font-size: var(--fs-2xl);
  color: var(--green-600);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.018em;
  max-width: 26ch;
  margin: 0 auto var(--sp-5);
}
.cta-row .btn-cta { padding: 13px 32px; font-size: var(--fs-sm); }

/* ---------- GREEN BANNER (mobile-first) ---------- */
.banner {
  background: var(--green-500);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: var(--sp-6) 0;
}
@media (min-width: 768px) {
  .banner { padding: var(--sp-8) 0; }
}
.banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255,255,255,0.1) 0px, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255,255,255,0.08) 0px, transparent 40%);
  pointer-events: none;
}
.banner-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  align-items: center;
  position: relative;
  z-index: 1;
  text-align: center;
}
@media (min-width: 880px) {
  .banner-grid { grid-template-columns: 1.4fr 1fr; gap: var(--sp-7); text-align: left; }
}
.banner h2 {
  font-size: clamp(22px, 5.5vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  max-width: 22ch;
  margin: 0 auto var(--sp-3);
}
@media (min-width: 880px) {
  .banner h2 { margin: 0 0 var(--sp-4); }
}
.banner p {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.9);
  max-width: 56ch;
  line-height: 1.6;
  margin: 0 auto var(--sp-5);
}
@media (min-width: 880px) {
  .banner p { margin: 0 0 var(--sp-6); }
}
.carriers-strip {
  background: #fff;
  border-radius: var(--r-pill);
  padding: 10px var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: var(--sp-2);
  max-width: 580px;
  margin: 0 auto;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,0.2);
  flex-wrap: wrap;
}
@media (min-width: 640px) {
  .carriers-strip { padding: 14px var(--sp-6); gap: var(--sp-4); }
}
@media (min-width: 880px) {
  .carriers-strip { margin: 0; }
}
.carrier {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  font-family: var(--font);
  line-height: 1;
}

/* Loggi (mobile-first) */
.carrier-loggi { color: #00B1F5; font-weight: 700; font-size: 14px; letter-spacing: -0.02em; }
.carrier-loggi svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Rota Confirmada */
/* Jadlog */
.carrier-jadlog { display: inline-flex; align-items: center; gap: 5px; color: #2c2c2c; font-weight: 700; }
.carrier-jadlog svg { width: 18px; height: 18px; flex-shrink: 0; }
.carrier-jadlog .jl-text { font-size: 14px; letter-spacing: -0.02em; line-height: 1; }

/* J&T Express */
.carrier-jt { display: inline-flex; align-items: center; gap: 4px; color: #E60012; font-weight: 800; font-style: italic; }
.carrier-jt .jt-mark { font-size: 14px; letter-spacing: -0.03em; }
.carrier-jt .jt-bar { width: 1.5px; height: 12px; background: #E60012; display: inline-block; transform: skewX(-12deg); }
.carrier-jt .jt-express { font-size: 8px; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1; }

/* Total Express */
.carrier-total { display: inline-flex; flex-direction: column; align-items: center; line-height: 0.95; }
.carrier-total .t-top { font-weight: 800; font-size: 14px; color: #E60012; letter-spacing: 0.04em; font-style: italic; }
.carrier-total .t-top .o-dot { position: relative; display: inline-block; }
.carrier-total .t-top .o-dot::after { content: ''; position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #1e4e7d; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.carrier-total .t-bot { font-weight: 600; font-size: 8px; color: #1e4e7d; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 1px; }

@media (min-width: 640px) {
  .carrier-loggi { font-size: 17px; }
  .carrier-loggi svg { width: 22px; height: 22px; }
  .carrier-jadlog svg { width: 22px; height: 22px; }
  .carrier-jadlog .jl-text { font-size: 17px; }
  .carrier-jt .jt-mark { font-size: 17px; }
  .carrier-jt .jt-bar { height: 14px; }
  .carrier-jt .jt-express { font-size: 9px; }
  .carrier-total .t-top { font-size: 17px; }
  .carrier-total .t-top .o-dot::after { width: 4px; height: 4px; }
  .carrier-total .t-bot { font-size: 9px; }
}

.banner-illustration { display: grid; place-items: center; position: relative; }
.banner-illustration svg,
.banner-illustration img {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
  border-radius: var(--r-md);
}
@media (min-width: 640px) { .banner-illustration img { max-width: 360px; } }
@media (min-width: 880px) { .banner-illustration img { max-width: 440px; } }

/* ---------- HELP SECTION (mobile-first) ---------- */
.help-section {
  padding: var(--sp-7) 0 var(--sp-6);
}
@media (min-width: 768px) {
  .help-section { padding: var(--sp-9) 0 var(--sp-7); }
}
.help-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  align-items: center;
  text-align: center;
}
.help-illustration { order: -1; }
@media (min-width: 800px) {
  .help-grid { grid-template-columns: 1fr 1.1fr; gap: var(--sp-7); text-align: left; }
  .help-illustration { order: 0; }
}
.help-text h2 {
  font-size: clamp(24px, 6vw, 42px);
  color: var(--green-600);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 var(--sp-3);
}
.help-text p { color: var(--ink-3); font-size: var(--fs-base); }
.help-illustration svg,
.help-illustration img { width: 100%; max-width: 280px; height: auto; margin: 0 auto; display: block; }
@media (min-width: 800px) {
  .help-illustration svg,
  .help-illustration img { max-width: 380px; }
}

.help-carousel {
  margin-top: var(--sp-6);
  position: relative;
}
@media (min-width: 768px) {
  .help-carousel { margin-top: var(--sp-7); }
}
.help-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}
@media (min-width: 640px) {
  .help-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .help-cards { grid-template-columns: repeat(4, 1fr); }
}
.help-card {
  background: #fff;
  border: 1.5px solid var(--green-200);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
@media (min-width: 640px) {
  .help-card { padding: var(--sp-5); }
}
@media (hover: hover) {
  .help-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
    border-color: var(--green-300);
  }
}
.help-card:active { border-color: var(--green-300); }
.help-card .ic {
  width: 32px; height: 32px;
  margin-bottom: var(--sp-3);
  color: var(--green-600);
}
.help-card .ic svg { width: 100%; height: 100%; }
.help-card h3 {
  font-size: var(--fs-base);
  color: var(--green-600);
  font-weight: 600;
  margin: 0 0 var(--sp-3);
  line-height: 1.3;
}
.help-card p {
  font-size: var(--fs-sm);
  color: var(--ink-3);
  line-height: 1.55;
  margin: 0 0 var(--sp-3);
}
.help-card ul {
  margin: var(--sp-2) 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--ink-3);
}
.help-card ul li { margin-bottom: 6px; line-height: 1.4; }

/* ---------- FOOTER ---------- */
.footer {
  text-align: center;
  padding: var(--sp-6) 0;
  padding-bottom: max(var(--sp-6), calc(var(--sp-4) + env(safe-area-inset-bottom)));
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.footer .brand-text-foot {
  font-size: var(--fs-sm);
  color: var(--ink-3);
}
.footer .links {
  margin-top: var(--sp-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}
.footer .links a {
  color: var(--green-600);
  font-size: var(--fs-sm);
  font-weight: 500;
  /* touch target on mobile */
  padding: 6px 0;
  min-height: 32px;
  transition: color 140ms var(--ease-out);
}
@media (hover: hover) {
  .footer .links a:hover { color: var(--green-700); text-decoration: underline; }
}

/* ---------- FAB HELP (safe-area aware) ---------- */
.fab {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  right: max(16px, env(safe-area-inset-right));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green-500);
  color: #fff;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(34, 197, 94, 0.4);
  transition: transform 200ms var(--ease-out), background 160ms var(--ease-out);
  z-index: var(--z-toast);
}
@media (hover: hover) {
  .fab:hover { background: var(--green-600); transform: scale(1.05); }
}
.fab:active { transform: scale(0.96); }
.fab svg { width: 22px; height: 22px; }

/* ---------- TRACK PAGE (reskin) ---------- */
.page-head {
  padding: var(--sp-7) 0 var(--sp-5);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.page-head h1 {
  font-size: var(--fs-xl);
  color: var(--green-600);
  font-weight: 700;
  margin: 0 0 var(--sp-2);
}
.page-head .sub { color: var(--ink-3); font-size: var(--fs-sm); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  padding: var(--sp-5) 0 var(--sp-7);
  align-items: start;
}
@media (min-width: 768px) {
  .detail-grid { gap: var(--sp-6); padding: var(--sp-6) 0 var(--sp-8); }
}
@media (min-width: 920px) {
  .detail-grid { grid-template-columns: 1.2fr 1fr; gap: var(--sp-7); padding: var(--sp-7) 0 var(--sp-9); }
}

.status-block {
  background: #fff;
  border: 1.5px solid var(--green-200);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-2);
  position: relative;
  overflow: hidden;
}
.status-block::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--green-500);
}
.status-block.s-warn::before { background: #f59e0b; }
.status-block.s-danger::before { background: #ef4444; }
.status-block.s-active::before { background: #3b82f6; }
.status-block.s-success::before { background: var(--green-500); }
.status-block.s-default::before { background: var(--ink-4); }

.code-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.code-block .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  margin-bottom: 4px;
  display: block;
  font-weight: 600;
}
.code-block .value {
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  letter-spacing: 0.04em;
  color: var(--ink);
  font-feature-settings: 'tnum';
  font-weight: 500;
}
.copy-btn {
  background: var(--green-50);
  border: 1px solid var(--green-200);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--green-700);
  transition: background 140ms var(--ease-out);
}
@media (hover: hover) { .copy-btn:hover { background: var(--green-100); } }

.status-current {
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: var(--sp-2) 0 var(--sp-3);
  color: var(--ink);
}
.status-summary { color: var(--ink-3); font-size: var(--fs-sm); margin: 0; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 4px 11px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid transparent;
  margin-bottom: var(--sp-3);
}
.status-pill .swatch { width: 7px; height: 7px; border-radius: var(--r-pill); }
.status-pill.s-default { background: #f3f4f6; border-color: #e5e7eb; color: var(--ink-2); }
.status-pill.s-default .swatch { background: var(--ink-4); }
.status-pill.s-active { background: #dbeafe; border-color: #bfdbfe; color: #1e40af; }
.status-pill.s-active .swatch { background: #3b82f6; }
.status-pill.s-success { background: var(--green-100); border-color: var(--green-200); color: var(--green-700); }
.status-pill.s-success .swatch { background: var(--green-500); }
.status-pill.s-warn { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.status-pill.s-warn .swatch { background: #f59e0b; }
.status-pill.s-danger { background: #fee2e2; border-color: #fecaca; color: #991b1b; }
.status-pill.s-danger .swatch { background: #ef4444; }

.kv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: var(--sp-5);
  border-top: 1px solid var(--line);
}
@media (min-width: 520px) { .kv-grid { grid-template-columns: 1fr 1fr; margin-top: var(--sp-6); } }
.kv { padding: var(--sp-3) 0 var(--sp-4); border-bottom: 1px solid var(--line); }
@media (min-width: 520px) {
  .kv:nth-child(odd) { padding-right: var(--sp-5); }
  .kv:nth-child(even) { padding-left: var(--sp-5); }
}
.kv .k {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  font-weight: 600;
  margin-bottom: 4px;
}
.kv .v { font-size: var(--fs-base); color: var(--ink); line-height: 1.4; }
.kv .v.is-mono { font-family: var(--font-mono); letter-spacing: 0.04em; font-feature-settings: 'tnum'; }

.timeline {
  background: #fff;
  border: 1.5px solid var(--green-200);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-2);
}
.timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
}
.timeline-head h2 { font-size: var(--fs-base); color: var(--green-600); font-weight: 700; }
.timeline-head .count {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-4);
  font-weight: 600;
}

.tl-list { position: relative; margin: 0; padding: 0; list-style: none; }
.tl-list::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 6px;
  width: 1.5px;
  background: var(--green-200);
}
.tl-item {
  position: relative;
  padding: 0 0 var(--sp-5) 38px;
  opacity: 0;
  transform: translateY(6px);
  animation: tlIn 520ms var(--ease-out-strong) forwards;
  animation-delay: calc(var(--i, 0) * 60ms);
}
.tl-item:last-child { padding-bottom: 4px; }
@keyframes tlIn { to { opacity: 1; transform: translateY(0); } }

.tl-dot {
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  background: #fff;
  border: 2px solid var(--green-200);
  display: grid;
  place-items: center;
  color: var(--ink-4);
}
.tl-dot svg { width: 11px; height: 11px; stroke-width: 2; }
.tl-item.is-latest .tl-dot {
  border-color: var(--green-500);
  background: var(--green-100);
  color: var(--green-700);
}
.tl-item.is-latest .tl-dot::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--green-500);
  opacity: 0.4;
  animation: tlPulse 2.4s ease-out infinite;
}
@keyframes tlPulse {
  0%, 100% { transform: scale(0.85); opacity: 0.4; }
  60% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}
.tl-item.s-warn .tl-dot { border-color: #fcd34d; color: #92400e; }
.tl-item.s-danger .tl-dot { border-color: #fca5a5; color: #991b1b; }
.tl-item.is-latest.s-warn .tl-dot { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.tl-item.is-latest.s-warn .tl-dot::before { border-color: #f59e0b; }
.tl-item.is-latest.s-danger .tl-dot { background: #fee2e2; border-color: #ef4444; }
.tl-item.is-latest.s-danger .tl-dot::before { border-color: #ef4444; }

.tl-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 11.5px;
  color: var(--ink-4);
  margin-bottom: 4px;
}
.tl-meta .when { font-family: var(--font-mono); font-feature-settings: 'tnum'; letter-spacing: 0.02em; }
.tl-meta .sep { display: inline-block; width: 3px; height: 3px; background: var(--line-2); border-radius: 50%; }
.tl-meta .loc { color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; }
.tl-meta .loc svg { width: 11px; height: 11px; }

.tl-status { font-size: var(--fs-base); font-weight: 500; color: var(--ink); line-height: 1.35; }
.tl-note { margin-top: 4px; font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.55; max-width: 56ch; }

.empty {
  padding: var(--sp-7);
  text-align: center;
  border: 2px dashed var(--green-200);
  border-radius: var(--r-lg);
  background: var(--green-50);
  margin: var(--sp-6) 0;
}
.empty .ic {
  width: 60px; height: 60px; border-radius: 50%;
  background: #fff;
  border: 2px solid var(--green-200);
  margin: 0 auto var(--sp-4);
  display: grid; place-items: center;
  color: var(--green-600);
}
.empty .ic svg { width: 28px; height: 28px; }
.empty h3 { margin: 0 0 var(--sp-2); font-size: var(--fs-md); color: var(--green-600); font-weight: 700; }
.empty p { margin: 0 0 var(--sp-4); font-size: var(--fs-sm); color: var(--ink-3); max-width: 52ch; margin-inline: auto; }

.demo-banner {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: var(--sp-5) 0 0;
}
.demo-banner strong { font-weight: 700; }
.demo-banner svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ---------- ADMIN AUTH (mobile-first) ---------- */
.auth-wrap {
  flex: 1;
  display: grid;
  place-items: center;
  padding: var(--sp-5) var(--sp-4);
  padding-bottom: max(var(--sp-5), env(safe-area-inset-bottom));
  background: linear-gradient(180deg, var(--green-50) 0%, #fff 100%);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1.5px solid var(--green-200);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-3);
  text-align: center;
}
@media (min-width: 480px) {
  .auth-card { padding: var(--sp-7); }
}
.auth-card .auth-mark {
  width: 56px; height: 56px;
  margin: 0 auto var(--sp-4);
  background: var(--green-100);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--green-600);
}
.auth-card .auth-mark svg { width: 26px; height: 26px; }
.auth-card h1 {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-lg);
  color: var(--green-600);
  font-weight: 700;
}
.auth-card .auth-sub { color: var(--ink-3); margin: 0 0 var(--sp-5); font-size: var(--fs-sm); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-3); text-align: left; }
.field label { font-size: var(--fs-xs); color: var(--ink-2); font-weight: 600; letter-spacing: 0.01em; }
.field .hint { font-size: 11px; color: var(--ink-4); font-weight: 400; }
.field-error { font-size: 11.5px; color: #991b1b; margin-top: 4px; display: none; }
.field.has-error .field-error { display: block; }
.field input.input, .field select.input, .field textarea.input { border-radius: var(--r-md); }
.field input.input, .field select.input { padding: 13px 14px; min-height: 48px; font-size: 16px; }

/* Password toggle */
.pwd-wrap { position: relative; }
.pwd-wrap .input { padding-right: 52px; }
.pwd-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pwd-toggle:active { background: var(--surface-3); }
.pwd-toggle svg { width: 20px; height: 20px; }

.btn-block { width: 100%; padding: 14px 22px; min-height: 52px; font-size: 16px; }
.auth-meta {
  margin: var(--sp-5) 0 0;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-4);
  font-family: var(--font-mono);
  font-feature-settings: 'tnum';
}

.form-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-4);
  text-align: left;
}

/* ---------- ADMIN DASHBOARD (mobile-first) ---------- */
.admin-shell { padding: var(--sp-5) 0 var(--sp-8); flex: 1; }
@media (min-width: 768px) { .admin-shell { padding: var(--sp-6) 0 var(--sp-9); } }
.admin-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sp-3);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 640px) {
  .admin-head {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: var(--sp-4);
    padding-bottom: var(--sp-5);
  }
}
.admin-head h1 { margin: 0; font-size: var(--fs-lg); color: var(--green-600); font-weight: 700; }
@media (min-width: 640px) { .admin-head h1 { font-size: var(--fs-xl); } }
.admin-head .sub { color: var(--ink-3); margin: 4px 0 0; font-size: var(--fs-sm); }
.admin-head .who {
  font-size: var(--fs-xs);
  color: var(--green-700);
  background: var(--green-50);
  border: 1px solid var(--green-200);
  padding: 5px 11px;
  border-radius: var(--r-pill);
  font-weight: 600;
  display: none;
}
@media (min-width: 640px) { .admin-head .who { display: inline-block; } }
.admin-head .actions { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.admin-head .actions .btn,
.admin-head .actions .btn-ghost { flex: 1; min-height: 44px; }
@media (min-width: 640px) {
  .admin-head .actions { gap: var(--sp-3); }
  .admin-head .actions .btn,
  .admin-head .actions .btn-ghost { flex: 0 0 auto; }
}

.btn-ghost {
  padding: 9px 18px;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  background: #fff;
  color: var(--ink-2);
  border: 1.5px solid var(--line-2);
  cursor: pointer;
  transition: background 160ms var(--ease-out);
}
@media (hover: hover) { .btn-ghost:hover { background: var(--surface-3); } }

.btn {
  padding: 9px 18px;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  background: var(--green-500);
  color: #fff;
  border: 1.5px solid var(--green-500);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 160ms var(--ease-out), transform 140ms var(--ease-out);
}
@media (hover: hover) { .btn:hover { background: var(--green-600); border-color: var(--green-600); } }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn svg { width: 14px; height: 14px; }
.btn-sm { padding: 7px 14px; font-size: var(--fs-xs); }

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: var(--sp-5) 0 var(--sp-3);
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.admin-toolbar .search { flex: 1; max-width: 380px; position: relative; }
.admin-toolbar .search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--ink-4);
  pointer-events: none;
}
.admin-toolbar .search input { padding-left: 42px; }
.admin-toolbar .meta {
  font-size: 11px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ---------- TRACKING LIST (mobile-first cards, desktop table-like) ---------- */
.list-loading { display: flex; flex-direction: column; gap: var(--sp-3); }
.tracking-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.tracking-card {
  background: #fff;
  border: 1.5px solid var(--green-200);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-3) var(--sp-4);
  align-items: start;
  cursor: pointer;
  transition: border-color 140ms var(--ease-out), background 140ms var(--ease-out), box-shadow 160ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .tracking-card:hover { background: var(--green-50); border-color: var(--green-300); box-shadow: var(--shadow-2); }
}
.tracking-card:active { background: var(--green-50); }
.tracking-card .tc-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.tracking-card .tc-code {
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  letter-spacing: 0.04em;
  color: var(--ink);
  font-weight: 600;
  font-feature-settings: 'tnum';
  word-break: break-all;
}
.tracking-card .tc-name {
  font-weight: 600;
  font-size: var(--fs-base);
  color: var(--ink);
  margin: 0;
}
.tracking-card .tc-meta {
  color: var(--ink-3);
  font-size: var(--fs-sm);
  margin: 4px 0 0;
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  align-items: center;
}
.tracking-card .tc-meta .sep { width: 3px; height: 3px; background: var(--ink-4); border-radius: 50%; display: inline-block; }
.tracking-card .tc-meta .when { font-family: var(--font-mono); font-size: 12px; color: var(--ink-4); font-feature-settings: 'tnum'; }
.tracking-card .tc-body { grid-column: 1 / -1; }
.tracking-card .tc-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--line);
  margin-top: var(--sp-1);
}
.tracking-card .tc-actions button {
  flex: 1;
  min-height: 40px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 140ms var(--ease-out), color 140ms var(--ease-out), border-color 140ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.tracking-card .tc-actions button:active { background: var(--green-50); }
.tracking-card .tc-actions button.danger:active { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
@media (hover: hover) {
  .tracking-card .tc-actions button:hover { background: var(--green-50); color: var(--green-700); border-color: var(--green-200); }
  .tracking-card .tc-actions button.danger:hover { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
}
.tracking-card .tc-actions button svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ---------- TABLE (kept for any other future use) ---------- */
.tbl-wrap {
  border: 1.5px solid var(--green-200);
  border-radius: var(--r-lg);
  background: #fff;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tbl {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.tbl th, .tbl td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}
@media (min-width: 640px) {
  .tbl th, .tbl td { padding: 14px 18px; }
}
.tbl th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-700);
  background: var(--green-50);
}
.tbl tr:last-child td { border-bottom: none; }
.tbl td.mono { font-family: var(--font-mono); color: var(--ink-2); letter-spacing: 0.04em; font-feature-settings: 'tnum'; }
.tbl tr.row-link { cursor: pointer; transition: background 130ms var(--ease-out); }
@media (hover: hover) {
  .tbl tr.row-link:hover { background: var(--green-50); }
}
.tbl td .actions { display: flex; gap: 4px; justify-content: flex-end; }
.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-3);
  transition: background 140ms var(--ease-out), color 140ms var(--ease-out), border-color 140ms var(--ease-out);
}
@media (hover: hover) {
  .icon-btn:hover { background: var(--green-50); color: var(--green-700); border-color: var(--green-200); }
  .icon-btn.danger:hover { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
}
.icon-btn:active { background: var(--green-50); }
.icon-btn svg { width: 14px; height: 14px; }

.demo-tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: #fef3c7;
  color: #92400e;
  margin-left: var(--sp-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  font-weight: 700;
  vertical-align: middle;
}

.empty-tbl {
  padding: var(--sp-8) var(--sp-5);
  text-align: center;
  color: var(--ink-3);
  font-size: var(--fs-sm);
}
.empty-tbl strong { color: var(--green-600); display: block; font-size: var(--fs-md); margin-bottom: 4px; font-weight: 700; }

/* ---------- DRAWER ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 35, 28, 0.5);
  backdrop-filter: blur(3px);
  z-index: var(--z-overlay);
  display: none;
  align-items: stretch;
  justify-content: stretch;
  opacity: 0;
  transition: opacity 240ms var(--ease-out);
}
@media (min-width: 640px) { .overlay { justify-content: flex-end; } }
.overlay.is-open { display: flex; opacity: 1; }
.drawer {
  width: 100%;
  background: #fff;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* mobile = bottom sheet feel, slides up from bottom */
  padding: var(--sp-4) var(--sp-4);
  padding-top: max(var(--sp-4), env(safe-area-inset-top));
  padding-bottom: max(var(--sp-8), calc(var(--sp-5) + env(safe-area-inset-bottom)));
  padding-left: max(var(--sp-4), env(safe-area-inset-left));
  padding-right: max(var(--sp-4), env(safe-area-inset-right));
  transform: translateY(24px);
  opacity: 0;
  transition: transform 320ms var(--ease-out-strong), opacity 280ms var(--ease-out);
}
@media (min-width: 640px) {
  .drawer {
    width: min(560px, 100%);
    padding: var(--sp-6) var(--sp-6) var(--sp-9);
    transform: translateX(24px); /* slides from right on tablet+ */
  }
}
.overlay.is-open .drawer { transform: none; opacity: 1; }
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-5);
}
.drawer-head h2 { margin: 0; font-size: var(--fs-md); color: var(--green-600); font-weight: 700; }
.drawer-head .close {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--ink-3);
}
@media (hover: hover) { .drawer-head .close:hover { background: var(--surface-3); color: var(--ink); } }
.drawer-head .close { min-width: 44px; min-height: 44px; }
.drawer-head .close svg { width: 14px; height: 14px; }

.code-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--green-50);
  border: 1px solid var(--green-200);
  color: var(--green-700);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-5);
}
.code-banner .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.code-banner .code { font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.04em; font-feature-settings: 'tnum'; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}
.form-grid .col-full { grid-column: 1; }
@media (min-width: 540px) {
  .form-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
  .form-grid .col-full { grid-column: 1 / -1; }
}

/* ============ FORM SECTIONS (admin form clear separation) ============ */
.form-section {
  background: var(--green-50);
  border-radius: 14px;
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.form-section:last-of-type { margin-bottom: 0; }
.form-section-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.form-section-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--green-500);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.form-section-ico.s-amber { background: #f59e0b; }
.form-section-ico.s-info { background: #3b82f6; }
.form-section-ico svg { width: 20px; height: 20px; }
.form-section-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.form-section-head h4 .optional-tag {
  font-size: 10px;
  font-weight: 600;
  background: var(--green-100);
  color: var(--green-700);
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-section-head p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.3;
}
.form-section .form-grid .field input,
.form-section .form-grid .field select,
.form-section .form-grid .field textarea {
  background: #fff;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}

textarea.input { min-height: 88px; resize: vertical; line-height: 1.5; border-radius: var(--r-md); }
select.input {
  border-radius: var(--r-md);
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.drawer-section { margin-top: var(--sp-6); }
.drawer-section h3 {
  font-size: var(--fs-sm);
  color: var(--green-600);
  font-weight: 700;
  margin: 0 0 var(--sp-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-section h3 .count {
  font-size: 11px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.history-list { list-style: none; margin: 0; padding: 0; position: relative; }
.history-list::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 1.5px;
  background: var(--green-200);
}
.history-item {
  padding: 0 0 var(--sp-3) 26px;
  position: relative;
  font-size: var(--fs-sm);
}
.history-item::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 5px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--green-200);
}
.history-item.is-latest::before { border-color: var(--green-500); background: var(--green-500); box-shadow: 0 0 0 2px #fff; }
.history-item .row1 { display: flex; gap: var(--sp-3); justify-content: space-between; align-items: center; }
.history-item .when { font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); letter-spacing: 0.02em; font-feature-settings: 'tnum'; }
.history-item .stat { font-weight: 600; color: var(--ink); }
.history-item .note { color: var(--ink-3); margin-top: 2px; font-size: 13px; line-height: 1.4; }
.history-item .note strong { color: var(--ink-2); font-weight: 600; }
.history-item .del {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-4);
  padding: 2px 4px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
@media (hover: hover) { .history-item .del:hover { color: #991b1b; } }
.history-item .del { min-height: 32px; padding: 8px 6px; }

/* Edit/Remove buttons per history item */
.hist-actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}
.hist-btn {
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--ink-2);
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  font-family: var(--font);
  transition: background 140ms var(--ease-out), color 140ms var(--ease-out), border-color 140ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.hist-btn:active { transform: translateY(1px); }
.hist-edit:active { background: var(--green-50); color: var(--green-700); border-color: var(--green-200); }
.hist-del:active { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
@media (hover: hover) {
  .hist-edit:hover { background: var(--green-50); color: var(--green-700); border-color: var(--green-200); }
  .hist-del:hover { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
}

.history-edit {
  background: var(--green-50);
  border-radius: 12px;
  padding: var(--sp-3);
  margin-top: var(--sp-2);
}
.history-edit .field input,
.history-edit .field select {
  background: #fff;
  padding: 10px 12px;
  min-height: 40px;
  font-size: 14px;
}
.history-edit .field label { font-size: 11.5px; }

/* ---------- TOAST + SKELETON ---------- */
.toast-host {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  z-index: var(--z-toast);
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: #fff;
  padding: 11px 16px;
  font-size: var(--fs-sm);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-3);
  max-width: 320px;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px);
  animation: toastIn 280ms var(--ease-out-strong) forwards;
}
.toast.is-error { background: #991b1b; }
@keyframes toastIn { to { opacity: 1; transform: translateY(0); } }

.skeleton {
  background: linear-gradient(90deg, var(--surface-3) 0%, #fff 50%, var(--surface-3) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: var(--r-md);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.hidden { display: none !important; }

/* ============================================================
   TRACK PAGE — premium mobile-first redesign
   ============================================================ */

.track-page { background: var(--surface-2); }

/* nav-compact: deprecated, replaced by nav-centered (logo centralized + larger) */

.nav-back {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-700);
  display: grid;
  place-items: center;
  border: 1px solid var(--green-100);
  transition: background 140ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.nav-back:active { background: var(--green-100); }
@media (hover: hover) { .nav-back:hover { background: var(--green-100); } }
.nav-back svg { width: 18px; height: 18px; }

.track-main {
  padding-top: var(--sp-4);
  padding-bottom: var(--sp-7);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
@media (min-width: 768px) {
  .track-main { padding-top: var(--sp-6); padding-bottom: var(--sp-9); gap: var(--sp-5); max-width: 760px; }
}

/* HERO STATUS CARD — elevation, no fake 1px border */
.hero-card {
  background: #fff;
  border: none;
  border-radius: 22px;
  padding: var(--sp-5);
  box-shadow:
    0 0 0 1px rgba(20, 50, 30, 0.04),
    0 1px 3px rgba(20, 50, 30, 0.04),
    0 12px 32px -16px rgba(20, 50, 30, 0.12);
  position: relative;
  overflow: hidden;
}
@media (min-width: 480px) { .hero-card { padding: var(--sp-6); } }
/* No decorative top bar — clean card edge */
.hero-card::before { content: none; }

.hc-code-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.hc-code { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.hc-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
}
.hc-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  font-feature-settings: 'tnum';
  word-break: break-all;
}
@media (min-width: 480px) { .hc-value { font-size: 20px; } }
.hc-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-50);
  border: 1px solid var(--green-200);
  color: var(--green-700);
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
  flex-shrink: 0;
  transition: background 140ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.hc-copy:active { background: var(--green-100); }
@media (hover: hover) { .hc-copy:hover { background: var(--green-100); } }
.hc-copy svg { width: 15px; height: 15px; }
@media (max-width: 380px) {
  .hc-copy-label { display: none; }
  .hc-copy { padding: 9px 11px; }
}

/* PROGRESS STEPPER */
.stepper {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--sp-5);
}
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.step-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--line-2);
  position: relative;
  transition: background 280ms var(--ease-out), border-color 280ms var(--ease-out);
}
.step-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-align: center;
}
@media (min-width: 480px) {
  .step-label { font-size: 11.5px; }
  .step-dot { width: 16px; height: 16px; border-width: 2.5px; }
}
.step-line {
  height: 2px;
  background: var(--line-2);
  border-radius: 999px;
  transition: background 280ms var(--ease-out);
}

.step.is-done .step-dot { background: var(--green-500); border-color: var(--green-500); }
.step.is-done .step-label { color: var(--green-700); }
.step-line.is-done { background: var(--green-500); }
.step.is-current .step-dot {
  background: var(--green-500);
  border-color: var(--green-500);
  width: 18px;
  height: 18px;
  box-shadow: 0 0 0 4px var(--green-100), 0 0 0 6px var(--green-50);
}
.step.is-current .step-label { color: var(--green-700); font-weight: 700; }
@media (min-width: 480px) {
  .step.is-current .step-dot { width: 20px; height: 20px; }
}

.hero-card.s-warn .step.is-current .step-dot { background: #f59e0b; border-color: #f59e0b; box-shadow: 0 0 0 4px #fef3c7, 0 0 0 6px #fffbeb; }
.hero-card.s-warn .step.is-current .step-label { color: #92400e; }
.hero-card.s-warn .step.is-done .step-dot { background: var(--green-500); border-color: var(--green-500); }
.hero-card.s-danger .step.is-current .step-dot { background: #dc2626; border-color: #dc2626; box-shadow: 0 0 0 4px #fee2e2, 0 0 0 6px #fef2f2; }
.hero-card.s-danger .step.is-current .step-label { color: #991b1b; }

/* BIG STATUS — illustration sits free, no fake frame */
.status-big { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.status-icon {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
}
.status-icon img,
.status-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (min-width: 480px) {
  .status-icon { width: 116px; height: 116px; }
}
.status-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.status-title { font-size: 22px; font-weight: 700; line-height: 1.18; letter-spacing: -0.018em; color: var(--ink); margin: 0; }
@media (min-width: 480px) { .status-title { font-size: 26px; } }
.status-ago { font-size: 13px; color: var(--ink-3); margin: 0; font-feature-settings: 'tnum'; }

/* ETA */
.eta-block {
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: 14px;
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.hero-card.s-warn .eta-block { background: #fef3c7; border-color: #fde68a; }
.hero-card.s-danger .eta-block { background: #fee2e2; border-color: #fecaca; }
.eta-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(43, 200, 102, 0.18);
  color: var(--green-700);
  display: grid;
  place-items: center;
}
.eta-icon svg { width: 20px; height: 20px; }
.hero-card.s-warn .eta-icon { background: rgba(245, 158, 11, 0.18); color: #92400e; }
.hero-card.s-danger .eta-icon { background: rgba(220, 38, 38, 0.18); color: #991b1b; }
.eta-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.eta-label { font-size: 11px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.01em; }
.eta-date { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -0.005em; }
@media (min-width: 480px) { .eta-date { font-size: 16px; } }

.demo-pill {
  margin-top: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
}
.demo-pill svg { width: 16px; height: 16px; flex-shrink: 0; }

/* INFO CARD — elevation, no fake border */
.info-card {
  background: #fff;
  border: none;
  border-radius: 18px;
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow:
    0 0 0 1px rgba(20, 50, 30, 0.04),
    0 1px 3px rgba(20, 50, 30, 0.04),
    0 8px 20px -12px rgba(20, 50, 30, 0.1);
}
@media (min-width: 480px) { .info-card { padding: var(--sp-5); } }
.info-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: var(--sp-3);
  letter-spacing: 0;
  text-transform: none;
}
.info-card-ico {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--green-50);
  color: var(--green-700);
  display: grid;
  place-items: center;
}
.info-card-ico svg { width: 18px; height: 18px; }
.info-name { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 4px; line-height: 1.3; letter-spacing: -0.005em; }
.info-line { font-size: 14.5px; color: var(--ink-2); margin: 0; line-height: 1.55; }
.info-line .mono { font-family: var(--font-mono); font-feature-settings: 'tnum'; letter-spacing: 0.04em; }
.info-product {
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.info-product-ico {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #fef3c7;
  color: #92400e;
  display: grid;
  place-items: center;
}
.info-product-ico svg { width: 18px; height: 18px; }
.info-product-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.info-product-label { font-size: 11.5px; font-weight: 600; color: var(--ink-4); letter-spacing: 0; text-transform: none; }
.info-product-value { font-size: 14.5px; color: var(--ink); line-height: 1.45; font-weight: 500; }

/* TIMELINE CARD — elevation, no fake border */
.tl-card {
  background: #fff;
  border: none;
  border-radius: 18px;
  padding: var(--sp-5);
  box-shadow:
    0 0 0 1px rgba(20, 50, 30, 0.04),
    0 1px 3px rgba(20, 50, 30, 0.04),
    0 8px 20px -12px rgba(20, 50, 30, 0.1);
}
.tl-card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--sp-4); }
.tl-card-head h2 { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0; letter-spacing: -0.005em; }
.tl-count { font-size: 11px; font-weight: 600; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.06em; font-feature-settings: 'tnum'; }

.tl-card .tl-list { position: relative; margin: 0; padding: 0; list-style: none; }
.tl-card .tl-list::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line-2);
  border-radius: 999px;
}

.tl-day-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  margin: var(--sp-4) 0 var(--sp-3) 42px;
  position: relative;
}
.tl-day-header:first-child { margin-top: 0; }

.tl-event {
  position: relative;
  padding: 0 0 var(--sp-4) 42px;
  opacity: 0;
  transform: translateY(6px);
  animation: tlEvtIn 480ms var(--ease-out-strong) forwards;
  animation-delay: calc(var(--i, 0) * 50ms);
}
@keyframes tlEvtIn { to { opacity: 1; transform: translateY(0); } }
.tl-event:last-child { padding-bottom: 4px; }

.tl-event .tl-marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--line-2);
  display: grid;
  place-items: center;
  color: var(--ink-4);
  z-index: 1;
  transition: all 200ms var(--ease-out);
}
.tl-event .tl-marker svg { width: 14px; height: 14px; stroke-width: 2; }

.tl-event.is-latest .tl-marker {
  background: var(--green-500);
  border-color: var(--green-500);
  color: #fff;
  box-shadow: 0 0 0 4px var(--green-100), 0 0 0 6px var(--green-50);
}
.tl-event.is-latest.s-warn .tl-marker { background: #f59e0b; border-color: #f59e0b; box-shadow: 0 0 0 4px #fef3c7, 0 0 0 6px #fffbeb; }
.tl-event.is-latest.s-danger .tl-marker { background: #dc2626; border-color: #dc2626; box-shadow: 0 0 0 4px #fee2e2, 0 0 0 6px #fef2f2; }

.tl-event.s-warn:not(.is-latest) .tl-marker { border-color: #fbbf24; color: #92400e; background: #fef3c7; }
.tl-event.s-danger:not(.is-latest) .tl-marker { border-color: #fca5a5; color: #991b1b; background: #fee2e2; }
.tl-event.s-success:not(.is-latest) .tl-marker { border-color: var(--green-300); color: var(--green-700); background: var(--green-50); }

.tl-event .tl-stat {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin: 4px 0 4px;
}
.tl-event.is-latest .tl-stat { font-size: 16px; font-weight: 700; }
.tl-event .tl-when {
  font-size: 12.5px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-feature-settings: 'tnum';
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.tl-event .tl-when .dot { width: 3px; height: 3px; background: var(--line-2); border-radius: 50%; }
.tl-event .tl-loc { color: var(--ink-3); font-family: var(--font); letter-spacing: 0; font-size: 12.5px; }
.tl-event .tl-note { margin-top: 6px; font-size: 13.5px; color: var(--ink-3); line-height: 1.5; max-width: 56ch; }

/* FOOTNOTE */
.track-footnote {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-4);
  line-height: 1.5;
  padding: var(--sp-3) var(--sp-2);
  max-width: 56ch;
  margin: 0 auto;
  text-align: left;
}
.track-footnote svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; color: var(--green-600); }

.track-footer {
  text-align: center;
  padding: var(--sp-4) 0;
  padding-bottom: max(var(--sp-4), env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.track-footer .brand-text-foot { font-size: 11.5px; color: var(--ink-4); }

/* EMPTY/ERROR */
.empty-state {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: var(--sp-7) var(--sp-5);
  text-align: center;
  margin-top: var(--sp-5);
}
.empty-state .empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--green-50);
  color: var(--green-700);
  margin: 0 auto var(--sp-4);
  display: grid;
  place-items: center;
}
.empty-state .empty-icon svg { width: 28px; height: 28px; }
.empty-state h2 { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 var(--sp-2); }
.empty-state p { font-size: 14px; color: var(--ink-3); line-height: 1.5; max-width: 42ch; margin: 0 auto var(--sp-5); }

.hero-card-loading { padding-top: calc(var(--sp-5) + 4px); }

/* ============================================================
   QUICK RENAME — collapsible "Alterar código de rastreio"
   ============================================================ */
.quick-rename {
  margin: var(--sp-4) 0;
  background: #fff;
  border: 1px solid var(--green-100);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(20, 50, 30, 0.04),
    0 1px 3px rgba(20, 50, 30, 0.04),
    0 6px 14px -10px rgba(20, 50, 30, 0.08);
  overflow: hidden;
}
.quick-rename > summary {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.quick-rename > summary::-webkit-details-marker { display: none; }
.quick-rename .qr-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(43, 200, 102, 0.14);
  color: var(--green-700);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.quick-rename .qr-ico svg { width: 18px; height: 18px; }
.quick-rename .qr-title { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.quick-rename .qr-title strong {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.quick-rename .qr-title small {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 400;
}
.quick-rename .qr-chev {
  width: 28px;
  height: 28px;
  color: var(--ink-4);
  display: grid;
  place-items: center;
  transition: transform 200ms var(--ease-out);
}
.quick-rename .qr-chev svg { width: 18px; height: 18px; }
.quick-rename[open] > summary .qr-chev { transform: rotate(180deg); }
.quick-rename[open] > summary { background: var(--green-50); border-bottom: 1px solid var(--green-100); }

.quick-rename .qr-body {
  padding: var(--sp-4);
  background: var(--green-50);
}
.quick-rename .qr-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--sp-3);
  align-items: end;
}
@media (max-width: 540px) {
  .quick-rename .qr-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }
  .quick-rename .qr-arrow { display: none; }
}
.quick-rename .qr-arrow {
  display: grid;
  place-items: center;
  height: 48px;
  color: var(--green-600);
}
.quick-rename .qr-arrow svg { width: 22px; height: 22px; }

.quick-rename .field input.input { background: #fff; }
.quick-rename .field input.is-mono {
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  font-weight: 600;
  font-feature-settings: 'tnum';
}

.quick-rename .qr-feedback {
  margin-top: var(--sp-3);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
}
.quick-rename .qr-feedback.qr-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.quick-rename .qr-feedback.qr-success {
  background: var(--green-100);
  color: var(--green-700);
  border: 1px solid var(--green-200);
}

.quick-rename .qr-actions {
  margin-top: var(--sp-3);
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.quick-rename .qr-actions .btn-sm,
.quick-rename .qr-actions .btn-ghost { min-height: 40px; }

/* ============================================================
   SUPORTE — seção na home (rodapé) + drawer no admin
   ============================================================ */

/* --- Home: seção de suporte --- */
.support-section {
  padding: var(--sp-7) 0 var(--sp-8);
  background: var(--green-50);
}
@media (min-width: 768px) { .support-section { padding: var(--sp-9) 0; } }
.support-card {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: 22px;
  padding: var(--sp-5);
  box-shadow:
    0 0 0 1px rgba(20, 50, 30, 0.04),
    0 1px 3px rgba(20, 50, 30, 0.04),
    0 14px 40px -18px rgba(20, 50, 30, 0.14);
}
@media (min-width: 768px) { .support-card { padding: var(--sp-7); } }
.support-intro { text-align: center; margin-bottom: var(--sp-5); }
.support-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  margin-bottom: var(--sp-3);
}
.support-badge svg { width: 14px; height: 14px; }
.support-intro h2 {
  font-size: clamp(22px, 5vw, 30px);
  color: var(--green-600);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 var(--sp-2);
}
.support-intro p {
  font-size: 14.5px;
  color: var(--ink-3);
  line-height: 1.5;
  max-width: 44ch;
  margin: 0 auto;
}
.support-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}
@media (min-width: 560px) { .support-grid { grid-template-columns: 1fr 1fr; } }
.support-form .field { margin-bottom: var(--sp-3); display: flex; flex-direction: column; gap: 6px; }
.support-form .field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.support-form .field .hint { font-weight: 400; color: var(--ink-4); }
.input-rounded { border-radius: var(--r-md); min-height: 48px; }
textarea.input-rounded { min-height: 110px; padding: 13px 16px; resize: vertical; line-height: 1.5; }

/* Select estilizado (assunto) */
.select-wrap { position: relative; }
.select-wrap select.input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  padding-right: 44px;
  cursor: pointer;
  background-image: none;
  font-size: 16px;
}
.select-wrap select.input:invalid { color: var(--ink-4); }
.select-chev {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--green-600);
  pointer-events: none;
}
.support-submit { width: 100%; margin-top: var(--sp-2); padding: 14px; min-height: 52px; font-size: 15px; }
.support-feedback {
  padding: 11px 14px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: var(--sp-3);
}
.support-feedback.support-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.support-feedback.support-success { background: var(--green-100); color: var(--green-700); border: 1px solid var(--green-200); }

/* --- Admin: botão Suporte + badge --- */
.btn-support { position: relative; }
.support-badge-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
  margin-left: 2px;
}

/* --- Admin: drawer de suporte --- */
.support-drawer-sub {
  font-size: 13px;
  color: var(--ink-3);
  margin: 0 0 var(--sp-4);
  line-height: 1.45;
}
.support-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.sup-card {
  background: #fff;
  border-radius: 14px;
  padding: var(--sp-4);
  box-shadow:
    0 0 0 1px rgba(20, 50, 30, 0.05),
    0 1px 3px rgba(20, 50, 30, 0.04);
}
.sup-card.is-new { box-shadow: 0 0 0 1.5px var(--green-300), 0 1px 3px rgba(20, 50, 30, 0.04); }
.sup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}
.sup-name { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.sup-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}
.sup-code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--green-700);
  background: var(--green-50);
  border: 1px solid var(--green-200);
  padding: 3px 8px;
  border-radius: 6px;
  text-decoration: none;
  font-feature-settings: 'tnum';
}
.sup-code-empty { color: var(--ink-4); background: var(--surface-3); border-color: var(--line); font-weight: 500; }
.sup-when { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-4); font-feature-settings: 'tnum'; }
.sup-subject {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-700);
  background: var(--green-50);
  border: 1px solid var(--green-200);
  border-radius: 8px;
  padding: 6px 12px;
  margin-bottom: var(--sp-2);
  line-height: 1.3;
}
.sup-message {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0 0 var(--sp-3);
  white-space: pre-wrap;
  word-break: break-word;
}
.sup-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.sup-btn {
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--ink-2);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  transition: background 140ms var(--ease-out), color 140ms var(--ease-out), border-color 140ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.sup-btn:active { transform: translateY(1px); }
.sup-resolve:active, .sup-reopen:active { background: var(--green-50); color: var(--green-700); border-color: var(--green-200); }
.sup-del:active { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
@media (hover: hover) {
  .sup-resolve:hover, .sup-reopen:hover { background: var(--green-50); color: var(--green-700); border-color: var(--green-200); }
  .sup-del:hover { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
}
.support-empty {
  text-align: center;
  padding: var(--sp-7) var(--sp-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.support-empty-ico {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--green-50);
  color: var(--green-600);
  display: grid;
  place-items: center;
  margin-bottom: var(--sp-2);
}
.support-empty-ico svg { width: 26px; height: 26px; }
.support-empty strong { font-size: 15px; color: var(--ink); font-weight: 700; }
.support-empty span { font-size: 13px; color: var(--ink-3); max-width: 32ch; }

/* ============================================================
   ABAS DO ADMIN + MONITOR DE ENTREGAS + ROTAS AUTOMÁTICAS
   ============================================================ */

/* Seletor de abas */
.admin-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  padding: 4px;
  margin: 0 0 var(--sp-5);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-tab {
  padding: 9px 16px;
  border: none;
  background: transparent;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--ink-3);
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms var(--ease-out), color 140ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.admin-tab.is-active { background: #fff; color: var(--green-700); box-shadow: 0 1px 3px rgba(20,50,30,0.1); }
@media (hover: hover) { .admin-tab:not(.is-active):hover { color: var(--ink); } }
@media (max-width: 540px) { .admin-tab { padding: 9px 12px; font-size: var(--fs-xs); } }

/* Cabeçalho de monitor/rotas */
.monitor-head { margin-bottom: var(--sp-4); }
.monitor-head h2 { font-size: var(--fs-lg); color: var(--green-600); font-weight: 700; margin: 0 0 4px; }
.monitor-head p { font-size: var(--fs-sm); color: var(--ink-3); margin: 0; line-height: 1.5; }

/* Buckets do monitor */
.monitor-bucket { margin-bottom: var(--sp-5); }
.monitor-bucket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--line);
}
.monitor-bucket.b-late .monitor-bucket-head { color: #991b1b; border-color: #fecaca; }
.monitor-bucket.b-today .monitor-bucket-head { color: var(--green-700); border-color: var(--green-200); }
.monitor-bucket.stuck .monitor-bucket-head { color: #92400e; border-color: #fde68a; }
.monitor-bucket-head .mon-count {
  font-family: var(--font-mono);
  background: var(--surface-3);
  color: var(--ink-2);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
}
.monitor-cards { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
@media (min-width: 720px) { .monitor-cards { grid-template-columns: 1fr 1fr; } }

.mon-card {
  background: #fff;
  border-radius: var(--r-md);
  padding: var(--sp-4);
  box-shadow: 0 0 0 1px rgba(20,50,30,0.05), 0 1px 3px rgba(20,50,30,0.04);
  cursor: pointer;
  transition: box-shadow 160ms var(--ease-out), transform 140ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.mon-card:active { transform: translateY(1px); }
@media (hover: hover) { .mon-card:hover { box-shadow: 0 0 0 1px var(--green-200), 0 6px 16px -8px rgba(20,50,30,0.15); } }
.mon-card-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: 6px; }
.mon-code { font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: 0.03em; color: var(--ink); font-feature-settings: 'tnum'; }
.mon-name { font-size: 14.5px; font-weight: 600; color: var(--ink); margin: 0 0 4px; }
.mon-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.mon-days { font-weight: 600; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.mon-days.late { background: #fee2e2; color: #991b1b; }
.mon-days.today { background: var(--green-100); color: var(--green-700); }
.mon-days.soon { background: #fef3c7; color: #92400e; }

/* Rotas automáticas */
.routes-list { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-4); }
.auto-route-card {
  background: #fff;
  border-radius: var(--r-md);
  padding: var(--sp-4);
  box-shadow: 0 0 0 1px rgba(20,50,30,0.05), 0 1px 3px rgba(20,50,30,0.04);
}
.ar-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: 6px; }
.ar-code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--green-700);
  background: var(--green-50);
  border: 1px solid var(--green-200);
  padding: 3px 9px;
  border-radius: 6px;
  text-decoration: none;
  font-feature-settings: 'tnum';
}
.ar-name { font-size: 14.5px; font-weight: 600; color: var(--ink); margin: 0 0 2px; }
.ar-route { font-size: 13px; color: var(--ink-2); margin: 0 0 var(--sp-3); }
.ar-route .ar-arrow { color: var(--green-600); font-weight: 700; margin: 0 4px; }
.ar-progress {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  background: var(--green-50);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin-bottom: var(--sp-3);
}
.ar-step { font-size: 12px; font-weight: 700; color: var(--green-700); text-transform: uppercase; letter-spacing: 0.04em; }
.ar-next { font-size: 13px; color: var(--ink-3); }
.ar-next strong { color: var(--ink); font-weight: 600; }
.ar-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.ar-advance { background: var(--green-50) !important; color: var(--green-700) !important; border-color: var(--green-200) !important; }
.ar-del:active { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
@media (hover: hover) { .ar-del:hover { background: #fee2e2; color: #991b1b; border-color: #fecaca; } }

/* Data de chegada no card + destaque "chegando em breve" */
.ar-arrival { display: inline-block; font-size: 12.5px; color: var(--ink-3); margin: 0 0 var(--sp-3); }
.ar-arrival.soon { color: #b45309; font-weight: 700; }
.auto-route-card.is-soon { box-shadow: 0 0 0 1.5px #fcd34d, 0 1px 3px rgba(180,83,9,0.12); }

/* Banner de alerta: chegando em ≤5 dias */
.ar-alert {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--r-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
}
.ar-alert-head { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: #92400e; }
.ar-alert-ico { font-size: 16px; }
.ar-alert-sub { font-size: 12.5px; color: #b45309; margin: 6px 0 10px; line-height: 1.45; }
.ar-alert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ar-alert-list li { font-size: 13px; color: var(--ink-2); padding: 8px 10px; background: #fff; border-radius: var(--r-sm); border: 1px solid #fef3c7; }
.ar-alert-list strong { font-family: var(--font-mono); color: var(--green-700); }
.ar-alert-when { color: #b45309; font-weight: 700; }

/* Dica curta sob um campo do formulário */
.field-hint { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 4px; line-height: 1.4; }

/* Destino auto-preenchido (read-only) no form de rota automática */
.ar-dest-box { font-size: 14px; font-weight: 600; color: var(--green-700); background: var(--green-50); border: 1px solid var(--green-200); border-radius: var(--r-sm); padding: 10px 12px; }

/* Rota criada num template antigo (congelada por segurança) */
.auto-route-card.is-outdated { box-shadow: 0 0 0 1.5px #fca5a5, 0 1px 3px rgba(153,27,27,0.10); }
.ar-outdated { font-size: 12px; color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--r-sm); padding: 8px 10px; margin: 0 0 var(--sp-3); line-height: 1.45; }

/* Rota retida "Em análise na PF" (parada, aguardando liberação manual) */
.auto-route-card.is-held { box-shadow: 0 0 0 1.5px #fdba74, 0 1px 3px rgba(180,83,9,0.10); }
.ar-held { font-size: 12px; color: #9a3412; background: #fff7ed; border: 1px solid #fed7aa; border-radius: var(--r-sm); padding: 8px 10px; margin: 0 0 var(--sp-3); line-height: 1.45; }
.ar-held strong { color: #7c2d12; }

/* Rota APREENDIDA (3+ dias úteis na PF sem liberação) */
.auto-route-card.is-seized { box-shadow: 0 0 0 1.5px #fca5a5, 0 1px 3px rgba(153,27,27,0.12); }
.ar-seized { font-size: 12px; color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--r-sm); padding: 8px 10px; margin: 0 0 var(--sp-3); line-height: 1.45; }
.ar-seized strong { color: #7f1d1d; }
