/* ================================================================
   FREIGHT GROUP — Design System
   Paleta: Navy Blue #1B3A6B + Gold #F5A623
   Tipografía: Plus Jakarta Sans
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --primary:       #1B3A6B;
  --primary-dark:  #0D2240;
  --primary-light: #2952A3;
  --primary-faint: #EEF3FB;
  --accent:        #F5A623;
  --accent-dark:   #D4861A;
  --accent-light:  #FEF3DC;

  --success:       #10B981;
  --success-bg:    #D1FAE5;
  --warning:       #F59E0B;
  --warning-bg:    #FEF3C7;
  --danger:        #EF4444;
  --danger-bg:     #FEE2E2;
  --info:          #3B82F6;
  --info-bg:       #DBEAFE;

  --bg:            #F0F4FA;
  --bg-white:      #FFFFFF;
  --text:          #0D1B2A;
  --text-muted:    #64748B;
  --text-light:    #94A3B8;
  --border:        #E2E8F0;
  --border-dark:   #CBD5E1;

  --shadow-sm:  0 1px 3px rgba(13,34,64,.08), 0 1px 2px rgba(13,34,64,.06);
  --shadow:     0 4px 16px rgba(13,34,64,.10);
  --shadow-md:  0 8px 32px rgba(13,34,64,.14);
  --shadow-lg:  0 20px 60px rgba(13,34,64,.18);

  --radius-sm:  6px;
  --radius:     10px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --transition: all .2s cubic-bezier(.4,0,.2,1);
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;

  --nav-h: 68px;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: var(--font); cursor: pointer; border: none; outline: none; }
input, select, textarea { font-family: var(--font); outline: none; border: none; }

/* ── Typography ─────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p  { color: var(--text-muted); line-height: 1.7; }

/* ── Layout helpers ─────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container--sm { max-width: 780px; margin: 0 auto; padding: 0 1.5rem; }
.container--xs { max-width: 480px; margin: 0 auto; padding: 0 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.25rem; }
.flex    { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* ── Navbar ─────────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--primary-dark);
  border-bottom: 2px solid rgba(245,166,35,.25);
  backdrop-filter: blur(12px);
  display: flex; align-items: center;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.navbar__logo {
  display: flex; align-items: center; gap: .75rem;
}
.navbar__logo img { height: 36px; width: auto; }
.navbar__logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.navbar__logo-text span:first-child {
  font-size: 1.1rem; font-weight: 800; color: #fff; letter-spacing: -.02em;
}
.navbar__logo-text span:last-child {
  font-size: .65rem; font-weight: 500; color: var(--accent); letter-spacing: .12em; text-transform: uppercase;
}
.navbar__links { display: flex; align-items: center; gap: .25rem; }
.navbar__links a {
  padding: .5rem .875rem; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; color: rgba(255,255,255,.75);
  transition: var(--transition);
}
.navbar__links a:hover, .navbar__links a.active {
  color: #fff; background: rgba(255,255,255,.1);
}
.navbar__actions { display: flex; align-items: center; gap: .75rem; }
.navbar__burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; padding: .5rem;
}
.navbar__burger span {
  display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: var(--transition);
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .625rem 1.375rem; border-radius: var(--radius);
  font-size: .9rem; font-weight: 600; letter-spacing: .01em;
  transition: var(--transition); cursor: pointer;
  white-space: nowrap;
}
.btn--primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 8px rgba(27,58,107,.35);
}
.btn--primary:hover { background: var(--primary-light); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(27,58,107,.4); }
.btn--accent {
  background: var(--accent); color: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(245,166,35,.35);
}
.btn--accent:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(245,166,35,.4); }
.btn--outline {
  background: transparent; color: var(--primary);
  border: 2px solid var(--primary);
}
.btn--outline:hover { background: var(--primary-faint); }
.btn--outline-white {
  background: transparent; color: #fff;
  border: 2px solid rgba(255,255,255,.5);
}
.btn--outline-white:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn--ghost {
  background: transparent; color: var(--text-muted);
}
.btn--ghost:hover { background: var(--border); color: var(--text); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #dc2626; }
.btn--success { background: var(--success); color: #fff; }
.btn--sm { padding: .4rem .875rem; font-size: .8rem; }
.btn--lg { padding: .875rem 2rem; font-size: 1rem; }
.btn--xl { padding: 1.1rem 2.5rem; font-size: 1.1rem; border-radius: var(--radius-md); }
.btn--full { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

/* ── Cards ──────────────────────────────────────────────────────── */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card--flat { box-shadow: none; }
.card--dark {
  background: var(--primary-dark); color: #fff; border-color: rgba(255,255,255,.08);
}

/* ── Forms ──────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .375rem; }
.form-label {
  font-size: .8rem; font-weight: 600; color: var(--text); letter-spacing: .04em; text-transform: uppercase;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem; font-family: var(--font); color: var(--text);
  background: var(--bg-white);
  transition: var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(27,58,107,.12);
}
.form-input::placeholder { color: var(--text-light); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-select { appearance: none; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
.form-grid--3 { grid-template-columns: repeat(3,1fr); }
.form-section-title {
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-light); margin-bottom: .75rem;
  display: flex; align-items: center; gap: .5rem;
}
.form-section-title::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: .25rem; }
.form-error { font-size: .78rem; color: var(--danger); margin-top: .25rem; display: none; }
.form-error.visible { display: block; }

/* ── Badges & Status ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .75rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600; letter-spacing: .03em;
}
.badge--registrado  { background: #F1F5F9; color: #475569; }
.badge--recolectado { background: var(--info-bg); color: var(--info); }
.badge--transito    { background: #EDE9FE; color: #7C3AED; }
.badge--destino     { background: var(--warning-bg); color: #D97706; }
.badge--listo       { background: var(--success-bg); color: #059669; }
.badge--entregado   { background: #D1FAE5; color: #047857; }
.badge--cancelado   { background: var(--danger-bg); color: var(--danger); }
.badge--express     { background: var(--accent-light); color: var(--accent-dark); }
.badge--economico   { background: var(--primary-faint); color: var(--primary); }
.badge--maritimo    { background: #CFFAFE; color: #0E7490; }
.badge--documentos  { background: #F3F4F6; color: #374151; }

.status-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}
.dot--registrado  { background: #94A3B8; }
.dot--recolectado { background: var(--info); }
.dot--transito    { background: #7C3AED; }
.dot--destino     { background: #D97706; }
.dot--listo       { background: var(--success); }
.dot--entregado   { background: #047857; }
.dot--cancelado   { background: var(--danger); }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, #1e4d9b 100%);
  position: relative; overflow: hidden;
  padding: 5rem 0 4rem;
  color: #fff;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero__inner { position: relative; z-index: 1; }
.hero__tag {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(245,166,35,.15); border: 1px solid rgba(245,166,35,.3);
  color: var(--accent); padding: .35rem .875rem; border-radius: 999px;
  font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.hero__title { font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1.15; margin-bottom: 1rem; }
.hero__title span { color: var(--accent); }
.hero__sub { font-size: 1.05rem; opacity: .8; max-width: 560px; margin-bottom: 2rem; color: rgba(255,255,255,.8); }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__graphic {
  position: absolute; right: -80px; top: 50%; transform: translateY(-50%);
  width: 520px; height: 520px; opacity: .06;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23ffffff' d='M100 10L180 55V145L100 190L20 145V55z'/%3E%3C/svg%3E");
}

/* ── Search / Tracker ────────────────────────────────────────────── */
.tracker-box {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  border: 1px solid var(--border);
}
.tracker-box__label {
  font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: .75rem;
}
.tracker-search {
  display: flex; gap: .75rem;
}
.tracker-search input {
  flex: 1; padding: .875rem 1.25rem;
  border: 2px solid var(--border); border-radius: var(--radius);
  font-size: 1rem; color: var(--text); background: var(--bg);
  transition: var(--transition);
}
.tracker-search input:focus { border-color: var(--primary); background: var(--bg-white); box-shadow: 0 0 0 3px rgba(27,58,107,.1); }
.tracker-search input::placeholder { color: var(--text-light); }

/* ── Section ─────────────────────────────────────────────────────── */
.section { padding: 4.5rem 0; }
.section--sm { padding: 3rem 0; }
.section--lg { padding: 6rem 0; }
.section-tag {
  font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--primary); margin-bottom: .6rem; display: block;
}
.section-title { margin-bottom: .75rem; }
.section-sub { max-width: 580px; }

/* ── Service Cards ───────────────────────────────────────────────── */
.service-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--primary); transform: scaleX(0);
  transition: var(--transition); transform-origin: left;
}
.service-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 64px; height: 64px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem; font-size: 1.75rem;
  background: var(--primary-faint);
}
.service-card h3 { margin-bottom: .5rem; font-size: 1.05rem; }
.service-card p { font-size: .88rem; }
.service-card .tag-tiempo {
  display: inline-block; margin-top: 1rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .05em;
  color: var(--accent-dark); background: var(--accent-light);
  padding: .2rem .7rem; border-radius: 999px;
}

/* ── Route pills ─────────────────────────────────────────────────── */
.routes-grid { display: flex; flex-wrap: wrap; gap: .75rem; }
.route-pill {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.1rem; border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg-white); font-size: .85rem; font-weight: 500;
  transition: var(--transition);
}
.route-pill:hover { border-color: var(--primary); background: var(--primary-faint); }
.route-pill .arrow { color: var(--accent); font-weight: 700; }

/* ── Stats ──────────────────────────────────────────────────────── */
.stat-card { text-align: center; }
.stat-number {
  font-size: 2.5rem; font-weight: 800; color: var(--primary);
  line-height: 1; margin-bottom: .25rem;
}
.stat-number span { color: var(--accent); }
.stat-label { font-size: .85rem; color: var(--text-muted); font-weight: 500; }

/* ── Timeline ─────────────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute; left: .75rem; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; padding-bottom: 1.75rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -2rem;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; font-weight: 700; border: 3px solid var(--bg);
  box-shadow: var(--shadow-sm); background: #E2E8F0; color: #94A3B8;
  z-index: 1;
}
.timeline-dot.done { background: var(--success); color: #fff; }
.timeline-dot.current { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(27,58,107,.2); }
.timeline-dot.pending { background: var(--bg); border-color: var(--border); }
.timeline-content { padding-left: .5rem; }
.timeline-content h4 { font-size: .95rem; margin-bottom: .2rem; }
.timeline-content p  { font-size: .82rem; margin: 0; }
.timeline-content .time { font-size: .75rem; color: var(--text-light); margin-top: .2rem; }

/* ── Table ──────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--primary-dark); }
thead th {
  padding: .875rem 1.25rem; text-align: left;
  font-size: .73rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: rgba(255,255,255,.75); white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--border); transition: var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg); }
tbody td { padding: .875rem 1.25rem; font-size: .88rem; vertical-align: middle; }
.td-guia { font-family: monospace; font-weight: 700; color: var(--primary); font-size: .9rem; }

/* ── Dashboard layout ────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px; flex-shrink: 0;
  background: var(--primary-dark);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar__head {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar__logo {
  display: flex; align-items: center; gap: .75rem;
}
.sidebar__logo img { height: 32px; }
.sidebar__logo-txt { display: flex; flex-direction: column; line-height: 1.1; }
.sidebar__logo-txt span:first-child { font-size: 1rem; font-weight: 800; color: #fff; }
.sidebar__logo-txt span:last-child { font-size: .6rem; color: var(--accent); letter-spacing: .1em; text-transform: uppercase; }

.sidebar__nav { padding: 1rem .75rem; flex: 1; }
.sidebar__section-label {
  font-size: .63rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.35); padding: .75rem .5rem .4rem; margin-top: .5rem;
}
.sidebar__link {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem .875rem; border-radius: var(--radius);
  font-size: .875rem; font-weight: 500; color: rgba(255,255,255,.65);
  transition: var(--transition); margin-bottom: .15rem;
}
.sidebar__link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar__link.active { background: rgba(245,166,35,.15); color: var(--accent); border: 1px solid rgba(245,166,35,.2); }
.sidebar__link .icon { font-size: 1.05rem; width: 20px; text-align: center; }
.sidebar__badge {
  margin-left: auto; background: var(--accent); color: var(--primary-dark);
  font-size: .68rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px;
}

.sidebar__footer {
  padding: 1rem .75rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar__user {
  display: flex; align-items: center; gap: .75rem;
  padding: .625rem .875rem; border-radius: var(--radius);
}
.sidebar__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-light); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .875rem; font-weight: 700; flex-shrink: 0;
}
.sidebar__user-info span:first-child { display: block; font-size: .85rem; font-weight: 600; color: #fff; }
.sidebar__user-info span:last-child { display: block; font-size: .72rem; color: rgba(255,255,255,.45); }

.main-content { flex: 1; min-width: 0; }
.topbar {
  background: var(--bg-white); border-bottom: 1px solid var(--border);
  padding: 1rem 2rem; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.topbar__title { font-size: 1.15rem; font-weight: 700; }
.topbar__actions { display: flex; align-items: center; gap: .75rem; }

.page-body { padding: 2rem; }

/* ── Stat widgets ─────────────────────────────────────────────────── */
.widget {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex; align-items: flex-start; gap: 1rem;
}
.widget__icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; flex-shrink: 0;
}
.widget__icon--blue   { background: var(--primary-faint); }
.widget__icon--gold   { background: var(--accent-light); }
.widget__icon--green  { background: var(--success-bg); }
.widget__icon--purple { background: #EDE9FE; }
.widget__num { font-size: 1.8rem; font-weight: 800; line-height: 1; margin-bottom: .2rem; }
.widget__label { font-size: .82rem; color: var(--text-muted); font-weight: 500; }
.widget__trend { font-size: .75rem; color: var(--success); font-weight: 600; margin-top: .25rem; }

/* ── Tracking page ───────────────────────────────────────────────── */
.tracking-card {
  background: var(--bg-white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  overflow: hidden;
}
.tracking-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 2rem 2.5rem; color: #fff;
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 1rem;
}
.tracking-guia { font-family: monospace; font-size: 1.5rem; font-weight: 800; letter-spacing: .05em; }
.tracking-meta { display: flex; gap: 2rem; flex-wrap: wrap; }
.tracking-meta-item { }
.tracking-meta-item .label { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; opacity: .6; margin-bottom: .2rem; }
.tracking-meta-item .value { font-size: .9rem; font-weight: 600; }

.tracking-body { padding: 2.5rem; }
.tracking-progress { margin-bottom: 2.5rem; }
.progress-steps {
  display: flex; align-items: center;
  position: relative;
}
.progress-step {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  position: relative; z-index: 1;
}
.progress-step__circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; margin-bottom: .5rem;
  border: 2px solid var(--border); background: var(--bg-white); color: var(--text-light);
  transition: var(--transition);
}
.progress-step.done .progress-step__circle  { background: var(--success); border-color: var(--success); color: #fff; }
.progress-step.current .progress-step__circle { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(27,58,107,.15); }
.progress-step__label { font-size: .72rem; font-weight: 600; text-align: center; color: var(--text-muted); max-width: 80px; }
.progress-step.done .progress-step__label    { color: var(--success); }
.progress-step.current .progress-step__label { color: var(--primary); }

.progress-line {
  position: absolute; top: 18px; left: 10%; right: 10%;
  height: 2px; background: var(--border); z-index: 0;
}
.progress-line-fill {
  height: 100%; background: var(--success); transition: width .6s ease;
}

/* ── Print guide ─────────────────────────────────────────────────── */
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .guia-print { box-shadow: none !important; border: 1px solid #ccc !important; }
}
.guia-print {
  background: #fff; border: 2px solid var(--primary);
  border-radius: var(--radius-md); overflow: hidden;
  max-width: 680px; margin: 0 auto;
}
.guia-print__header {
  background: var(--primary-dark); color: #fff;
  padding: 1.25rem 1.75rem;
  display: flex; justify-content: space-between; align-items: center;
}
.guia-print__header h2 { font-size: 1.1rem; }
.guia-print__guia-num {
  font-family: monospace; font-size: 1.3rem; font-weight: 800;
  color: var(--accent); letter-spacing: .08em;
}
.guia-print__body { padding: 1.5rem 1.75rem; }
.guia-print__section { margin-bottom: 1.25rem; }
.guia-print__section-title {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-light); border-bottom: 1px solid var(--border);
  padding-bottom: .375rem; margin-bottom: .75rem;
}
.guia-print__field { display: flex; gap: 1rem; margin-bottom: .4rem; }
.guia-print__field .key { font-size: .82rem; font-weight: 600; min-width: 120px; color: var(--text); }
.guia-print__field .val { font-size: .82rem; color: var(--text-muted); }
.guia-print__qr { text-align: center; padding: 1.25rem; border-top: 1px dashed var(--border); }
.guia-print__barcode {
  font-family: monospace; font-size: .75rem; letter-spacing: .1em;
  color: var(--text-light); margin-top: .5rem;
}

/* ── Checkpoint page ─────────────────────────────────────────────── */
.checkpoint-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--primary-dark);
}
.checkpoint-header {
  padding: 1.5rem; text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.checkpoint-header h1 { color: #fff; font-size: 1.2rem; }
.checkpoint-header p  { color: rgba(255,255,255,.5); font-size: .85rem; }
.checkpoint-body { flex: 1; padding: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.checkpoint-input {
  background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.15);
  border-radius: var(--radius-lg); padding: 1.5rem;
}
.checkpoint-input input {
  width: 100%; padding: 1rem 1.25rem;
  background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.15);
  border-radius: var(--radius); color: #fff; font-size: 1.1rem;
  font-family: monospace; letter-spacing: .05em;
  text-align: center; margin-bottom: 1rem;
}
.checkpoint-input input::placeholder { color: rgba(255,255,255,.35); }
.checkpoint-input input:focus { border-color: var(--accent); background: rgba(255,255,255,.15); }
.status-picker {
  display: grid; grid-template-columns: repeat(2,1fr); gap: .75rem; margin-bottom: 1rem;
}
.status-option {
  display: flex; align-items: center; gap: .6rem;
  padding: .875rem 1rem; border-radius: var(--radius);
  border: 2px solid rgba(255,255,255,.1); cursor: pointer;
  font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.65);
  transition: var(--transition); background: rgba(255,255,255,.04);
}
.status-option:hover { border-color: rgba(255,255,255,.3); color: #fff; }
.status-option.selected { border-color: var(--accent); color: var(--accent); background: rgba(245,166,35,.12); }
.status-option .dot { width: 10px; height: 10px; border-radius: 50%; }

/* ── Alerts ──────────────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: 1rem 1.25rem; border-radius: var(--radius);
  border-left: 4px solid transparent;
  font-size: .875rem;
}
.alert--success { background: var(--success-bg); border-color: var(--success); color: #065F46; }
.alert--warning { background: var(--warning-bg); border-color: var(--warning); color: #92400E; }
.alert--danger  { background: var(--danger-bg);  border-color: var(--danger);  color: #991B1B; }
.alert--info    { background: var(--info-bg);    border-color: var(--info);    color: #1E40AF; }
.alert__icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .05rem; }

/* ── Footer ──────────────────────────────────────────────────────── */
.footer {
  background: var(--primary-dark); color: rgba(255,255,255,.6);
  padding: 3.5rem 0 1.5rem;
}
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer__brand p { font-size: .85rem; margin: .75rem 0 1.25rem; max-width: 260px; }
.footer__logo { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.footer__logo img { height: 30px; }
.footer__logo span { font-size: 1rem; font-weight: 800; color: #fff; }
.footer__col h4 { color: #fff; font-size: .85rem; margin-bottom: 1rem; font-weight: 700; }
.footer__col ul li { margin-bottom: .5rem; }
.footer__col ul li a { font-size: .82rem; transition: color .2s; }
.footer__col ul li a:hover { color: var(--accent); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .75rem;
}
.footer__bottom p { font-size: .8rem; margin: 0; }
.footer__social { display: flex; gap: .5rem; }
.footer__social a {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center;
  font-size: .85rem; transition: var(--transition); color: rgba(255,255,255,.6);
}
.footer__social a:hover { background: var(--accent); color: var(--primary-dark); }

/* ── Modals ──────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(13,34,64,.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(12px) scale(.98); transition: transform .25s;
}
.modal-overlay.open .modal { transform: none; }
.modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 1.75rem; border-bottom: 1px solid var(--border);
}
.modal__header h3 { font-size: 1.1rem; }
.modal__close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--text-muted); transition: var(--transition);
}
.modal__close:hover { background: var(--danger-bg); color: var(--danger); }
.modal__body { padding: 1.75rem; }
.modal__footer { padding: 1.25rem 1.75rem; border-top: 1px solid var(--border); display: flex; gap: .75rem; justify-content: flex-end; }

/* ── Loading ─────────────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: currentColor;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility ─────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .2rem .65rem; border-radius: 999px;
  font-size: .73rem; font-weight: 600; background: var(--primary-faint); color: var(--primary);
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .sidebar { width: 220px; }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid, .form-grid--3 { grid-template-columns: 1fr; }
  .navbar__links { display: none; }
  .navbar__burger { display: flex; }
  .hero { padding: 3.5rem 0 3rem; }
  .tracker-search { flex-direction: column; }
  .section { padding: 3rem 0; }
  .footer__grid { grid-template-columns: 1fr; }
  .tracking-header { flex-direction: column; }
  .tracking-body { padding: 1.5rem; }
  .progress-step__label { font-size: .65rem; max-width: 60px; }
  .app-layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; }
  .page-body { padding: 1.25rem; }
  .status-picker { grid-template-columns: 1fr; }
  .modal { max-width: 100%; border-radius: var(--radius-md); }
  .topbar { padding: 1rem; }
}
@media (max-width: 480px) {
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .tracking-meta { flex-direction: column; gap: .75rem; }
  .guia-print__field { flex-direction: column; gap: .1rem; }
}

/* ── Animations ──────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.anim-fade-up { animation: fadeUp .5s ease forwards; }
.anim-fade    { animation: fadeIn .4s ease forwards; }

[data-aos] { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
[data-aos].aos-in { opacity: 1; transform: none; }
