/* ============================================================
   LOGIX ERP — Design System
   Font: Syne (display) + DM Sans (body)
   Theme: Industrial Precision — white surfaces with amber accent
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM Sans:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,400..700,0..1,-25..200&display=swap');

/* ── Variables ── */
:root {
  --navy:        #f5f7fa;
  --navy-800:    #FFFFFF;
  --navy-700:    #f8f9fb;
  --navy-600:    #f0f1f3;
  --navy-500:    #7D8EA3;
  --slate-400:   #64748B;
  --slate-300:   #223247;
  --slate-100:   #F8FAFC;
  --white:       #0F172A;
  --ink:         #0F172A;
  --border:      rgba(15,23,42,.10);
  --border-strong: rgba(15,23,42,.16);
  --surface-hover: rgba(15,23,42,.04);

  --amber:       #F59E0B;
  --amber-light: #FCD34D;
  --amber-dim:   #78350F;

  --green:       #10B981;
  --green-dim:   #065F46;
  --red:         #EF4444;
  --red-dim:     #7F1D1D;
  --blue:        #3B82F6;
  --blue-dim:    #1E3A5F;
  --purple:      #8B5CF6;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --radius-lg:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;

  --shadow-sm:  0 6px 18px rgba(15,23,42,.06);
  --shadow-md:  0 14px 34px rgba(15,23,42,.08);
  --shadow-lg:  0 24px 60px rgba(15,23,42,.12);

  --sidebar-w:  260px;
  --header-h:   64px;

  --trans:      .18s cubic-bezier(.4,0,.2,1);
}

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

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-right: 6px;
}

.icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(15,23,42,.05); }
::-webkit-scrollbar-thumb { background: rgba(15,23,42,.18); border-radius: 4px; }

/* ── Typography ── */
h1,h2,h3,h4,h5 { font-family: var(--font-display); color: var(--white); line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 2vw, 1.8rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: .95rem; font-weight: 600; }
p  { color: var(--slate-400); line-height: 1.7; }

/* ── Utility ── */
.text-amber  { color: var(--amber); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-muted  { color: var(--slate-400); }
.text-white  { color: var(--white); }
.text-center { text-align: center; }
.flex        { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 16px; }
.gap-3 { gap: 12px; }
.gap-2 { gap: 8px; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* ── Card ── */
.card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--trans), box-shadow var(--trans);
}
.card:hover { border-color: rgba(245,158,11,.18); box-shadow: var(--shadow-md); }
.card-sm { padding: 16px; }
.card-glass {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
}
.portal-two-col{
  margin-left: 10px;
  margin-right: 150px;
}
/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  font-weight: 500;
  font-size: .9rem;
  border: none;
  transition: all var(--trans);
  white-space: nowrap;
}
.btn-primary {
  background: var(--amber);
  color: var(--ink);
  font-weight: 700;
}
.btn-primary:hover { background: var(--amber-light); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,158,11,.35); }
.btn-secondary {
  background: #FFFFFF;
  color: var(--white);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: #f8f9fb; border-color: var(--border-strong); }
.btn-ghost {
  background: transparent;
  color: var(--slate-400);
  border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--white); background: var(--surface-hover); }
.btn-danger { background: rgba(239,68,68,.15); color: var(--red); border: 1px solid rgba(239,68,68,.25); }
.btn-danger:hover { background: rgba(239,68,68,.25); }
.btn-success { background: rgba(16,185,129,.15); color: var(--green); border: 1px solid rgba(16,185,129,.25); }
.btn-success:hover { background: rgba(16,185,129,.25); }
.btn-sm { padding: 6px 14px; font-size: .82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-icon { padding: 8px; border-radius: var(--radius-lg); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
}
.badge-amber   { background: rgba(245,158,11,.15); color: var(--amber); border: 1px solid rgba(245,158,11,.25); }
.badge-green   { background: rgba(16,185,129,.15); color: var(--green); border: 1px solid rgba(16,185,129,.25); }
.badge-blue    { background: rgba(59,130,246,.15); color: var(--blue); border: 1px solid rgba(59,130,246,.25); }
.badge-red     { background: rgba(239,68,68,.15); color: var(--red); border: 1px solid rgba(239,68,68,.25); }
.badge-purple  { background: rgba(139,92,246,.15); color: var(--purple); border: 1px solid rgba(139,92,246,.25); }
.badge-slate   { background: rgba(148,163,184,.1); color: var(--slate-400); border: 1px solid rgba(148,163,184,.2); }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: .82rem; font-weight: 600; color: var(--slate-300); letter-spacing: .04em; text-transform: uppercase; }
.form-input {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--ink);
  padding: 10px 14px;
  font-size: .9rem;
  transition: border-color var(--trans), box-shadow var(--trans);
  outline: none;
}
.form-input::placeholder { color: var(--navy-500); }
.form-input:focus { border-color: rgba(245,158,11,.45); box-shadow: 0 0 0 3px rgba(245,158,11,.14); background: #FFFFFF; }
.form-input:disabled { opacity: .5; cursor: not-allowed; }
select.form-input { cursor: pointer; }
select.form-input option { background: #FFFFFF; }
textarea.form-input { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ── Table ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
table th {
  background: #f8f9fb;
  color: var(--slate-400);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(15,23,42,.06);
  color: var(--slate-300);
  vertical-align: middle;
}
table tbody tr { transition: background var(--trans); }
table tbody tr:hover { background: rgba(15,23,42,.025); }
table tbody tr:last-child td { border-bottom: none; }

/* ── Stat Card ── */
.stat-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--trans), border-color var(--trans);
}
.stat-card:hover { transform: translateY(-2px); border-color: rgba(245,158,11,.2); }
.stat-card .stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.stat-card .stat-value { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--white); line-height: 1; margin-bottom: 4px; }
.stat-card .stat-label { font-size: .8rem; color: var(--slate-400); font-weight: 500; }
.stat-card .stat-delta { font-size: .75rem; margin-top: 8px; font-weight: 600; }
.stat-card .stat-glow {
  position: absolute; top: -30px; right: -20px;
  width: 120px; height: 120px;
  border-radius: 50%;
  opacity: .08;
  filter: blur(30px);
}

/* ── Sidebar Layout ── */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: #FFFFFF;
  border-right: 1px solid var(--border);
  box-shadow: 8px 0 30px rgba(15,23,42,.05);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--trans);
}
.sidebar-logo {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .logo-mark {
  display: flex; align-items: center; gap: 10px;
}

/* ── UPDATED LOGO STYLES ── */
.logo-icon {
  width: 36px;
  height: 36px;
  background: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0;
  color: transparent;
  flex-shrink: 0;
}
.logo-icon::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: url('logo.png') center / contain no-repeat;
}

.logo-text { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: var(--white); }
.logo-text span { color: var(--amber); }

.sidebar-section { padding: 8px 12px; }
.sidebar-section-title {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--navy-500);
  padding: 10px 12px 4px;
}
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  margin: 1px 10px;
  border-radius: var(--radius-lg);
  color: var(--slate-400);
  font-size: .88rem;
  font-weight: 500;
  transition: all var(--trans);
  cursor: pointer;
  position: relative;
}
.nav-item:hover { background: var(--surface-hover); color: var(--white); }
.nav-item.active { background: rgba(245,158,11,.12); color: #B45309; }
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%; background: var(--amber);
  border-radius: 0 2px 2px 0; margin-left: -10px;
}
.nav-item .nav-icon { width: 18px; text-align: center; font-size: 1rem; }
.nav-item .nav-icon .material-symbols-outlined { font-size: 18px; }
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--amber);
  color: var(--ink);
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 100px;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background var(--trans);
}
.sidebar-user:hover { background: var(--surface-hover); }
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber) 0%, #d97706 100%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; color: var(--ink);
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: .85rem; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: .72rem; color: var(--slate-400); }

/* ── Main Content ── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--header-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title h2 { font-size: 1.1rem; font-weight: 700; }
.topbar-title p { font-size: .78rem; color: var(--slate-400); margin-top: -1px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.profile-shortcut {
  height: 40px;
  padding: 0 10px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--white);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--trans), border-color var(--trans), transform var(--trans);
}
.profile-shortcut:hover {
  background: #f8f9fb;
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.profile-shortcut:active {
  transform: translateY(0) scale(.98);
}
.profile-shortcut.active,
.profile-shortcut[aria-pressed="true"] {
  background: rgba(245,158,11,.14);
  border-color: rgba(245,158,11,.35);
  color: #B45309;
  box-shadow: inset 0 0 0 1px rgba(245,158,11,.08);
}
.profile-shortcut.active .topbar-avatar,
.profile-shortcut[aria-pressed="true"] .topbar-avatar {
  box-shadow: 0 0 0 2px rgba(245,158,11,.18);
}
.profile-shortcut .material-symbols-outlined { font-size: 18px; }
.topbar-avatar {
  width: 28px;
  height: 28px;
  font-size: .72rem;
}

.notif-btn {
  width: 38px; height: 38px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; cursor: pointer;
  transition: all var(--trans); position: relative;
}
.notif-btn:hover { background: #f8f9fb; border-color: var(--border-strong); }
.notif-btn .material-symbols-outlined { font-size: 20px; }
.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--amber); border-radius: 50%;
  border: 2px solid #FFFFFF;
}

.page-content { flex: 1; padding: 28px; }

/* ── Page Header ── */
.page-header { margin-bottom: 28px; }
.page-header h1 { margin-bottom: 4px; }
.page-header p { font-size: .9rem; }

/* ── Stats Grid ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }

.dashboard-cta {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  width: 100%;
}
.dashboard-cta-button {
  width: 100%;
  min-height: 56px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(245,158,11,.2);
  justify-content: center;
}
.dashboard-cta-button .material-symbols-outlined {
  font-size: 22px;
}

/* ── Timeline ── */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: ''; position: absolute; left: 8px; top: 0; bottom: 0;
  width: 2px; background: rgba(15,23,42,.10);
}
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -20px; top: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  background: #e2e8f0;
}
.timeline-dot.done { background: var(--green); }
.timeline-dot.active { background: var(--amber); box-shadow: 0 0 0 4px rgba(245,158,11,.2); }
.timeline-time { font-size: .72rem; color: var(--slate-400); margin-bottom: 2px; }
.timeline-text { font-size: .875rem; color: var(--slate-300); font-weight: 500; }
.timeline-sub { font-size: .78rem; color: var(--slate-400); }

/* ── Progress Steps ── */
.progress-steps { display: flex; align-items: center; gap: 0; margin: 20px 0; }
.progress-step { display: flex; flex-direction: column; align-items: center; flex: 1; }
.step-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
  border: 2px solid rgba(15,23,42,.12);
  color: var(--slate-400);
  background: #FFFFFF;
  position: relative; z-index: 1;
}
.step-circle.done { background: var(--green); border-color: var(--green); color: white; }
.step-circle.active { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.step-line { flex: 1; height: 2px; background: rgba(15,23,42,.08); margin-top: -16px; }
.step-line.done { background: var(--green); }
.step-label { font-size: .68rem; color: var(--slate-400); margin-top: 8px; text-align: center; max-width: 70px; }

/* ── Map container ── */
.map-container {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: #dbe7f3;
  border: 1px solid var(--border);
}
.map-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(255,255,255,.96) 0%, transparent 100%);
  padding: 20px;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--trans);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(20px) scale(.97);
  transition: transform var(--trans);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.modal-close { background: #f8f9fb; border: none; color: var(--slate-400); width: 30px; height: 30px; border-radius: var(--radius-lg); font-size: 1rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; transition: all var(--trans); }
.modal-close:hover { background: rgba(15,23,42,.10); color: var(--white); }
.modal-footer { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; border-top: 1px solid var(--border); padding-top: 20px; }

/* ── Shipment Drawer ── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.34);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--trans);
  z-index: 1040;
}
.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.shipment-drawer {
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: min(100%, 480px);
  transform: translateX(calc(100% + 24px));
  transition: transform .26s cubic-bezier(.4,0,.2,1);
  z-index: 1050;
  pointer-events: none;
}
.shipment-drawer.open {
  transform: translateX(0);
  pointer-events: auto;
}
.shipment-drawer-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 20px;
  box-shadow: 0 26px 80px rgba(15,23,42,.18);
  overflow: hidden;
}
.shipment-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 18px;
  background: #ffffff;
  border-bottom: 1px solid rgba(148,163,184,.16);
}
.shipment-drawer-kicker {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 10px;
}
.drawer-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.drawer-shipment-id {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
}
.drawer-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
}
.drawer-status-pill.is-delivered {
  background: rgba(34,197,94,.12);
  color: #15803d;
}
.drawer-status-pill.is-pending {
  background: rgba(245,158,11,.14);
  color: #b45309;
}
.drawer-status-pill.is-transit {
  background: rgba(100,116,139,.12);
  color: #475569;
}
.drawer-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: .8rem;
  color: #64748b;
}
.drawer-header-meta span {
  display: inline-flex;
  align-items: center;
}
.drawer-header-meta .icon-inline {
  margin-right: 5px;
}
.drawer-close {
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: white;
  color: #64748b;
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
}
.drawer-close:hover {
  color: #0f172a;
  background: #fff7ed;
}
.shipment-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.drawer-section {
  background: white;
  border: 1px solid rgba(148,163,184,.14);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 12px 32px rgba(15,23,42,.05);
}
.drawer-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.drawer-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: .72rem;
  font-weight: 700;
}
.drawer-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.drawer-info-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid rgba(148,163,184,.12);
  border-radius: 14px;
  padding: 14px;
}
.drawer-info-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #fff7ed;
  color: #b45309;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.drawer-info-label {
  font-size: .72rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}
.drawer-info-value {
  font-size: .9rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}
.tracking-widget {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tracking-map {
  position: relative;
  height: 190px;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.78), rgba(241,245,249,.95)),
    radial-gradient(circle at top left, rgba(59,130,246,.14), transparent 42%),
    radial-gradient(circle at bottom right, rgba(34,197,94,.10), transparent 38%);
  border: 1px solid rgba(148,163,184,.16);
}
.tracking-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148,163,184,.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.14) 1px, transparent 1px);
  background-size: 26px 26px;
}
.tracking-route {
  position: absolute;
  left: 16%;
  right: 18%;
  top: 52%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(148,163,184,.45) 0%, #60a5fa 45%, #60a5fa 55%, rgba(34,197,94,.55) 100%);
}
.tracking-pin,
.tracking-marker {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(15,23,42,.12);
}
.tracking-pin {
  background: white;
  color: #64748b;
}
.tracking-pin-start {
  left: 14%;
  top: calc(52% - 16px);
}
.tracking-pin-end {
  right: 14%;
  top: calc(52% - 18px);
  color: #0f766e;
}
.tracking-marker {
  left: 50%;
  top: calc(52% - 20px);
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: #0f172a;
  color: white;
  animation: shipmentPulse 1.9s ease-in-out infinite;
}
.tracking-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tracking-meta-card {
  background: #f8fafc;
  border: 1px solid rgba(148,163,184,.12);
  border-radius: 14px;
  padding: 14px;
}
.tracking-meta-label {
  font-size: .72rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}
.tracking-meta-value {
  font-size: .95rem;
  font-weight: 700;
  color: #0f172a;
}
.drawer-history {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.drawer-history::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(180deg, rgba(148,163,184,.25), rgba(148,163,184,.08));
}
.drawer-timeline-item {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.drawer-timeline-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(148,163,184,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  z-index: 1;
  flex-shrink: 0;
}
.drawer-timeline-copy {
  padding-top: 3px;
}
.drawer-timeline-title {
  font-size: .9rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 3px;
}
.drawer-timeline-meta {
  font-size: .78rem;
  color: #64748b;
}
.shipment-drawer-actions {
  display: flex;
  gap: 12px;
  padding: 18px 22px 22px;
  border-top: 1px solid rgba(148,163,184,.14);
  background: rgba(255,255,255,.98);
}
.shipment-drawer-actions .btn {
  flex: 1;
  justify-content: center;
}

@keyframes shipmentPulse {
  0%, 100% { box-shadow: 0 10px 28px rgba(15,23,42,.16), 0 0 0 0 rgba(59,130,246,.24); }
  50% { box-shadow: 0 14px 34px rgba(15,23,42,.2), 0 0 0 10px rgba(59,130,246,0); }
}

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; background: #f8f9fb; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 4px; }
.tab-btn {
  flex: 1; padding: 8px 16px;
  border-radius: calc(var(--radius-lg) - 2px);
  border: none; background: transparent;
  color: var(--slate-400); font-size: .85rem; font-weight: 500;
  transition: all var(--trans);
}
.tab-btn.active { background: #FFFFFF; color: var(--white); box-shadow: var(--shadow-sm); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Search ── */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: #f8f9fb;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 14px;
  transition: border-color var(--trans);
}
.search-bar:focus-within { border-color: var(--amber); }
.search-bar input { background: none; border: none; outline: none; color: var(--white); font-size: .88rem; flex: 1; }
.search-bar input::placeholder { color: var(--navy-500); }
.search-icon { color: var(--slate-400); font-size: .9rem; }
.search-icon .material-symbols-outlined { font-size: 18px; }

/* ── Divider ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── Notification panel ── */
.notif-panel {
  position: fixed; top: var(--header-h); right: 0;
  width: 340px; max-height: calc(100vh - var(--header-h));
  background: var(--navy-800);
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow-y: auto; z-index: 200;
  transform: translateX(100%);
  transition: transform var(--trans);
}
.notif-panel.open { transform: translateX(0); }
.notif-item { padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.05); transition: background var(--trans); }
.notif-item:hover { background: rgba(255,255,255,.03); }
.notif-item.unread { border-left: 3px solid var(--amber); }
.notif-title { font-size: .85rem; font-weight: 600; color: var(--white); margin-bottom: 3px; }
.notif-desc { font-size: .78rem; color: var(--slate-400); }
.notif-time { font-size: .7rem; color: var(--navy-500); margin-top: 4px; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: .4; }
.empty-state h3 { font-size: 1rem; margin-bottom: 8px; }
.empty-state p { font-size: .85rem; max-width: 280px; margin: 0 auto 20px; }

/* ── Tooltip ── */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--white); color: #fff; padding: 4px 10px;
  border-radius: 4px; font-size: .72rem; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity var(--trans);
}
[data-tip]:hover::after { opacity: 1; }

/* ── Sidebar toggle for mobile ── */
.sidebar-toggle {
  display: none;
  position: fixed; bottom: 20px; right: 20px;
  width: 48px; height: 48px;
  background: var(--amber); color: var(--ink);
  border: none; border-radius: 50%;
  font-size: 1.2rem; z-index: 300;
  box-shadow: var(--shadow-lg);
}
.sidebar-toggle .material-symbols-outlined { font-size: 22px; }

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.4; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

.animate-in { animation: fadeInUp .4s cubic-bezier(.4,0,.2,1) both; }
.animate-in:nth-child(1) { animation-delay: 0s; }
.animate-in:nth-child(2) { animation-delay: .06s; }
.animate-in:nth-child(3) { animation-delay: .12s; }
.animate-in:nth-child(4) { animation-delay: .18s; }
.animate-in:nth-child(5) { animation-delay: .24s; }

.skeleton {
  background: linear-gradient(90deg, #f8f9fb 25%, rgba(255,255,255,0.9) 50%, #f8f9fb 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
}

/* ── Mobile utility classes ── */
.mobile-only { display: none !important; }
.desktop-only { display: initial; }

/* ── Sidebar overlay backdrop ── */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s cubic-bezier(.4,0,.2,1);
}
.sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Button press effects (touch feedback) ── */
.btn:active {
  transform: scale(.96) !important;
  transition: transform .08s ease !important;
}
.stat-card:active {
  transform: scale(.98) !important;
  transition: transform .08s ease !important;
}
.portal-card:active {
  transform: scale(.97) !important;
}
.nav-item:active {
  transform: scale(.97);
  transition: transform .08s ease;
}

/* ── Mobile topbar header ── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 98;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mobile-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--white);
}
.mobile-header-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.mobile-header-logo span {
  color: var(--amber);
}
.mobile-hamburger {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.mobile-hamburger:active {
  background: var(--surface-hover);
  transform: scale(.93);
}
.mobile-hamburger .material-symbols-outlined {
  font-size: 20px;
  color: var(--white);
}

/* ── Desktop Sidebar Collapse ── */
@media (min-width: 901px) {
  body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
  }
  body.sidebar-collapsed .main-content {
    margin-left: 0;
  }
}

/* ── Responsive: Tablet ≤ 900px ── */
@media (max-width: 900px) {
  .mobile-only { display: initial !important; }
  .desktop-only { display: none !important; }

  /* Sidebar */
  .sidebar {
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 16px 0 48px rgba(0,0,0,.18);
  }

  .main-content { margin-left: 0; }

  /* Mobile header bar */
  .mobile-header { display: flex; }
  .main-content { padding-top: 56px; }
  .topbar { top: 56px; }

  /* Hide old FAB toggle */
  .sidebar-toggle { display: none; }

  /* Forms */
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .portal-two-col { margin-left: 0; margin-right: 0; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

  /* Dashboard CTA */
  .dashboard-cta {
    flex-direction: column;
    align-items: flex-start;
  }
  .dashboard-cta-button {
    width: 100%;
    justify-content: center;
  }

  /* Shipment drawer */
  .shipment-drawer {
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
  }
  .shipment-drawer-shell { border-radius: 0; }
  .drawer-quick-grid,
  .tracking-meta-row { grid-template-columns: 1fr 1fr; }

  /* Tables — card layout on mobile */
  .table-wrap { overflow: visible; background: transparent; }
  .table-wrap table, 
  .table-wrap thead, 
  .table-wrap tbody, 
  .table-wrap tr, 
  .table-wrap th, 
  .table-wrap td { display: block; width: 100%; }
  
  .table-wrap thead tr { display: none; }
  
  .table-wrap tr {
    margin-bottom: 16px;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    box-shadow: var(--shadow-sm);
  }
  
  .table-wrap td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    padding: 10px 0;
    border-bottom: 1px solid rgba(15,23,42,.04);
  }
  
  .table-wrap td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  .table-wrap td:first-child {
    padding-top: 0;
  }
  
  .table-wrap td::before {
    content: attr(data-label);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--slate-400);
    margin-right: 16px;
    text-align: left;
    white-space: nowrap;
  }
  
  .table-wrap td > * {
    text-align: right;
  }
}

/* ── Responsive: Phone ≤ 600px ── */
@media (max-width: 600px) {
  /* Typography scaling */
  h1 { font-size: clamp(1.35rem, 5vw, 1.8rem) !important; }
  h2 { font-size: clamp(1.05rem, 4vw, 1.3rem) !important; }
  h3 { font-size: 1rem !important; }

  /* Page content */
  .page-content { padding: 16px; }
  .page-header { margin-bottom: 20px; }
  .page-header p { font-size: .82rem; }

  /* Topbar compact */
  .topbar {
    padding: 0 14px;
    height: 52px;
  }
  .topbar-title h2 { font-size: .95rem; }
  .topbar-actions { gap: 6px; }

  /* Icon-only logout on mobile — hide text inside logout button */
  .topbar-actions > .btn.btn-secondary.btn-sm {
    padding: 6px 8px;
    gap: 0;
    font-size: 0;
    min-width: 36px;
    min-height: 36px;
    justify-content: center;
  }
  .topbar-actions > .btn.btn-secondary.btn-sm .material-symbols-outlined {
    font-size: 18px;
    margin-right: 0;
  }

  /* Hide verbose topbar badges */
  .topbar-actions .live-dot { display: none; }

  /* Profile shortcut compact */
  .profile-shortcut {
    height: 36px;
    padding: 0 6px;
    gap: 4px;
  }
  .profile-shortcut .material-symbols-outlined { font-size: 16px; }
  .topbar-avatar { width: 24px; height: 24px; font-size: .65rem; }

  /* Notification button compact */
  .notif-btn { width: 36px; height: 36px; }
  .notif-btn .material-symbols-outlined { font-size: 18px; }

  /* Stats grid — 2 col compact */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat-card {
    padding: 14px 16px;
  }
  .stat-card .stat-value {
    font-size: 1.5rem;
  }
  .stat-card .stat-label {
    font-size: .72rem;
  }
  .stat-card .stat-icon {
    width: 36px; height: 36px;
    margin-bottom: 10px;
  }
  .stat-card .stat-icon .material-symbols-outlined {
    font-size: 18px;
  }

  /* Cards compact */
  .card { padding: 16px; }
  .card-sm { padding: 12px; }

  /* Form inputs — touch-friendly */
  .form-input {
    min-height: 48px;
    font-size: .92rem;
    padding: 12px 14px;
    border-radius: 10px;
  }
  select.form-input {
    min-height: 48px;
  }
  textarea.form-input {
    min-height: 80px;
  }

  /* Buttons — touch-friendly */
  .btn {
    min-height: 44px;
    padding: 10px 18px;
    font-size: .85rem;
    border-radius: 10px;
  }
  .btn-sm {
    min-height: 36px;
    padding: 6px 12px;
    font-size: .78rem;
  }
  .btn-lg {
    min-height: 50px;
    padding: 12px 24px;
    font-size: .95rem;
    width: 100%;
    justify-content: center;
  }

  /* Drawer fullscreen mobile */
  .shipment-drawer-body,
  .shipment-drawer-head,
  .shipment-drawer-actions {
    padding-left: 16px;
    padding-right: 16px;
  }
  .shipment-drawer-actions {
    flex-direction: column;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .drawer-quick-grid { grid-template-columns: 1fr; gap: 10px; }
  .tracking-meta-row { grid-template-columns: 1fr; }

  /* Modal compact */
  .modal { padding: 20px 16px; border-radius: 16px; }
  .modal-overlay { padding: 12px; }

  /* Sidebar footer compact */
  .sidebar-footer { padding: 12px 10px; }

  /* Tabs compact */
  .tab-btn { padding: 8px 10px; font-size: .78rem; }

  /* Search bar */
  .search-bar { padding: 6px 12px; }
  .search-bar input { font-size: .84rem; }

  /* Empty state compact */
  .empty-state { padding: 36px 16px; }

  /* Notification panel full-width */
  .notif-panel {
    width: 100%;
    top: calc(56px + 52px);
    border-radius: 0 0 12px 12px;
    border-left: none;
  }

  /* Portal two-col stack */
  .portal-two-col {
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  /* Step nav — full width stacked */
  #step-nav {
    flex-direction: column-reverse !important;
    gap: 10px;
  }
  #step-nav .btn {
    width: 100%;
    margin-left: 0 !important;
    justify-content: center;
  }

  /* Booking CTA grid */
  .booking-cta-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  /* Table font size */
  table { font-size: .78rem; }
  table th { padding: 10px 12px; font-size: .65rem; }
  table td { padding: 10px 12px; }

  /* Badges compact */
  .badge { font-size: .68rem; padding: 2px 8px; }
  .nav-badge { font-size: .6rem; padding: 1px 5px; }
}

/* ── Responsive: Small phone ≤ 400px ── */
@media (max-width: 400px) {
  .page-content { padding: 12px; }
  .card { padding: 14px; }
  .stats-grid { gap: 8px; }
  .stat-card { padding: 12px 14px; }
  .stat-card .stat-value { font-size: 1.3rem; }
  .mobile-header { padding: 0 12px; }
  .topbar { padding: 0 12px; }
  .booking-cta-grid { grid-template-columns: 1fr !important; }
  .modal { padding: 16px 14px; }
  .modal-overlay { padding: 8px; }
}

/* ── Safe area insets for notched phones ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .sidebar-footer {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .shipment-drawer-actions {
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }
}

/* ── Shipment ID style ── */
.shipment-id {
  font-family: var(--font-display);
  font-weight: 700; font-size: .8rem;
  color: var(--amber);
  letter-spacing: .05em;
}

/* ── Live ping indicator ── */
.live-dot {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; color: var(--green); font-weight: 600;
}
.live-dot::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%; background: var(--green);
  animation: pulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 6px var(--green);
}

/* ── Dropdown menu ── */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 180px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px;
  z-index: 500;
  display: none;
  box-shadow: var(--shadow-lg);
}
.dropdown-menu.open { display: block; animation: fadeInUp .15s ease; }
.dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-lg);
  font-size: .85rem; color: var(--slate-300);
  cursor: pointer; transition: all var(--trans);
}
.dropdown-item:hover { background: rgba(15,23,42,.06); color: var(--white); }
.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: rgba(239,68,68,.1); }


.landing-icon {
  width: 100px;          
  height: 100px;
  border-radius: 6px !important;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  background: none !important;   
  box-shadow: none !important;  
}

.logo-img {
  width: 70px !important;
  height: 70px !important;
  object-fit: contain;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}