@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* ========= CSS VARIABLES ========= */
:root {
  --primary: #2B3A8C;
  --primary-light: #4F63D2;
  --accent: #6366F1;
  --success: #059669;
  --success-bg: #ECFDF5;
  --warning: #D97706;
  --warning-bg: #FFFBEB;
  --danger: #DC2626;
  --danger-bg: #FEF2F2;
  --info: #0284C7;
  --info-bg: #F0F9FF;
  --gray: #6B7280;
  --gray-bg: #F3F4F6;
  --bg: #EEF2FA;
  --card: #FFFFFF;
  --text: #111827;
  --text-light: #6B7280;
  --border: #E5E7EB;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 12px rgba(17,24,39,0.07), 0 1px 3px rgba(17,24,39,0.04);
  --shadow-md: 0 4px 20px rgba(43,58,140,0.10);
  --shadow-up: 0 -4px 20px rgba(43,58,140,0.07);
  --topbar-h: 58px;
  --nav-h: 66px;
  --font: 'Poppins', sans-serif;
}

/* ========= RESET ========= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { height: 100%; }
body { height: 100%; background: #1C2340; font-family: var(--font); font-size: 14px; color: var(--text); overscroll-behavior: none; line-height: 1.5; }
a { color: inherit; }
button, input, select, textarea { font-family: var(--font); }
img { max-width: 100%; }

/* ========= APP SHELL ========= */
.phone-wrap {
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* ========= TOPBAR ========= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--topbar-h);
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(43,58,140,0.06);
  flex-shrink: 0;
}

.topbar-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  flex-shrink: 0;
}

.topbar-title {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  position: relative;
  font-size: 16px;
}

.notif-badge {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid #fff;
}

/* ========= SCREEN CONTENT ========= */
.screen {
  flex: 1;
  overflow-y: auto;
  padding-bottom: calc(var(--nav-h) + 12px);
  -webkit-overflow-scrolling: touch;
}

.screen.no-nav { padding-bottom: 24px; }

/* ========= BOTTOM NAV ========= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--nav-h);
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  box-shadow: var(--shadow-up);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 0;
  text-decoration: none;
  color: var(--text-light);
  font-size: 10px;
  font-weight: 500;
  transition: color .2s;
  position: relative;
}

.nav-item i { font-size: 20px; transition: transform .2s; }
.nav-item.active { color: var(--primary-light); }
.nav-item.active i { transform: translateY(-2px); }

/* ========= LAYOUT HELPERS ========= */
.px { padding-left: 16px; padding-right: 16px; }
.section { padding: 0 16px; margin-bottom: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }

/* ========= FLASH ========= */
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  animation: flashIn .3s ease, flashOut .4s ease 2.8s forwards;
}
.flash-success { background: var(--success-bg); color: var(--success); }
.flash-error   { background: var(--danger-bg);  color: var(--danger);  }
.flash-info    { background: var(--info-bg);    color: var(--info);    }

.flash-wrap { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; z-index: 999; pointer-events: none; }
.flash-msg  { padding: 13px 16px; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 10px; }

@keyframes flashIn  { from { opacity:0; transform:translateY(-16px); } to { opacity:1; transform:translateY(0); } }
@keyframes flashOut { from { opacity:1; } to { opacity:0; } }

/* ========= CARD ========= */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.card-body { padding: 16px; }

/* ========= BUTTONS ========= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-full { width: 100%; }

.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); color: #fff; }
.btn-accent  { background: linear-gradient(135deg, var(--accent) 0%, #818CF8 100%); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-ghost   { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-text    { background: transparent; color: var(--primary-light); padding: 8px; }

.btn-sm { padding: 8px 14px; font-size: 12px; border-radius: 8px; }

/* ========= FORMS ========= */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text); }

.form-control, .select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  appearance: none;
}

.form-control:focus, .select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(79,99,210,0.12);
  background: #fff;
}

.form-control::placeholder { color: var(--text-light); }
textarea.form-control { resize: vertical; min-height: 80px; }

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-error { font-size: 11px; color: var(--danger); font-weight: 500; }
.form-hint  { font-size: 11px; color: var(--text-light); }

.input-icon-wrap {
  position: relative;
}

.input-icon-wrap > i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 14px;
  pointer-events: none;
}

.input-icon-wrap .form-control {
  padding-left: 40px;
}

/* ========= OTP INPUT ========= */
.otp-wrap {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.otp-input {
  width: 50px; height: 58px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.otp-input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(79,99,210,0.15);
  background: #fff;
}

.otp-input.filled { border-color: var(--primary-light); background: #EEF1FF; }

/* ========= UPLOAD ZONE ========= */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--bg);
  transition: border-color .2s, background .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.upload-zone:hover, .upload-zone.has-file {
  border-color: var(--primary-light);
  background: #EEF1FF;
}

.upload-zone i { font-size: 26px; color: var(--primary-light); }
.upload-zone p { font-size: 12px; color: var(--text-light); }
.upload-zone input[type=file] { display: none; }

/* ========= BADGES ========= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

/* Status badges */
.badge-pending        { background: var(--warning-bg); color: var(--warning); }
.badge-payment_submitted { background: var(--info-bg); color: var(--info); }
.badge-payment_confirmed, .badge-confirmed { background: #EEF1FF; color: var(--primary-light); }
.badge-courier_assigned  { background: #F5F3FF; color: #7C3AED; }
.badge-ready_for_expedition { background: #ECFEFF; color: #0891B2; }
.badge-in_transit, .badge-transit { background: var(--warning-bg); color: var(--warning); }
.badge-completed      { background: var(--success-bg); color: var(--success); }
.badge-cancelled      { background: var(--danger-bg);  color: var(--danger); }
.badge-refused        { background: var(--danger-bg);  color: var(--danger); }
.badge-submitted      { background: var(--info-bg);    color: var(--info); }

/* Role badges */
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-gray    { background: var(--gray-bg);    color: var(--gray); }
.badge-courier { background: #F5F3FF; color: #7C3AED; }

/* ========= ALERTS ========= */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
}

.alert-success { background: var(--success-bg); color: var(--success); }
.alert-danger  { background: var(--danger-bg);  color: var(--danger); }
.alert-info    { background: var(--info-bg);    color: var(--info); }
.alert-warning { background: var(--warning-bg); color: var(--warning); }

/* ========= AUTH SCREENS ========= */
.auth-screen {
  min-height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.auth-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 24px;
  margin: 16px;
}

.auth-logo {
  width: 64px; height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(43,58,140,0.25);
}

/* ========= HERO BLOCK ========= */
.hero-block {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, var(--accent) 100%);
  padding: 24px 20px 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero-block::after {
  content: '';
  position: absolute;
  bottom: -24px; right: -24px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}

.hero-greeting { font-size: 13px; opacity: 0.8; }
.hero-name     { font-size: 22px; font-weight: 700; margin: 2px 0 6px; }
.hero-sub      { font-size: 12px; opacity: 0.75; }

/* ========= STAT GRID ========= */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-icon { font-size: 20px; }
.stat-num  { font-size: 26px; font-weight: 700; line-height: 1; }
.stat-label { font-size: 11px; color: var(--text-light); font-weight: 500; }

/* ========= REQUEST ITEMS ========= */
.request-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .15s;
}

.request-item:active { transform: scale(0.98); }

.request-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.request-info { flex: 1; min-width: 0; }
.request-doc  { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.request-meta { font-size: 11px; color: var(--text-light); margin-top: 2px; }

.request-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

/* ========= EMPTY STATE ========= */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.empty-icon { font-size: 44px; color: var(--border); margin-bottom: 4px; }
.empty-title { font-size: 16px; font-weight: 700; color: var(--text); }
.empty-sub   { font-size: 13px; color: var(--text-light); max-width: 240px; line-height: 1.5; }

/* ========= SUMMARY BOX ========= */
.summary-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius);
  padding: 18px;
  color: #fff;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.summary-label { font-size: 12px; opacity: 0.75; }
.summary-value { font-size: 13px; font-weight: 600; }
.summary-divider { height: 1px; background: rgba(255,255,255,0.15); margin: 4px 0; }
.summary-total { font-size: 18px; font-weight: 700 !important; }

/* ========= OPTION GROUP ========= */
.option-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  transition: all .2s;
  position: relative;
}

.option-item input[type=radio] { display: none; }

.option-item:has(input:checked),
.option-item.selected {
  border-color: var(--primary-light);
  background: #EEF1FF;
}

.option-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.option-label { font-size: 13px; font-weight: 600; color: var(--text); }
.option-sub   { font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* Time options */
.time-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s;
  background: var(--bg);
}

.time-option input[type=radio] { display: none; }
.time-option:has(input:checked) { border-color: var(--primary-light); background: #EEF1FF; }

/* ========= STEPS ========= */
.steps {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all .3s;
}

.step-dot.active   { background: var(--primary-light); color: #fff; box-shadow: 0 0 0 4px rgba(79,99,210,0.2); }
.step-dot.done     { background: var(--success); color: #fff; }
.step-dot.inactive { background: var(--border); color: var(--text-light); }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 6px;
  transition: background .3s;
}

.step-line.done { background: var(--success); }

/* ========= TIMELINE ========= */
.timeline { display: flex; flex-direction: column; }

.tl-item {
  display: flex;
  gap: 12px;
  padding-bottom: 20px;
  position: relative;
}

.tl-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.tl-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  z-index: 1;
}

.tl-dot.done   { background: var(--success); color: #fff; }
.tl-dot.active { background: var(--primary-light); color: #fff; }

.tl-line {
  flex: 1;
  width: 2px;
  background: var(--border);
  margin: 4px 0;
  min-height: 20px;
}

.tl-item:last-child .tl-line { display: none; }

.tl-content { padding-top: 4px; }
.tl-title   { font-size: 13px; font-weight: 600; color: var(--text); }
.tl-time    { font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* ========= DETAIL ROW ========= */
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.detail-row:last-child { border-bottom: none; }
.detail-key { font-size: 12px; color: var(--text-light); flex-shrink: 0; }
.detail-val { font-size: 13px; font-weight: 600; color: var(--text); text-align: right; word-break: break-word; }

/* ========= PILL TABS ========= */
.pill-tabs-group {
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.pill-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.pill-tabs::-webkit-scrollbar { display: none; }

.pill-tab {
  padding: 7px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-light);
  text-decoration: none;
  transition: all .2s;
}

.pill-tab.active { background: var(--primary-light); color: #fff; }

.tab-scroll {
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-scroll::-webkit-scrollbar { display: none; }

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ========= SPINNER ========= */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ========= ADMIN ROW ========= */
.admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  transition: background .15s;
  text-decoration: none;
  color: inherit;
}

.admin-row:last-child { border-bottom: none; }
.admin-row:active { background: var(--bg); }

/* ========= SCROLLBAR ========= */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ========= RESPONSIVE DESKTOP ========= */
@media (min-width: 430px) {
  .phone-wrap { box-shadow: 0 0 80px rgba(0,0,0,0.3); }
  .bottom-nav { border-radius: 0; }
}


/* ========= AUTH LOGO HERO ========= */
.auth-logo {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-light) 60%, var(--accent) 100%);
  padding: 56px 24px 40px;
  text-align: center;
  color: #fff;
}

.auth-logo i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px; height: 68px;
  border-radius: 20px;
  background: rgba(255,255,255,0.15);
  font-size: 26px;
  margin: 0 auto 14px;
  border: 2px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
}

.auth-logo h1 { font-size: 24px; font-weight: 800; margin-bottom: 5px; }
.auth-logo p  { font-size: 13px; opacity: 0.8; }

/* Auth screen layout */
.auth-screen {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.auth-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 24px;
  margin: 16px;
}

/* ========= BUTTON SPINNER ========= */
.btn .spinner { display: none; }
.btn.loading .btn-text { display: none; }
.btn.loading .spinner { display: inline-block; }

/* ========= MISC ========= */
--text-muted: var(--text-light);

/* Profile header */
.profile-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 28px 20px 24px;
  color: #fff;
  text-align: center;
}

.avatar-circle {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 3px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 12px;
}

/* Menu list in admin */
.menu-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
  background: #fff;
}

.menu-list a:active { background: var(--bg); }
.menu-list a i { width: 20px; text-align: center; color: var(--primary-light); }

/* Courier race banner */
.race-banner {
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: 12px;
}

/* Separator */
.sep {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* Price display */
.price-mad { font-size: 24px; font-weight: 800; color: var(--text); }
.price-fcfa { font-size: 13px; color: var(--text-light); }


/* ========= USER DROPDOWN ========= */
.topbar-user { position: relative; }

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(43,58,140,0.18);
    z-index: 300;
    overflow: hidden;
    border: 1px solid var(--border);
}

.user-dropdown-name {
    padding: 14px 16px 2px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.user-dropdown-phone {
    padding: 0 16px 12px;
    font-size: 11px;
    color: var(--text-light);
}

.user-dropdown-sep {
    height: 1px;
    background: var(--border);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: var(--font);
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}

.user-dropdown-item:last-child { border-bottom: none; }
.user-dropdown-item:active { background: var(--bg); }
.user-dropdown-item i { width: 16px; text-align: center; color: var(--primary-light); }

.user-dropdown-logout {
    color: var(--danger) !important;
}
.user-dropdown-logout i { color: var(--danger) !important; }

/* ========= STATUS BADGES COMPLETE ========= */
/* All possible statuses with readable labels via data-label */
[data-status]::after { content: attr(data-status-label); }

/* Fix: badge for any status not already declared */
.badge-payment_submitted  { background: var(--info-bg);    color: var(--info); }
.badge-courier_assigned   { background: #F5F3FF;            color: #7C3AED; }
.badge-ready_for_expedition { background: #ECFEFF;          color: #0891B2; }
.badge-in_transit         { background: var(--warning-bg);  color: var(--warning); }

/* ========= RELOAD BAR ========= */
#reload-bar {
    animation: slideDown .3s ease;
}

/* ========= TOPBAR with 4 items ========= */
.topbar { gap: 8px; }

/* ========= TOOLTIP ========= */
.tooltip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tooltip-wrap::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1A1E35;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.5;
    width: 200px;
    text-align: center;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.tooltip-wrap::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1A1E35;
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
    z-index: 9999;
}

.tooltip-wrap:hover::after,
.tooltip-wrap:hover::before { opacity: 1; }

/* ========= BOTTOM NAV 4 items ========= */
.bottom-nav-4 .nav-item { font-size: 9px; }
