/* ─── TuCargo — Stripe-inspired Design System ────────────────────────────── */

/* ── Tokens ── */
:root {
  --tc-purple:        #635BFF;
  --tc-purple-dark:   #4F46E5;
  --tc-purple-light:  #7C74FF;
  --tc-cyan:          #00D4FF;
  --tc-navy:          #0A2540;
  --tc-navy-mid:      #0D2E4E;
  --tc-ink:           #0A2540;
  --tc-ink-muted:     #425466;
  --tc-canvas:        #ffffff;
  --tc-surface:       #F6F9FC;
  --tc-surface-2:     #EEF2F7;
  --tc-hairline:      #E0E6ED;
  --tc-success:       #24B47E;
  --tc-warn:          #F59E0B;

  --tc-font:          "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --tc-radius:        8px;
  --tc-radius-lg:     12px;
  --tc-radius-xl:     20px;
  --tc-nav-h:         64px;

  --tc-shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --tc-shadow:        0 4px 16px rgba(10,37,64,.12);
  --tc-shadow-lg:     0 20px 48px rgba(10,37,64,.18);
  --tc-shadow-xl:     0 32px 64px rgba(10,37,64,.22);
}

/* ── Google Fonts — Inter ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--tc-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--tc-ink);
  background: var(--tc-canvas);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: var(--tc-purple); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ── */
/* ── Password toggle ── */
.tc-pwd-wrap { position: relative; }
.tc-pwd-wrap input { padding-right: 42px !important; }
.tc-pwd-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--tc-ink-muted); font-size: 15px; padding: 0; line-height: 1;
}
.tc-pwd-toggle:hover { color: var(--tc-ink); }

.tc-nav {
  position: sticky; top: 0; z-index: 1000;
  height: var(--tc-nav-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--tc-hairline);
  display: flex; align-items: center;
}
.tc-nav__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.tc-nav__logo img  { height: 40px; }
.tc-nav__links     { display: flex; gap: 32px; }
.tc-nav__links a {
  font-size: 15px; font-weight: 500;
  color: var(--tc-ink-muted);
  transition: color .15s;
}
.tc-nav__links a:hover { color: var(--tc-ink); text-decoration: none; }
.tc-nav__cta {
  font-size: 14px; font-weight: 600;
  color: var(--tc-purple);
  background: rgba(99,91,255,.08);
  padding: 8px 18px;
  border-radius: var(--tc-radius);
  transition: background .15s;
}
.tc-nav__cta:hover { background: rgba(99,91,255,.15); text-decoration: none; }

/* ── Buttons ── */
.btn-tc {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--tc-font); font-size: 15px; font-weight: 600;
  line-height: 1; letter-spacing: -.01em;
  padding: 12px 24px;
  border-radius: var(--tc-radius);
  border: none; cursor: pointer;
  transition: all .2s;
  white-space: nowrap; text-decoration: none;
}
.btn-tc-primary {
  background: var(--tc-purple);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99,91,255,.4);
}
.btn-tc-primary:hover {
  background: var(--tc-purple-dark);
  box-shadow: 0 6px 20px rgba(99,91,255,.5);
  transform: translateY(-1px);
  color: #fff; text-decoration: none;
}
.btn-tc-outline {
  background: transparent;
  color: var(--tc-purple);
  border: 1.5px solid var(--tc-purple);
}
.btn-tc-outline:hover {
  background: rgba(99,91,255,.06);
  color: var(--tc-purple); text-decoration: none;
}
.btn-tc-white {
  background: #fff;
  color: var(--tc-navy);
  box-shadow: var(--tc-shadow);
}
.btn-tc-white:hover {
  background: var(--tc-surface);
  color: var(--tc-navy); text-decoration: none;
  transform: translateY(-1px);
}
.btn-tc-ghost {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
}
.btn-tc-ghost:hover {
  background: rgba(255,255,255,.2);
  color: #fff; text-decoration: none;
}
.btn-tc-sm  { font-size: 13px; padding: 8px 18px; }
.btn-tc-lg  { font-size: 17px; padding: 15px 32px; }

/* ── Typography ── */
.tc-hero-title {
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.04em;
}
.tc-display-lg {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.03em;
}
.tc-display-md {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.025em;
}
.tc-tagline {
  font-size: 20px; font-weight: 600; line-height: 1.4;
}
.tc-body-lg {
  font-size: 18px; font-weight: 400; line-height: 1.6; color: var(--tc-ink-muted);
}
.tc-eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tc-purple);
  margin-bottom: 12px;
  display: block;
}

/* ── Layout ── */
.tc-section {
  padding: 96px 32px;
}
.tc-container {
  max-width: 1160px; margin: 0 auto; width: 100%;
}
.tc-container-sm {
  max-width: 760px; margin: 0 auto; width: 100%;
}

/* ── Hero (gradient) ── */
.tc-hero {
  background: linear-gradient(135deg, #0A2540 0%, #1A1A4E 50%, #0D3B6E 100%);
  color: #fff;
  padding: 100px 32px 80px;
  position: relative;
  overflow: hidden;
}
.tc-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(99,91,255,.35) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(0,212,255,.2) 0%, transparent 50%);
  pointer-events: none;
}
.tc-hero > * { position: relative; }

.tc-hero-sub {
  font-size: 18px; font-weight: 400; line-height: 1.6;
  color: rgba(255,255,255,.78);
  margin-top: 16px;
  max-width: 520px;
}
.tc-hero-actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.tc-hero-link {
  font-size: 15px; font-weight: 500;
  color: rgba(255,255,255,.75);
  display: inline-flex; align-items: center; gap: 6px;
}
.tc-hero-link:hover { color: #fff; text-decoration: none; }

/* ── Section variants ── */
.tc-section-light  { background: var(--tc-surface); }
.tc-section-white  { background: var(--tc-canvas); }
.tc-section-dark   {
  background: linear-gradient(135deg, #0A2540 0%, #1A1A4E 100%);
  color: #fff;
}

/* ── Feature grid (Stripe-style cards) ── */
.tc-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.tc-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.tc-card {
  background: var(--tc-canvas);
  border-radius: var(--tc-radius-lg);
  border: 1px solid var(--tc-hairline);
  padding: 32px 28px;
  box-shadow: var(--tc-shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.tc-card:hover {
  box-shadow: var(--tc-shadow);
  transform: translateY(-2px);
}
.tc-card-dark {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.1);
  color: #fff;
}
.tc-card-dark:hover { box-shadow: 0 8px 32px rgba(0,0,0,.3); }

.tc-card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(99,91,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--tc-purple);
  margin-bottom: 20px;
}
.tc-card-dark .tc-card-icon {
  background: rgba(99,91,255,.25);
  color: #a5a0ff;
}
.tc-card-title {
  font-size: 17px; font-weight: 700; line-height: 1.3;
  letter-spacing: -.02em;
  margin-bottom: 8px;
}
.tc-card-dark .tc-card-title { color: #fff; }
.tc-card-desc {
  font-size: 15px; color: var(--tc-ink-muted); line-height: 1.6;
}
.tc-card-dark .tc-card-desc { color: rgba(255,255,255,.65); }

/* ── Stat block ── */
.tc-stat-value {
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 800; letter-spacing: -.04em; line-height: 1;
  color: var(--tc-ink);
}
.tc-stat-label {
  font-size: 14px; color: var(--tc-ink-muted); margin-top: 6px;
  font-weight: 500;
}

/* ── Steps ── */
.tc-step-num {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--tc-purple), var(--tc-purple-dark));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
  margin: 0 auto 20px;
  box-shadow: 0 4px 16px rgba(99,91,255,.4);
}

/* ── Checklist ── */
.tc-checklist { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.tc-checklist li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 16px;
}
.tc-checklist li i {
  color: var(--tc-success); margin-top: 2px; flex-shrink: 0;
}
.tc-section-dark .tc-checklist li { color: rgba(255,255,255,.85); }

/* ── Form ── */
.tc-form-field {
  display: flex; flex-direction: column; gap: 6px;
}
.tc-form-field label {
  font-size: 13px; font-weight: 600; color: var(--tc-ink-muted);
  letter-spacing: .01em;
}
.tc-form-field input,
.tc-form-field select,
.tc-form-field textarea {
  font-family: var(--tc-font);
  font-size: 15px; color: var(--tc-ink);
  background: var(--tc-canvas);
  border: 1.5px solid var(--tc-hairline);
  border-radius: var(--tc-radius);
  padding: 10px 14px;
  outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.tc-form-field input::placeholder,
.tc-form-field select::placeholder,
.tc-form-field textarea::placeholder { color: #aab7c4; }
.tc-form-field input:focus,
.tc-form-field select:focus,
.tc-form-field textarea:focus {
  border-color: var(--tc-purple);
  box-shadow: 0 0 0 3px rgba(99,91,255,.18);
}

/* dark form */
.tc-form-dark .tc-form-field label { color: rgba(255,255,255,.65); }
.tc-form-dark .tc-form-field input,
.tc-form-dark .tc-form-field select,
.tc-form-dark .tc-form-field textarea {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.15);
  color: #fff;
}
.tc-form-dark .tc-form-field input::placeholder,
.tc-form-dark .tc-form-field select::placeholder,
.tc-form-dark .tc-form-field textarea::placeholder { color: rgba(255,255,255,.35); }
.tc-form-dark .tc-form-field input:focus,
.tc-form-dark .tc-form-field select:focus,
.tc-form-dark .tc-form-field textarea:focus {
  border-color: var(--tc-purple-light);
  box-shadow: 0 0 0 3px rgba(99,91,255,.3);
}

/* ── Map ── */
.tc-map-wrap {
  border-radius: var(--tc-radius-xl);
  overflow: hidden;
  box-shadow: var(--tc-shadow-xl);
  aspect-ratio: 4/3;
}
.tc-map-wrap #map { width: 100%; height: 100%; min-height: 380px; }

/* ── Modal ── */
.tc-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(10,37,64,.65);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
.tc-modal-overlay.open { display: flex; }
.tc-modal {
  background: var(--tc-canvas);
  border-radius: var(--tc-radius-xl);
  padding: 40px;
  width: 100%; max-width: 460px; margin: 24px;
  box-shadow: var(--tc-shadow-xl);
}
.tc-modal h3 {
  font-size: 24px; font-weight: 700; letter-spacing: -.025em;
  margin-bottom: 24px; color: var(--tc-ink);
}

/* ── Footer ── */
.tc-footer {
  background: var(--tc-navy);
  color: rgba(255,255,255,.7);
  padding: 64px 32px 32px;
}
.tc-footer h5 {
  font-size: 15px; font-weight: 700; color: #fff;
  margin-bottom: 16px; letter-spacing: -.01em;
}
.tc-footer p, .tc-footer li { font-size: 14px; line-height: 1.7; }
.tc-footer a { color: rgba(255,255,255,.6); font-size: 14px; transition: color .15s; }
.tc-footer a:hover { color: #fff; text-decoration: none; }
.tc-footer-bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.tc-footer-bottom p { font-size: 13px; color: rgba(255,255,255,.4); }
.tc-social { display: flex; gap: 10px; }
.tc-social a {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.6); font-size: 14px;
  transition: background .15s, color .15s;
}
.tc-social a:hover { background: var(--tc-purple); color: #fff; text-decoration: none; }

/* ── Divider ── */
.tc-hr { border: none; border-top: 1px solid var(--tc-hairline); }

/* ── Badge ── */
.tc-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  padding: 4px 12px; border-radius: 100px;
  background: rgba(99,91,255,.12); color: var(--tc-purple);
  text-transform: uppercase;
}

/* ── Utility: 2-col grid that collapses to 1-col on mobile ── */
.tc-g2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Utility: scrollable horizontal container (tables, chips) ── */
.tc-scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Hamburger button ── */
.tc-hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 6px; color: var(--tc-ink); font-size: 20px;
  line-height: 1; flex-shrink: 0;
}

/* ── Mobile nav drawer ── */
.tc-mobile-nav {
  display: none;
  position: fixed; inset: 0; z-index: 1999;
}
.tc-mobile-nav.open { display: block; }
.tc-mobile-nav__overlay {
  position: absolute; inset: 0;
  background: rgba(10,37,64,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.tc-mobile-nav__drawer {
  position: absolute; top: 0; right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--tc-canvas);
  box-shadow: var(--tc-shadow-xl);
  display: flex; flex-direction: column;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.tc-mobile-nav.open .tc-mobile-nav__drawer {
  transform: translateX(0);
}
.tc-mobile-nav__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--tc-hairline);
}
.tc-mobile-nav__header img { height: 32px; }
.tc-mobile-nav__close {
  background: none; border: none; cursor: pointer;
  color: var(--tc-ink-muted); font-size: 18px; padding: 4px;
}
.tc-mobile-nav__links { flex: 1; padding: 12px 0; }
.tc-mobile-nav__links a {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px;
  font-size: 15px; font-weight: 600; color: var(--tc-ink);
  text-decoration: none;
  transition: background .12s;
}
.tc-mobile-nav__links a:hover { background: var(--tc-surface); }
.tc-mobile-nav__links a i { width: 18px; text-align: center; color: var(--tc-purple); font-size: 15px; }
.tc-mobile-nav__links .divider {
  height: 1px; background: var(--tc-hairline); margin: 8px 20px;
}
.tc-mobile-nav__footer {
  padding: 16px 20px;
  border-top: 1px solid var(--tc-hairline);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .tc-grid-3, .tc-grid-4 { grid-template-columns: 1fr 1fr; }
  .tc-nav__inner { padding: 0 20px; }
}
@media (max-width: 640px) {
  .tc-nav__inner  { padding: 0 16px; }
  .tc-nav__links  { display: none; }
  .tc-hamburger   { display: flex !important; align-items: center; justify-content: center; }

  .tc-section { padding: 48px 16px; }
  .tc-hero    { padding: 64px 16px 48px; }
  .tc-hero-actions { flex-direction: column; align-items: stretch; }
  .tc-hero-actions .btn-tc { justify-content: center; }

  .tc-grid-3, .tc-grid-4 { grid-template-columns: 1fr; }
  .tc-container { padding: 0 4px; }

  /* Modal: full-screen on small screens */
  .tc-modal-overlay { align-items: flex-end; }
  .tc-modal {
    padding: 24px 20px 32px;
    border-radius: var(--tc-radius-xl) var(--tc-radius-xl) 0 0;
    margin: 0; max-width: 100%;
    width: 100%;
  }

  /* Notif panel full-width on mobile */
  #notifPanel {
    position: fixed !important;
    top: var(--tc-nav-h) !important;
    left: 0 !important; right: 0 !important;
    width: 100% !important;
    border-radius: 0 0 16px 16px !important;
    max-height: 70vh;
    overflow-y: auto;
  }
  #notifList { max-height: none !important; }

  /* User menu full-width on mobile */
  #userMenu {
    position: fixed !important;
    top: var(--tc-nav-h) !important;
    left: 0 !important; right: 0 !important;
    width: 100% !important;
    border-radius: 0 0 16px 16px !important;
    min-width: unset !important;
  }

  /* Nav: hide name on small screens, keep avatar */
  .tc-nav-name { display: none; }

  /* Toast container full-width bottom on mobile */
  #toastContainer {
    left: 12px !important; right: 12px !important; bottom: 16px !important;
    align-items: stretch !important;
  }
  .tc-toast { max-width: 100% !important; }

  /* Footer */
  .tc-footer { display: none; }

  /* Inner pages common wrapper */
  .tc-dash-wrap { padding: 20px 14px !important; }

  /* 2-col grid → 1-col */
  .tc-g2 { grid-template-columns: 1fr !important; }
}
