/* =========================================================
   Portex — Public / Customer Design System
   Bold logistics look: near-black + Aramex-style red gradients,
   soft shadows, rounded cards, badges, timeline.
   ========================================================= */

:root{
  --navy-950:#0D0D12;
  --navy-900:#16171D;
  --navy-800:#22232B;
  --navy-700:#34353F;
  --blue-600:#E2262B;
  --blue-500:#FF4145;
  --cyan-400:#C41922;
  --cyan-300:#FF6B6E;
  --white:#ffffff;
  --gray-50:#f7f7f8;
  --gray-100:#eeeef0;
  --gray-200:#e2e3e7;
  --gray-400:#9a9ba3;
  --gray-500:#6b6c76;
  --gray-700:#3a3b44;
  --success:#16a34a;
  --success-bg:#e9f9ef;
  --warning:#f59e0b;
  --warning-bg:#fef6e6;
  --danger:#DC2626;
  --danger-bg:#fdeaea;
  --info:#E2262B;
  --info-bg:#fdeaea;
  --radius-sm:10px;
  --radius:16px;
  --radius-lg:24px;
  --shadow-sm:0 2px 8px rgba(13,13,18,.08);
  --shadow:0 8px 30px rgba(13,13,18,.10);
  --shadow-lg:0 20px 60px rgba(13,13,18,.18);
  --grad-brand:linear-gradient(135deg,var(--navy-950) 0%, var(--cyan-400) 55%, var(--blue-500) 100%);
  --grad-soft:linear-gradient(135deg,#fff1f1 0%, #fff7f0 100%);
  --font:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0; font-family:var(--font); color:var(--navy-900); background:var(--gray-50);
  -webkit-font-smoothing:antialiased; line-height:1.6; direction:ltr; text-align:left;
}
a{color:inherit; text-decoration:none;}
img{max-width:100%; display:block;}
ul{margin:0; padding:0;}
h1,h2,h3,h4{margin:0 0 .5em; line-height:1.2; font-weight:800; letter-spacing:-.02em;}
p{margin:0 0 1em;}
.container{max-width:1200px; margin:0 auto; padding:0 24px;}
.container-narrow{max-width:860px; margin:0 auto; padding:0 24px;}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:13px 26px; border-radius:12px; font-weight:700; font-size:15px;
  border:1px solid transparent; cursor:pointer; transition:all .18s ease; white-space:nowrap;
}
.btn-primary{ background:var(--grad-brand); color:#fff; box-shadow:0 10px 24px rgba(226,38,43,.28); }
.btn-primary:hover{ transform:translateY(-2px); box-shadow:0 16px 32px rgba(226,38,43,.36); }
.btn-outline{ background:#fff; color:var(--navy-900); border-color:var(--gray-200); }
.btn-outline:hover{ border-color:var(--blue-500); color:var(--blue-600); }
.btn-white{ background:#fff; color:var(--navy-900); }
.btn-white:hover{ transform:translateY(-2px); }
.btn-ghost{ background:rgba(255,255,255,.12); color:#fff; border-color:rgba(255,255,255,.35); }
.btn-danger{ background:var(--danger); color:#fff; }
.btn-sm{ padding:9px 16px; font-size:13px; border-radius:9px; }
.btn-block{ width:100%; }
.btn:disabled{ opacity:.5; cursor:not-allowed; }

/* ---------- Navbar ---------- */
.navbar{
  position:sticky; top:0; z-index:100; background:rgba(255,255,255,.85); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--gray-200);
}
.navbar .container{ display:flex; align-items:center; justify-content:space-between; height:74px; }
.brand{ display:flex; align-items:center; gap:10px; font-weight:800; font-size:20px; color:var(--navy-900); }
.brand img{ height:34px; width:auto; }
.nav-links{ display:flex; align-items:center; gap:28px; list-style:none; }
.nav-links a{ font-weight:600; font-size:14.5px; color:var(--gray-700); }
.nav-links a:hover{ color:var(--blue-600); }
.nav-actions{ display:flex; align-items:center; gap:12px; }
.nav-toggle{ display:none; background:none; border:none; font-size:24px; cursor:pointer; padding:8px; }

/* Mobile menu when open */
.nav-links.open{
  display:flex !important;
  position:fixed;
  left:0;
  top:74px;
  right:0;
  width:100%;
  height:calc(100vh - 74px);
  background:#fff;
  flex-direction:column;
  padding:24px;
  gap:16px;
  z-index:98;
  box-shadow:var(--shadow);
  overflow-y:auto;
}
.nav-links.open a{
  display:block;
  padding:12px 0;
  border-bottom:1px solid var(--gray-200);
}

/* ---------- Hero ---------- */
.hero{ background:var(--grad-brand); color:#fff; position:relative; overflow:hidden; padding:96px 0 110px; }
.hero::before{
  content:""; position:absolute; inset:0;
  background:radial-gradient(circle at 15% 20%, rgba(103,232,249,.25), transparent 45%),
             radial-gradient(circle at 85% 80%, rgba(59,107,255,.35), transparent 45%);
}
.hero .container{ position:relative; display:grid; grid-template-columns:1.1fr .9fr; gap:56px; align-items:center; }
.hero-badge{
  display:inline-flex; align-items:center; gap:8px; background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.25); padding:8px 16px; border-radius:999px; font-size:13px; font-weight:700;
  margin-bottom:22px;
}
.hero h1{ font-size:52px; color:#fff; }
.hero h1 span{ background:linear-gradient(90deg,#FF6B6E,#FFD1D2); -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero p.lead{ font-size:18px; color:rgba(255,255,255,.85); max-width:520px; }
.hero-cta{ display:flex; gap:14px; margin-top:32px; flex-wrap:wrap; }
.hero-stats{ display:flex; gap:32px; margin-top:44px; flex-wrap:wrap; }
.hero-stats div b{ display:block; font-size:26px; }
.hero-stats div span{ font-size:13px; color:rgba(255,255,255,.7); }
.hero-visual{
  background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.2); border-radius:var(--radius-lg);
  padding:26px; backdrop-filter:blur(6px); box-shadow:var(--shadow-lg);
}
.route-card{ background:#fff; color:var(--navy-900); border-radius:var(--radius); padding:20px; box-shadow:var(--shadow); margin-bottom:14px;}
.route-card:last-child{margin-bottom:0;}
.route-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.route-pill{ font-size:12px; font-weight:800; padding:5px 10px; border-radius:999px; background:var(--info-bg); color:var(--info); }

/* ---------- Section ---------- */
.section{ padding:88px 0; }
.section-tight{ padding:56px 0; }
.section-alt{ background:#fff; }
.section-soft{ background:var(--grad-soft); }
.eyebrow{ display:inline-block; font-size:13px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--blue-600); margin-bottom:12px; }
.section-head{ max-width:640px; margin:0 auto 48px; text-align:center; }
.section-head h2{ font-size:38px; }
.section-head p{ color:var(--gray-500); font-size:16.5px; }

/* ---------- Cards / Grids ---------- */
.grid{ display:grid; gap:24px; }
.grid-2{ grid-template-columns:repeat(2,1fr); }
.grid-3{ grid-template-columns:repeat(3,1fr); }
.grid-4{ grid-template-columns:repeat(4,1fr); }
.card{ background:#fff; border-radius:var(--radius); padding:28px; box-shadow:var(--shadow-sm); border:1px solid var(--gray-200); transition:.2s; }
.card:hover{ box-shadow:var(--shadow); transform:translateY(-3px); }
.icon-tile{
  width:52px; height:52px; border-radius:14px; display:flex; align-items:center; justify-content:center;
  font-size:22px; background:var(--grad-brand); color:#fff; margin-bottom:18px;
}
.step-card{ position:relative; padding-top:8px;}
.step-num{
  position:absolute; top:-14px; left:24px; width:34px; height:34px; border-radius:50%;
  background:var(--grad-brand); color:#fff; display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:14px; box-shadow:var(--shadow);
}

/* ---------- Badges / Status ---------- */
.badge{ display:inline-flex; align-items:center; gap:6px; padding:5px 12px; border-radius:999px; font-size:12.5px; font-weight:700; }
.badge-success{ background:var(--success-bg); color:var(--success); }
.badge-warning{ background:var(--warning-bg); color:var(--warning); }
.badge-danger{ background:var(--danger-bg); color:var(--danger); }
.badge-info{ background:var(--info-bg); color:var(--info); }
.badge-dot{ width:7px; height:7px; border-radius:50%; background:currentColor; }

/* ---------- Timeline ---------- */
.timeline{ position:relative; margin-left:14px; padding-left:30px; border-left:2px dashed var(--gray-200); }
.timeline-item{ position:relative; padding-bottom:26px; }
.timeline-item:last-child{ padding-bottom:0; }
.timeline-dot{
  position:absolute; left:-38px; top:2px; width:18px; height:18px; border-radius:50%;
  background:#fff; border:3px solid var(--blue-500);
}
.timeline-item.done .timeline-dot{ background:var(--success); border-color:var(--success); }
.timeline-item.current .timeline-dot{ background:var(--blue-600); border-color:var(--blue-600); box-shadow:0 0 0 5px rgba(226,38,43,.15); }
.timeline-title{ font-weight:700; font-size:14.5px; }
.timeline-time{ font-size:12.5px; color:var(--gray-400); }

/* ---------- Forms ---------- */
.form-group{ margin-bottom:18px; }
label{ display:block; font-size:13.5px; font-weight:700; margin-bottom:6px; color:var(--navy-800); }
.form-control, select, textarea{
  width:100%; padding:12px 14px; border:1.5px solid var(--gray-200); border-radius:11px; font-size:14.5px;
  font-family:var(--font); background:#fff; color:var(--navy-900); transition:.15s;
}
.form-control:focus, select:focus, textarea:focus{ outline:none; border-color:var(--blue-500); box-shadow:0 0 0 4px rgba(59,107,255,.12); }
textarea{ resize:vertical; min-height:90px; }
.form-hint{ font-size:12.5px; color:var(--gray-500); margin-top:5px; }
.form-row{ display:grid; grid-template-columns:repeat(2,1fr); gap:16px; }
.auth-card{ max-width:440px; margin:70px auto; background:#fff; border-radius:var(--radius-lg); padding:44px; box-shadow:var(--shadow-lg); }
.checkbox-line{ display:flex; align-items:flex-start; gap:10px; font-size:13.5px; color:var(--gray-700); }

/* ---------- Alerts / Flash ---------- */
.alert{ padding:14px 18px; border-radius:12px; font-size:14px; margin-bottom:18px; font-weight:600; }
.alert-success{ background:var(--success-bg); color:var(--success); }
.alert-error{ background:var(--danger-bg); color:var(--danger); }
.alert-info{ background:var(--info-bg); color:var(--info); }
.alert-warning{ background:var(--warning-bg); color:#92650a; }

/* ---------- Tables ---------- */
table{ width:100%; border-collapse:collapse; }
.table th, .table td{ padding:14px 16px; text-align:left; border-bottom:1px solid var(--gray-200); font-size:14px; }
.table th{ color:var(--gray-500); font-size:12.5px; text-transform:uppercase; letter-spacing:.04em; }
.table-card{ background:#fff; border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow-sm); border:1px solid var(--gray-200); }

/* ---------- Pricing breakdown ---------- */
.cost-row{ display:flex; justify-content:space-between; padding:11px 0; border-bottom:1px dashed var(--gray-200); font-size:14.5px; }
.cost-row.total{ border:none; font-weight:800; font-size:18px; color:var(--navy-900); padding-top:18px; }
.cost-card{ background:#fff; border-radius:var(--radius); padding:26px; box-shadow:var(--shadow-sm); border:1px solid var(--gray-200); }

/* ---------- Footer ---------- */
.footer{ background:var(--navy-950); color:rgba(255,255,255,.7); padding:64px 0 28px; }
.footer h4{ color:#fff; font-size:15px; margin-bottom:16px; }
.footer a{ color:rgba(255,255,255,.65); font-size:14px; display:block; padding:5px 0; }
.footer a:hover{ color:#fff; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr 1fr; gap:24px; }
.footer-bottom{ margin-top:48px; padding-top:24px; border-top:1px solid rgba(255,255,255,.1); display:flex; justify-content:space-between; font-size:13px; flex-wrap:wrap; gap:10px; }
.social-row{ display:flex; gap:10px; margin-top:16px; }
.social-row a{ width:36px; height:36px; border-radius:10px; background:rgba(255,255,255,.08); display:flex; align-items:center; justify-content:center; }

/* ---------- Dashboard shell (customer) ---------- */
.dash-shell{ display:grid; grid-template-columns:260px 1fr; min-height:100vh; }
.dash-sidebar{ background:var(--navy-950); color:#fff; padding:28px 20px; position:sticky; top:0; height:100vh; }
.dash-sidebar .brand{ color:#fff; margin-bottom:36px; }
.dash-sidebar .brand img{ height:44px; }
.dash-nav a{ display:flex; align-items:center; gap:13px; padding:11px 14px; border-radius:10px; color:rgba(255,255,255,.7); font-weight:600; font-size:14px; margin-bottom:4px; }
.dash-nav a svg{ width:19px; height:19px; flex-shrink:0; opacity:.9; }
.dash-nav a:hover, .dash-nav a.active{ background:rgba(255,255,255,.08); color:#fff; }
.dash-nav a.active svg{ opacity:1; }
.dash-main{ padding:36px 40px; }
.dash-topbar{ display:flex; justify-content:space-between; align-items:center; margin-bottom:28px; }

/* Mobile top bar + slide-in sidebar toggle (hidden on desktop) */
.dash-mobile-bar{ display:none; }
.dash-sidebar-close{ display:none; }
.dash-overlay{ display:none; }
.stat-card{ background:#fff; border-radius:var(--radius); padding:22px; box-shadow:var(--shadow-sm); border:1px solid var(--gray-200); }
.stat-card b{ display:block; font-size:26px; margin-top:6px; }
.stat-card span{ font-size:13px; color:var(--gray-500); font-weight:700; text-transform:uppercase; letter-spacing:.03em; }

/* ---------- Dashboard v2: hero, stat cards, order rows, quick actions ---------- */
.dash-hero{
  background:var(--grad-brand); border-radius:var(--radius-lg); padding:34px 38px; color:#fff;
  display:flex; justify-content:space-between; align-items:center; gap:24px; margin-bottom:26px;
  position:relative; overflow:hidden;
}
.dash-hero::before{
  content:""; position:absolute; inset:0;
  background:radial-gradient(circle at 88% 15%, rgba(255,255,255,.14), transparent 45%),
             radial-gradient(circle at 10% 90%, rgba(255,255,255,.08), transparent 40%);
}
.dash-hero-text{ position:relative; z-index:1; }
.dash-hero h2{ color:#fff; font-size:25px; margin-bottom:6px; }
.dash-hero p{ color:rgba(255,255,255,.78); margin-bottom:0; font-size:14.5px; }
.dash-hero .btn-white{ position:relative; z-index:1; white-space:nowrap; flex-shrink:0; }

.stat-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin-bottom:26px; }
.stat-card-v2{
  background:#fff; border-radius:var(--radius); padding:20px; box-shadow:var(--shadow-sm); border:1px solid var(--gray-200);
  display:flex; align-items:center; gap:15px; transition:.2s;
}
.stat-card-v2:hover{ box-shadow:var(--shadow); transform:translateY(-2px); }
.stat-icon{ width:46px; height:46px; border-radius:13px; display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; }
.stat-icon.total{ background:var(--danger-bg); }
.stat-icon.active{ background:#fff4e5; }
.stat-icon.payment{ background:#eef2ff; }
.stat-icon.delivered{ background:var(--success-bg); }
.stat-text{ min-width:0; }
.stat-text span{ display:block; font-size:12px; color:var(--gray-500); font-weight:700; text-transform:uppercase; letter-spacing:.03em; margin-bottom:4px; white-space:nowrap; }
.stat-text b{ font-size:23px; color:var(--navy-900); }

.section-card{ background:#fff; border-radius:var(--radius-lg); padding:26px; box-shadow:var(--shadow-sm); border:1px solid var(--gray-200); margin-bottom:24px; }
.section-card-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.section-card-head h3{ font-size:17px; margin:0; }
.section-card-head a{ font-size:13.5px; font-weight:700; color:var(--blue-600); }

.order-row{
  display:flex; align-items:center; justify-content:space-between; gap:14px; padding:15px 4px;
  border-bottom:1px solid var(--gray-100); transition:.15s; color:inherit;
}
.order-row:last-child{ border-bottom:none; }
.order-row:hover{ background:var(--gray-50); border-radius:12px; padding-left:12px; padding-right:12px; margin:0 -12px; }
.order-row-left{ display:flex; align-items:center; gap:14px; min-width:0; }
.order-row-icon{ width:40px; height:40px; border-radius:11px; background:var(--gray-100); display:flex; align-items:center; justify-content:center; font-size:17px; flex-shrink:0; }
.order-row-info{ min-width:0; }
.order-row-info b{ display:block; font-size:14.5px; }
.order-row-info span{ font-size:12.5px; color:var(--gray-500); }
.order-row-right{ display:flex; align-items:center; gap:14px; flex-shrink:0; }
.order-row-total{ font-weight:800; font-size:15px; min-width:70px; text-align:right; }

.empty-state{ text-align:center; padding:36px 20px; }
.empty-state-icon{ font-size:38px; margin-bottom:10px; opacity:.5; }

.quick-action{
  display:flex; align-items:center; gap:15px; background:#fff; border-radius:var(--radius); padding:20px;
  box-shadow:var(--shadow-sm); border:1px solid var(--gray-200); transition:.2s; color:inherit;
}
.quick-action:hover{ box-shadow:var(--shadow); transform:translateY(-3px); border-color:var(--blue-500); }
.quick-action-icon{ width:44px; height:44px; border-radius:12px; background:var(--grad-brand); display:flex; align-items:center; justify-content:center; font-size:19px; color:#fff; flex-shrink:0; }
.quick-action b{ display:block; font-size:14.5px; margin-bottom:2px; }
.quick-action span{ font-size:12.5px; color:var(--gray-500); }

/* ---------- Account Settings page ---------- */
.account-summary-top{ display:flex; align-items:center; gap:18px; margin-bottom:22px; }
.avatar-circle{
  width:64px; height:64px; border-radius:50%; flex-shrink:0; color:#fff; font-weight:800; font-size:22px;
  display:flex; align-items:center; justify-content:center; letter-spacing:.02em;
}
.avatar-img{ object-fit:cover; }
.account-stat-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; border-top:1px solid var(--gray-200); padding-top:18px; }
.account-stat{ text-align:center; }
.account-stat span{ display:block; font-size:12px; color:var(--gray-500); font-weight:700; text-transform:uppercase; letter-spacing:.03em; margin-bottom:4px; }
.account-stat strong{ font-size:21px; color:var(--navy-900); }

.toggle-row{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 0; border-bottom:1px solid var(--gray-100); cursor:pointer; }
.toggle-row:last-of-type{ border-bottom:none; }
.toggle-row span:first-child{ font-size:14px; font-weight:600; color:var(--navy-900); }
.toggle-switch{ position:relative; display:inline-block; width:42px; height:24px; flex-shrink:0; }
.toggle-switch input{ opacity:0; width:0; height:0; }
.toggle-slider{
  position:absolute; inset:0; background:var(--gray-200); border-radius:999px; transition:.2s; cursor:pointer;
}
.toggle-slider::before{
  content:""; position:absolute; width:18px; height:18px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.2s;
  box-shadow:0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-slider{ background:var(--blue-600); }
.toggle-switch input:checked + .toggle-slider::before{ transform:translateX(18px); }

/* ---------- Utilities ---------- */
.flex{ display:flex; } .items-center{align-items:center;} .justify-between{justify-content:space-between;}
.gap-8{gap:8px;} .gap-12{gap:12px;} .gap-16{gap:16px;} .gap-24{gap:24px;}
.mt-8{margin-top:8px;} .mt-16{margin-top:16px;} .mt-24{margin-top:24px;} .mt-32{margin-top:32px;}
.mb-0{margin-bottom:0;} .mb-2{margin-bottom:2px;} .mb-4{margin-bottom:4px;} .mb-8{margin-bottom:8px;} .mb-16{margin-bottom:16px;} .mb-24{margin-bottom:24px;}
.text-center{text-align:center;} .text-muted{color:var(--gray-500);} .text-sm{font-size:13px;}
.w-full{width:100%;}
.pill-select{ display:flex; gap:10px; flex-wrap:wrap; }
.pill-select label{ display:flex; align-items:center; gap:8px; border:1.5px solid var(--gray-200); border-radius:999px; padding:9px 18px; font-weight:600; font-size:13.5px; cursor:pointer; margin-bottom:0;}
.pill-select input{ accent-color:var(--blue-600); }
.item-block{ border:1.5px solid var(--gray-200); border-radius:var(--radius); padding:20px; margin-bottom:18px; position:relative; background:#fafcff; }
.item-block .remove-item{ position:absolute; top:14px; right:14px; color:var(--danger); font-weight:700; cursor:pointer; font-size:13px; }

/* ========== RESPONSIVE / MOBILE FIRST ========== */
/* Tablets in landscape & small desktops (769px+) */
@media (max-width: 1024px){
  .container{ padding:0 20px; }
  .container-narrow{ padding:0 20px; }
  .grid-4{ grid-template-columns:repeat(2,1fr); }
  .nav-links{ gap:20px; font-size:14px; }
}

/* Tablets in portrait & larger phones (481px - 768px) */
@media (max-width: 768px){
  .container{ padding:0 16px; }
  .container-narrow{ padding:0 16px; }

  /* Navbar */
  .navbar .container{ height:64px; }
  .brand{ font-size:18px; }
  .brand img{ height:28px; }
  .nav-links{ gap:16px; display:none; }
  .nav-toggle{ display:block; color:var(--navy-900); }
  .nav-actions{ gap:8px; }
  .btn-sm{ padding:8px 14px; font-size:12px; }

  /* Hero */
  .hero{ padding:60px 0 80px; }
  .hero .container{ grid-template-columns:1fr; gap:32px; }
  .hero h1{ font-size:32px; }
  .hero p{ font-size:15px; }
  .hero-badge{ font-size:12px; }
  .hero-cta{ flex-direction:column; gap:12px; }
  .hero-cta .btn{ width:100%; }
  .hero-right-card{ max-width:100%; }

  /* Sections */
  .section, .section-alt{ padding:48px 0; }
  .section h2{ font-size:28px; }
  .grid-2, .grid-3, .grid-4{ grid-template-columns:1fr; }
  .grid-2-alt{ grid-template-columns:1fr; }

  /* Cards & Content */
  .card{ padding:18px; }
  .card h3{ font-size:16px; }
  .panel{ padding:16px; }
  .panel h3{ font-size:15px; }
  .a-grid{ gap:12px; }
  .a-grid-2, .a-grid-3, .a-grid-4{ grid-template-columns:1fr; }

  /* Forms */
  .form-row, .form-row-3, .form-row-4{ grid-template-columns:1fr; gap:12px; }
  .form-group{ margin-bottom:14px; }
  .form-control{ padding:11px 14px; font-size:16px; }
  textarea.form-control{ resize:vertical; }

  /* Buttons */
  .btn{ padding:11px 20px; font-size:14px; }
  .btn-block{ width:100%; }

  /* Fixed two-column page layouts (form + sidebar) use an inline
     grid-template-columns style set from PHP - !important is required
     here to win over that inline style and force a single column. */
  .grid[style*="grid-template-columns"]{ grid-template-columns:1fr !important; }
  .grid[style*="grid-template-columns"] > div[style*="sticky"]{ position:static !important; }

  /* Tables */
  .table-card{ overflow-x:visible; }
  .table{ font-size:13px; }
  .table th, .table td{ padding:10px; }

  /* Tables with a real <thead> (My Orders, My Returns, etc.) become
     stacked cards on mobile instead of a cramped, cut-off row. Tables
     without a <thead> (e.g. payment method details) are left as-is. */
  .table:has(thead) thead{ display:none; }
  .table:has(thead), .table:has(thead) tbody, .table:has(thead) tr, .table:has(thead) td{
    display:block; width:100%;
  }
  .table:has(thead) tr{
    background:#fff; border:1px solid var(--gray-200); border-radius:12px;
    margin-bottom:12px; padding:4px 0; box-shadow:var(--shadow-sm);
  }
  .table:has(thead) td{
    border-bottom:1px solid var(--gray-100); text-align:left; padding:9px 14px;
  }
  .table:has(thead) tr td:last-child{ border-bottom:none; }
  .table:has(thead) td::before{
    content:attr(data-label); display:block; font-weight:700; font-size:10.5px;
    text-transform:uppercase; letter-spacing:.03em; color:var(--gray-500); margin-bottom:3px;
  }
  .table:has(thead) td[data-label=""]::before{ content:none; }

  /* Timeline */
  .timeline{ gap:12px; }
  .timeline-item{ gap:8px; }
  .timeline-dot{ width:10px; height:10px; }

  /* Footer */
  .footer-grid{ grid-template-columns:repeat(2,1fr); gap:24px; }
  .footer-bottom{ flex-direction:column; gap:12px; text-align:center; }

  /* Dashboard */
  .dash-shell{ grid-template-columns:1fr; }

  .dash-mobile-bar{
    display:flex; align-items:center; gap:14px; position:sticky; top:0; z-index:200;
    background:#fff; border-bottom:1px solid var(--gray-200); padding:10px 16px;
  }
  .dash-mobile-bar .brand img{ height:38px; }
  .dash-menu-toggle{
    background:none; border:none; font-size:26px; line-height:1; cursor:pointer; color:var(--navy-900); padding:4px 6px;
  }

  .dash-sidebar{
    position:fixed; left:0; top:0; width:260px; height:100vh; z-index:999;
    transform:translateX(-100%); transition:transform .3s ease; overflow-y:auto;
  }
  .dash-sidebar.open{ transform:translateX(0); }
  .dash-sidebar-close{
    display:block; position:absolute; top:14px; right:14px; background:none; border:none;
    color:#fff; font-size:26px; line-height:1; cursor:pointer;
  }

  .dash-overlay{
    display:none; position:fixed; inset:0; background:rgba(13,13,18,.5); z-index:998;
  }
  .dash-overlay.open{ display:block; }

  .dash-main{ padding:16px; }
  .stat-card{ padding:16px; }
  .stat-card strong{ font-size:20px; }

  .dash-hero{ flex-direction:column; align-items:flex-start; padding:24px 22px; }
  .dash-hero .btn-white{ width:100%; text-align:center; }
  .stat-grid{ grid-template-columns:repeat(2,1fr); gap:12px; }
  .stat-card-v2{ padding:14px; gap:10px; }
  .stat-icon{ width:38px; height:38px; font-size:17px; }
  .stat-text b{ font-size:19px; }
  .section-card{ padding:18px; }
  .order-row-info span{ display:none; }
  .order-row-total{ min-width:auto; }
}

/* Small phones (320px - 480px) */
@media (max-width: 480px){
  html{ font-size:14px; }
  .container, .container-narrow{ padding:0 12px; }

  /* Navbar */
  .navbar .container{ height:56px; padding:0 12px; }
  .brand{ font-size:16px; }
  .brand img{ height:24px; }
  .nav-actions{ gap:4px; }
  .btn-sm{ padding:6px 12px; font-size:11px; }

  /* Hero */
  .hero{ padding:48px 0 60px; }
  .hero h1{ font-size:24px; line-height:1.2; }
  .hero p{ font-size:14px; }
  .hero-badge{ font-size:11px; padding:6px 12px; }
  .hero-cta .btn{ font-size:13px; padding:10px 18px; }
  .hero-stat{ flex:1; text-align:center; }
  .hero-stat strong{ font-size:20px; }
  .hero-stat small{ font-size:11px; }

  /* Sections */
  .section, .section-alt{ padding:36px 0; }
  .section h2{ font-size:22px; }
  .section p{ font-size:14px; }

  /* Cards */
  .card{ padding:14px; }
  .card h3{ font-size:15px; }
  .panel{ padding:12px; }
  .panel h3{ font-size:14px; }
  .a-card{ padding:14px; }
  .a-stat{ flex-direction:column; gap:4px; }
  .a-stat span{ font-size:12px; }
  .a-stat b{ font-size:18px; }

  /* Forms */
  .form-group{ margin-bottom:12px; }
  .form-control{ padding:10px 12px; font-size:16px; border-radius:8px; }
  label{ font-size:13px; }

  /* Buttons */
  .btn{ padding:10px 16px; font-size:13px; border-radius:10px; }
  .btn-primary{ box-shadow:none; }
  .btn-primary:active{ transform:scale(.98); }

  /* Text */
  h1{ font-size:20px; }
  h2{ font-size:18px; }
  h3{ font-size:16px; }
  p, .text-sm{ font-size:14px; }
  .text-muted{ font-size:12px; }

  /* Tables */
  .table-card{ font-size:12px; }
  .table th, .table td{ padding:8px 6px; }

  /* Badges */
  .badge{ padding:4px 10px; font-size:11px; border-radius:6px; }

  /* Footer */
  .footer-grid{ grid-template-columns:1fr; gap:16px; }
  .footer-bottom{ gap:8px; font-size:12px; }

  /* Dashboard stats */
  .stat-card{ padding:12px; }
  .stat-card strong{ font-size:18px; }
  .stat-card .text-muted{ font-size:11px; }
  .dash-hero h2{ font-size:20px; }
  .dash-hero p{ font-size:13px; }
  .stat-grid{ grid-template-columns:1fr 1fr; gap:10px; }
  .stat-icon{ width:34px; height:34px; font-size:15px; border-radius:10px; }
  .stat-text span{ font-size:10.5px; }
  .stat-text b{ font-size:17px; }
  .order-row-icon{ display:none; }
  .quick-action{ padding:14px; }
  .quick-action-icon{ width:38px; height:38px; font-size:16px; }

  /* Item blocks (orders) */
  .item-block{ padding:14px; margin-bottom:12px; }
  .item-block .remove-item{ font-size:12px; }

  /* Cost row */
  .cost-row{ padding:10px 0; font-size:13px; }
  .cost-row strong{ font-size:14px; }
}

/* Extra small phones (< 320px) */
@media (max-width: 320px){
  html{ font-size:13px; }
  .container, .container-narrow{ padding:0 8px; }
  .btn{ padding:8px 12px; font-size:12px; }
  .form-control{ font-size:15px; }
  h1{ font-size:18px; }
}
