:root {
  --c-primary-dark: #1E3A4A;
  --c-primary:      #3A6B8A;
  --c-gold:         #C9A84C;
  --c-bg:           #F5F6F8;
}

body { background: var(--c-bg); }

/* ── Navigation ── */
.st-nav {
  background: var(--c-primary-dark);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.st-nav-brand {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.st-nav-links a {
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  text-decoration: none;
  margin-left: 20px;
  transition: color 0.15s;
}
.st-nav-links a:hover,
.st-nav-links a.active { color: #fff; }

/* ── Stat cards ── */
.st-stat { border-radius: 6px; padding: 18px 20px; text-align: center; }
.st-stat-num { font-size: 26px; font-weight: 700; }
.st-stat-lbl { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; margin-top: 4px; }

/* ── Tables ── */
.st-table { font-size: 13px; }
.st-table th {
  color: #6B7280;
  font-weight: 600;
  font-size: 12px;
  background: #F5F6F8;
  padding: 10px 12px;
}
.st-table td { padding: 10px 12px; vertical-align: middle; }
.st-table tbody tr { cursor: default; }
.st-table tbody tr:hover { background: #FAFBFC; }

/* ── Status pills ── */
.pill {
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
  white-space: nowrap;
}
.pill-new              { background: #DBEAFE; color: #1E40AF; }
.pill-confirmed        { background: #FEF3C7; color: #92400E; }
.pill-out_for_delivery { background: #E0E7FF; color: #3730A3; }
.pill-delivered        { background: #D1FAE5; color: #065F46; }
.pill-cancelled        { background: #FEE2E2; color: #DC2626; }

/* ── Buttons ── */
.st-btn-gold {
  background: var(--c-gold);
  color: #111;
  border: none;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.st-btn-gold:hover { background: #b8923f; color: #111; }

.st-btn-confirm {
  background: #FEF3C7;
  color: #92400E;
  border: none;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
}
.st-btn-confirm:hover { background: #fde68a; }

.st-btn-cancel {
  background: #FEE2E2;
  color: #DC2626;
  border: none;
  font-size: 12px;
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
}
.st-btn-cancel:hover { background: #fecaca; }

/* ── Cards ── */
.st-card {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  padding: 20px;
  margin-bottom: 20px;
}
.st-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #1E3A4A;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* ── Form elements ── */
.st-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #6B7280;
  text-transform: uppercase;
  margin-bottom: 4px;
  display: block;
}
.st-input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(58,107,138,0.15);
}

/* ── Login page ── */
.st-login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  padding: 40px;
  width: 100%;
  max-width: 380px;
}
.login-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-primary-dark);
  text-align: center;
  margin-bottom: 4px;
}
.login-subtitle {
  font-size: 13px;
  color: #6B7280;
  text-align: center;
  margin-bottom: 28px;
}

/* ── Quick actions ── */
.quick-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Progress bars (top products) ── */
.progress-bar-outer {
  background: #F0F0F0;
  border-radius: 3px;
  height: 6px;
  width: 100%;
}
.progress-bar-inner {
  background: var(--c-gold);
  border-radius: 3px;
  height: 6px;
}

/* ── Revenue chart ── */
.chart-wrap {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
  padding-bottom: 20px;
}
.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.chart-bar {
  width: 100%;
  background: #DBEAFE;
  border-radius: 3px 3px 0 0;
}
.chart-bar-current { background: var(--c-gold); }
.chart-label {
  font-size: 10px;
  color: #9CA3AF;
  margin-top: 4px;
  text-align: center;
  white-space: nowrap;
}

/* ── Chart toggle ── */
.chart-toggle {
  display: flex;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #E5E7EB;
}
.chart-toggle-btn {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: #6B7280;
  background: #F9FAFB;
}
.chart-toggle-btn.active {
  background: var(--c-primary-dark);
  color: #fff;
}
.chart-toggle-btn:hover:not(.active) {
  background: #F0F0F0;
  color: #374151;
}

/* ── Delivery advance button ── */
.btn-advance {
  background: var(--c-primary-dark);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-advance:hover { background: var(--c-primary); }

/* ── Mobile nav drawer (≤768px) ── */
#admin-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}
#admin-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

#admin-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1040;
}
#admin-overlay.open { display: block; }

#admin-drawer {
  position: fixed;
  top: 0; left: 0;
  width: 240px; height: 100%;
  background: var(--c-primary-dark);
  z-index: 1050;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  overflow-y: auto;
  padding-top: 0;
}
#admin-drawer.open { transform: translateX(0); }

#admin-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
#admin-drawer-brand {
  color: #C9A84C;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
#admin-drawer-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
#admin-drawer-close:hover { color: #fff; }

#admin-drawer nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.15s, color 0.15s;
}
#admin-drawer nav a:hover,
#admin-drawer nav a.active { background: rgba(255,255,255,0.08); color: #fff; }
#admin-drawer nav a.active { border-left: 3px solid #C9A84C; }

@media (max-width: 768px) {
  .st-nav-links { display: none; }
  #admin-menu-btn { display: flex; }

  /* Reduce page padding on small screens */
  .container-fluid.py-4.px-4 { padding: 12px !important; }
}

/* ── Table → Card mode (≤600px) ── */
@media (max-width: 600px) {
  .st-table thead { display: none; }

  .st-table,
  .st-table tbody,
  .st-table tr,
  .st-table td {
    display: block;
    width: 100%;
  }

  .st-table tr {
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    margin-bottom: 10px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    cursor: pointer;
  }

  .st-table td {
    padding: 4px 0;
    border: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .st-table td::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #9CA3AF;
    letter-spacing: 0.06em;
    min-width: 72px;
    flex-shrink: 0;
  }

  /* Hide cells with no data-label (image cells, action cells) */
  .st-table td[data-label=""] { justify-content: flex-end; }
  .st-table td[data-label=""]:before { display: none; }

  /* Revenue chart label sizing on very small screens */
  .chart-label { font-size: 9px; }
}
