/* ============================================================
   CLIFFPALM LOGISTICS — UI Design System
   Version: 1.0 · June 2026
   
   Include this file on EVERY page (public, portal, admin).
   Page-specific styles go in: public.css · portal.css
   
   Table of contents:
   1.  Tokens (CSS custom properties)
   2.  Reset & base
   3.  Typography utilities
   4.  Layout
   5.  Buttons
   6.  Status badges
   7.  Logo lockup
   8.  Header / navigation
   9.  Language switcher
   10. Auth modal
   11. WhatsApp float
   12. Forms
   13. Cards (generic)
   14. Shipment card
   15. Tracking timeline rail (horizontal)
   16. History log (vertical)
   17. Document rows
   18. Footer
   19. Scroll-reveal utility
   20. Responsive overrides
   ============================================================ */


/* ============================================================
   1. TOKENS
   ============================================================ */
:root {
  /* Brand reds */
  --red:          #C8102E;
  --red-rgb:      200, 16, 46;
  --red-hover:    #9E0C24;
  --red-soft:     oklch(0.62 0.21 22 / 0.12);

  /* Neutrals */
  --ink:          #141414;
  --ink-2:        #1d1d1f;
  --ink-3:        #2a2a2d;
  --surface:      #FAFAFA;
  --surface-2:    #f1f1ef;
  --line:         #e6e6e3;
  --line-dark:    rgba(255, 255, 255, 0.10);
  --grey:         #6B7280;
  --grey-2:       #9aa0aa;

  /* Status */
  --st-pending:   #6B7280;
  --st-transit:   #2563EB;
  --st-customs:   #7C3AED;
  --st-out:       #0891B2;
  --st-delivered: #16A34A;
  --st-delayed:   #D97706;
  --st-hold:      #C8102E;
  --st-returned:  #4B5563;

  /* Typography */
  --display: "Archivo", system-ui, sans-serif;
  --mono:    "Space Mono", ui-monospace, monospace;

  /* Easing */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Layout */
  --maxw: 1320px;
  --gut:  clamp(20px, 5vw, 88px);

  /* Sidebar (portal/admin) */
  --sidebar-w: 240px;
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

p { margin: 0; }

button {
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

input, select, textarea {
  font-family: inherit;
}

ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd  { margin: 0; }
figure  { margin: 0; }

::selection { background: var(--red); color: #fff; }

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


/* ============================================================
   3. TYPOGRAPHY UTILITIES
   ============================================================ */

/* Large display headline: bold, wide, tight */
.display {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 118%;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  line-height: 0.9;
}

/* Space Mono for technical strings */
.mono {
  font-family: var(--mono);
}

/* Eyebrow label above section titles */
.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red);
}

.text-red     { color: var(--red); }
.text-grey    { color: var(--grey); }
.text-white   { color: #fff; }
.text-muted   { color: var(--grey-2); }
.text-center  { text-align: center; }
.text-upper   { text-transform: uppercase; }
.text-wrap-p  { text-wrap: pretty; }


/* ============================================================
   4. LAYOUT
   ============================================================ */

/* Page-width container */
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
  width: 100%;
}

/* Section scaffold */
.sec {
  padding: clamp(70px, 10vw, 150px) 0;
  position: relative;
}

.sec--dark { background: var(--ink); }
.sec--alt  { background: var(--surface-2); }

.sec__head {
  max-width: 760px;
  margin-bottom: clamp(40px, 5vw, 72px);
}

.sec__head--center {
  text-align: center;
  margin-inline: auto;
}

.sec__head--row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 48px;
  max-width: none;
}

.sec__title {
  font-size: clamp(34px, 5.2vw, 70px);
  margin: 20px 0;
}

.sec__lead {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--grey);
  max-width: 56ch;
  text-wrap: pretty;
}

/* Generic two/three/four column grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }


/* ============================================================
   5. BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 15px 24px;
  border: 1.5px solid transparent;
  border-radius: 2px;
  text-transform: uppercase;
  transition: transform 0.25s var(--ease-out), background 0.2s, color 0.2s, box-shadow 0.25s, border-color 0.2s;
  position: relative;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn--primary:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(var(--red-rgb), 0.55);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.btn--ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.btn--dark {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn--dark:hover {
  background: var(--ink-3);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--outline:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn--lg { padding: 18px 32px; font-size: 16px; }
.btn--sm { padding: 10px 16px; font-size: 13px; }

.btn .arr { transition: transform 0.3s var(--ease-out); }
.btn:hover .arr { transform: translateX(5px); }

/* Full-width helper */
.btn--block { width: 100%; justify-content: center; }


/* ============================================================
   6. STATUS BADGES
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 2px;
  white-space: nowrap;
  line-height: 1;
}

/* Dot indicator inside badge */
.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
  flex: none;
}

/* Sizes */
.badge--lg { font-size: 14px; padding: 8px 16px; }
.badge--sm { font-size: 10.5px; padding: 4px 9px; }

/* Exception badges get square dot */
.badge--delayed::before,
.badge--hold::before,
.badge--returned::before {
  border-radius: 1px;
}

/* Status variants */
.badge--pending   { color: var(--st-pending);   background: color-mix(in srgb, var(--st-pending)   13%, transparent); border: 1px solid color-mix(in srgb, var(--st-pending)   32%, transparent); }
.badge--transit   { color: var(--st-transit);   background: color-mix(in srgb, var(--st-transit)   13%, transparent); border: 1px solid color-mix(in srgb, var(--st-transit)   32%, transparent); }
.badge--customs   { color: var(--st-customs);   background: color-mix(in srgb, var(--st-customs)   13%, transparent); border: 1px solid color-mix(in srgb, var(--st-customs)   32%, transparent); }
.badge--out       { color: var(--st-out);       background: color-mix(in srgb, var(--st-out)       13%, transparent); border: 1px solid color-mix(in srgb, var(--st-out)       32%, transparent); }
.badge--delivered { color: var(--st-delivered); background: color-mix(in srgb, var(--st-delivered) 13%, transparent); border: 1px solid color-mix(in srgb, var(--st-delivered) 32%, transparent); }
.badge--delayed   { color: var(--st-delayed);   background: color-mix(in srgb, var(--st-delayed)   13%, transparent); border: 1px solid color-mix(in srgb, var(--st-delayed)   32%, transparent); }
.badge--hold      { color: var(--st-hold);      background: color-mix(in srgb, var(--st-hold)      13%, transparent); border: 1px solid color-mix(in srgb, var(--st-hold)      32%, transparent); }
.badge--returned  { color: var(--st-returned);  background: color-mix(in srgb, var(--st-returned)  13%, transparent); border: 1px solid color-mix(in srgb, var(--st-returned)  32%, transparent); }


/* ============================================================
   7. LOGO LOCKUP
   ============================================================ */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex: none;
}

.logo__mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  font-stretch: 118%;
  border-radius: 2px;
  flex: none;
  box-shadow: 0 6px 18px -8px rgba(var(--red-rgb), 0.65);
}

.logo__text {
  display: flex;
  flex-direction: column;
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.01em;
  line-height: 0.92;
  text-transform: uppercase;
  font-stretch: 112%;
  color: var(--ink);
}

.logo__text--white { color: #fff; }

.logo__accent { color: var(--red); }

.logo__sub {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.42em;
  color: var(--grey);
  font-style: normal;
  margin-top: 3px;
}

.logo__text--white .logo__sub { color: rgba(255, 255, 255, 0.55); }


/* ============================================================
   8. HEADER / NAVIGATION
   ============================================================ */

.hdr {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  transition: background 0.35s, box-shadow 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}

.hdr.is-solid {
  background: rgba(250, 250, 250, 0.9);
  backdrop-filter: blur(14px);
  border-color: var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.hdr__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  gap: 20px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
}

/* On transparent (dark photo) header — invert text */
.hdr:not(.is-solid) .logo__text { color: #fff; }
.hdr:not(.is-solid) .logo__sub  { color: rgba(255, 255, 255, 0.5); }

.hdr__nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  background: none;
  border: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  padding: 9px 14px;
  color: var(--ink);
  border-radius: 2px;
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
  cursor: pointer;
  white-space: nowrap;
}

.hdr:not(.is-solid) .nav-link { color: rgba(255, 255, 255, 0.85); }
.nav-link:hover { color: var(--red); }
.hdr:not(.is-solid) .nav-link:hover { color: #fff; }

.nav-link.is-active { color: var(--red); }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  background: var(--red);
}

.hdr__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Login ghost button in header */
.hdr__login {
  background: none;
  border: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 14px;
  color: var(--ink);
  transition: color 0.2s;
  cursor: pointer;
  white-space: nowrap;
}

.hdr:not(.is-solid) .hdr__login { color: rgba(255, 255, 255, 0.88); }
.hdr__login:hover { color: var(--red); }
.hdr:not(.is-solid) .hdr__login:hover { color: #fff; }

.hdr__cta { padding: 11px 18px; font-size: 13.5px; }

/* Burger (mobile) */
.hdr__burger {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  color: var(--ink);
  cursor: pointer;
}

.hdr:not(.is-solid) .hdr__burger { color: #fff; }

/* Mobile menu drawer */
.hdr__mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 12px var(--gut) 24px;
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.2);
}

.hdr__mobile.is-open { display: flex; }

.hdr__mobile a,
.hdr__mobile button:not(.btn) {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  padding: 14px 4px;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}

.hdr__mobile a:hover,
.hdr__mobile button:not(.btn):hover { color: var(--red); }

.hdr__mobile-auth {
  display: flex;
  gap: 10px;
  padding: 14px 0 4px;
}

.hdr__mobile .btn { margin-top: 8px; justify-content: center; }


/* ============================================================
   9. LANGUAGE SWITCHER
   ============================================================ */

.lang {
  position: relative;
}

.lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 2px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
  white-space: nowrap;
}

.lang__btn:hover { border-color: var(--ink); }

/* On dark (transparent) header */
.hdr:not(.is-solid) .lang__btn {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.hdr:not(.is-solid) .lang__btn:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.lang__chevron { transition: transform 0.2s; }
.lang.is-open .lang__chevron { transform: rotate(180deg); }

.lang__menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 22px 50px -18px rgba(0, 0, 0, 0.28);
  padding: 6px;
  z-index: 50;
}

.lang.is-open .lang__menu { display: block; }

.lang__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 10px 12px;
  border-radius: 2px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  transition: background 0.15s;
  cursor: pointer;
}

.lang__item:hover { background: var(--surface-2); }
.lang__item.is-active { color: var(--red); }

.lang__code {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--grey);
  width: 28px;
}

.lang__item.is-active .lang__code { color: var(--red); }

.lang__note {
  padding: 8px 12px 4px;
  font-size: 10px;
  color: var(--grey-2);
  border-top: 1px solid var(--line);
  margin-top: 4px;
  letter-spacing: 0.02em;
}


/* ============================================================
   10. AUTH MODAL
   ============================================================ */

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-overlay[hidden] { display: none; }

.auth-overlay[aria-hidden="true"] { display: none; }

.auth-card {
  background: #fff;
  border-radius: 6px;
  padding: clamp(28px, 4vw, 44px);
  width: 100%;
  max-width: 460px;
  position: relative;
  animation: slideUp 0.3s var(--ease-out);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.5);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.auth-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: 1px solid var(--line);
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--grey);
  transition: all 0.2s;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.auth-close:hover { border-color: var(--ink); color: var(--ink); }

.auth-logo { margin-bottom: 24px; }

.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--line);
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 12px 16px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  color: var(--grey);
  transition: color 0.2s, border-color 0.2s;
  cursor: pointer;
}

.auth-tab.is-active { color: var(--red); border-bottom-color: var(--red); }

.auth-pane { display: none; }
.auth-pane.is-active { display: block; }

.auth-hint {
  font-size: 13.5px;
  color: var(--grey);
  text-align: center;
  margin-top: 16px;
}

.auth-hint a, .auth-link {
  color: var(--red);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.auth-hint a:hover, .auth-link:hover { text-decoration: underline; }

.auth-done {
  text-align: center;
  padding: 20px 0 8px;
}

.auth-done__icon {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--st-delivered);
  color: #fff;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  font-size: 26px;
}

.auth-done h3 { font-size: 28px; margin-bottom: 10px; }
.auth-done p  { color: var(--grey); line-height: 1.6; margin-bottom: 22px; font-size: 15px; }

/* Company toggle checkbox */
.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 15px;
  cursor: pointer;
  padding: 8px 0;
}

.check-label input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--red);
  cursor: pointer;
}

.company-field { display: none; }
.company-field.is-visible { display: block; }


/* ============================================================
   11. WHATSAPP FLOAT
   ============================================================ */

.wa-float {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 180;
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
}

.wa-float__btn {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 34px -10px rgba(37, 211, 102, 0.7);
  transition: transform 0.25s var(--ease-out);
  font-size: 30px;
  line-height: 1;
}

.wa-float:hover .wa-float__btn { transform: scale(1.07); animation: none; }

@keyframes waBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  15%       { transform: translateY(-12px) scale(1.04); }
  30%       { transform: translateY(0) scale(1); }
  45%       { transform: translateY(-6px) scale(1.02); }
  60%       { transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: no-preference) {
  .wa-float__btn { animation: waBounce 4s ease-in-out 2s infinite; }
}

.wa-float__label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  background: var(--ink);
  color: #fff;
  padding: 0;
  border-radius: 30px;
  white-space: nowrap;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  margin-right: 0;
  transition: max-width 0.3s var(--ease-out), opacity 0.25s, padding 0.3s, margin 0.3s;
}

.wa-float:hover .wa-float__label {
  max-width: 160px;
  opacity: 1;
  padding: 12px 18px;
  margin-right: 12px;
}


/* ============================================================
   12. FORMS
   ============================================================ */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}

.field__label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
}

.field__input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}

.field__input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(var(--red-rgb), 0.12);
}

.field__input::placeholder { color: var(--grey-2); }

.field__input--dark {
  background: var(--ink-2);
  border-color: var(--line-dark);
  color: #fff;
}

.field__input--dark:focus { border-color: var(--red); }
.field__input--dark::placeholder { color: rgba(255, 255, 255, 0.3); }

.field__error {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--red);
  letter-spacing: 0.02em;
  display: none;
}

.field.has-error .field__input { border-color: var(--red); }
.field.has-error .field__error  { display: block; }

.field__select {
  width: 100%;
  padding: 13px 40px 13px 15px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field__select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(var(--red-rgb), 0.12);
}
.field__select option { color: var(--ink); background: #fff; }

/* Two-column field row */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}


/* ============================================================
   13. CARDS (generic)
   ============================================================ */

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px;
}

.card--dark {
  background: var(--ink-2);
  border-color: var(--line-dark);
  color: #fff;
}

.card__heading {
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card__count {
  width: 22px; height: 22px;
  background: var(--red);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
}


/* ============================================================
   14. SHIPMENT CARD
   ============================================================ */

.ship-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 20px 22px;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.ship-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -22px rgba(0, 0, 0, 0.25);
}

.ship-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.ship-card__id {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--grey);
}

.ship-card__route {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.ship-card__city {
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  text-transform: uppercase;
  font-stretch: 112%;
}

.ship-card__arrow { color: var(--red); font-size: 18px; }

.ship-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--grey);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 4px;
}

.ship-card__meta b { color: var(--ink); }

.ship-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: gap 0.25s;
}

.ship-card:hover .ship-card__link { gap: 10px; }


/* ============================================================
   15. TRACKING TIMELINE RAIL (horizontal, 5 steps)
   ============================================================ */

.timeline-rail {
  display: flex;
  position: relative;
  margin: 8px 0 30px;
}

.timeline-rail__step {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.timeline-rail__line {
  position: absolute;
  top: 15px;
  left: -50%;
  width: 100%;
  height: 3px;
  background: var(--line);
  z-index: 0;
}

.timeline-rail__step:first-child .timeline-rail__line { display: none; }

.timeline-rail__step.is-done .timeline-rail__line,
.timeline-rail__step.is-current .timeline-rail__line { background: var(--red); }

.timeline-rail__dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 3px solid var(--line);
  background: #fff;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #fff;
  transition: all 0.3s;
  font-size: 14px;
}

.timeline-rail__step.is-current .timeline-rail__dot {
  animation: railPulse 2s infinite;
}

@keyframes railPulse {
  0%, 100% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--red) 16%, transparent); }
  50%       { box-shadow: 0 0 0 11px color-mix(in srgb, var(--red) 5%, transparent); }
}

.timeline-rail__label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--grey);
  max-width: 90px;
  line-height: 1.15;
}

.timeline-rail__step.is-done .timeline-rail__label,
.timeline-rail__step.is-current .timeline-rail__label { color: var(--ink); }

/* Exception alert bar */
.exception-bar {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 18px;
  border-radius: 3px;
  margin-bottom: 24px;
  font-size: 14px;
}

.exception-bar--delayed  { background: color-mix(in srgb, var(--st-delayed)  12%, transparent); border: 1px solid color-mix(in srgb, var(--st-delayed)  30%, transparent); color: var(--st-delayed); }
.exception-bar--hold     { background: color-mix(in srgb, var(--st-hold)     12%, transparent); border: 1px solid color-mix(in srgb, var(--st-hold)     30%, transparent); color: var(--st-hold); }
.exception-bar--returned { background: color-mix(in srgb, var(--st-returned) 12%, transparent); border: 1px solid color-mix(in srgb, var(--st-returned) 30%, transparent); color: var(--st-returned); }

.exception-bar b { font-weight: 800; }


/* ============================================================
   16. HISTORY LOG (vertical, dated, reversed chronological)
   ============================================================ */

.log__heading {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 18px;
}

.log__row {
  display: flex;
  gap: 18px;
}

.log__rail {
  position: relative;
  display: flex;
  justify-content: center;
  width: 16px;
  flex: none;
}

.log__rail::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--line);
}

.log__row:first-child .log__rail::before { top: 9px; }
.log__row:last-child  .log__rail::before { height: 9px; bottom: auto; }

.log__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  margin-top: 3px;
  position: relative;
  z-index: 1;
  flex: none;
}

.log__row--latest .log__dot {
  box-shadow: 0 0 0 5px rgba(var(--red-rgb), 0.15);
}

.log__body { padding-bottom: 26px; flex: 1; }

.log__top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.log__when {
  font-size: 12px;
  color: var(--grey);
}

.log__loc {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.log__loc-icon { color: var(--red); }

.log__note {
  font-size: 14px;
  color: var(--grey);
  line-height: 1.55;
  max-width: 60ch;
  text-wrap: pretty;
}


/* ============================================================
   17. DOCUMENT ROWS
   ============================================================ */

.doc-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 8px;
}

.doc-row:hover { border-color: var(--ink); background: var(--surface); }

.doc-row__icon {
  width: 38px; height: 38px;
  border-radius: 2px;
  background: var(--surface-2);
  color: var(--red);
  display: grid;
  place-items: center;
  flex: none;
  font-size: 18px;
}

.doc-row__meta {
  flex: 1;
  min-width: 0;
}

.doc-row__meta b {
  display: block;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-row__meta .doc-row__info {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--grey);
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.doc-row__actions {
  display: flex;
  gap: 6px;
  flex: none;
}

.doc-row__btn {
  width: 32px; height: 32px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--grey);
  display: grid;
  place-items: center;
  transition: all 0.2s;
  cursor: pointer;
  font-size: 14px;
}

.doc-row__btn:hover { border-color: var(--red); color: var(--red); }

/* Admin-only: visibility flag */
.doc-row__btn--visible { color: var(--st-delivered); border-color: var(--st-delivered); }
.doc-row__btn--hidden  { color: var(--grey); }

.docs__note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--grey-2);
  margin-top: 14px;
  line-height: 1.5;
}


/* ============================================================
   18. FOOTER
   ============================================================ */

.ftr {
  background: var(--ink);
  color: #fff;
  padding: clamp(60px, 8vw, 110px) 0 40px;
}

.ftr__top {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr;
  gap: 60px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line-dark);
}

.ftr__brand {}

.ftr__tagline {
  font-size: clamp(28px, 3.4vw, 46px);
  margin: 28px 0 26px;
  color: #fff;
}

.ftr__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.ftr__col-heading {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-2);
  margin-bottom: 16px;
}

.ftr__cols a,
.ftr__col-link {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  padding: 7px 0;
  transition: color 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.ftr__cols a:hover,
.ftr__col-link:hover { color: var(--red); }

.ftr__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.ftr__copy {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey-2);
  letter-spacing: 0.02em;
}

.ftr__legal {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--red);
  letter-spacing: 0.02em;
}

.ftr__wa {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  background: #25D366;
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 2px;
  text-decoration: none;
  transition: background .2s, transform .2s;
}
.ftr__wa:hover { background: #1db954; transform: translateY(-2px); }


/* ============================================================
   19. SCROLL REVEAL
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal.is-visible { opacity: 1; transform: none; }

.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}


/* ============================================================
   20. RESPONSIVE OVERRIDES
   ============================================================ */

@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .hdr__nav  { display: none; }
  .hdr__cta  { display: none; }
  .hdr__login { display: none; }
  .hdr__burger { display: inline-flex; }
  .ftr__top  { grid-template-columns: 1fr; gap: 44px; }
  .grid-3    { grid-template-columns: 1fr; }
  .sec__head--row { flex-direction: column; align-items: flex-start; gap: 20px; }
}

@media (max-width: 640px) {
  .ftr__cols { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .grid-2    { grid-template-columns: 1fr; }
  .timeline-rail__label { font-size: 10.5px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: #c8c8c3; }
::-webkit-scrollbar-track { background: var(--surface-2); }
