/* ===========================
   La Verde Operator Portal
   Design System — v3.0
   =========================== */

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

/* ====== DESIGN TOKENS ====== */
:root {
  /* Colors */
  --green:         #1a7a3c;
  --green-dark:    #145f2e;
  --green-mid:     #22a050;
  --green-light:   #e8f5ee;
  --gold:          #f5c518;
  --gold-dark:     #d4a800;
  --gold-light:    #fffaeb;
  --bg:            #f9fafb;
  --white:         #ffffff;
  --text:          #111827;
  --text-secondary:#6b7280;
  --text-light:    #9ca3af;
  --border:        #e5e7eb;

  /* Sidebar (dark) */
  --sidebar-bg:    #111827;
  --sidebar-w:     240px;

  /* Layout */
  --navbar-h:      64px;

  /* Radii */
  --radius:        8px;
  --radius-lg:     12px;

  /* Shadows */
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow:        0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:     0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg:     0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);

  /* Spacing (8px grid) */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ====== TYPE SCALE ====== */
.text-xs   { font-size: 12px; line-height: 1.4; }
.text-sm   { font-size: 14px; line-height: 1.5; }
.text-base { font-size: 16px; line-height: 1.5; }
.text-lg   { font-size: 20px; line-height: 1.4; }
.text-xl   { font-size: 24px; line-height: 1.3; }
.text-2xl  { font-size: 32px; line-height: 1.2; }
.text-3xl  { font-size: 40px; line-height: 1.1; }

.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }

.text-primary   { color: var(--text); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-light); }
.text-green     { color: var(--green); }
.text-gold      { color: var(--gold-dark); }

/* ====== NAVBAR ====== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 0 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

/* Left: matches sidebar width so center is truly centered */
.navbar-left {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--sidebar-w);
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}
.menu-toggle:hover { background: var(--bg); color: var(--text); }

.navbar-center {
  text-align: center;
  flex: 1;
}

.station-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.1px;
}

.station-sub {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 1px;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  color: var(--text-secondary);
}

.nav-icon-btn:hover {
  background: var(--green-light);
  border-color: #c3e8d0;
  color: var(--green);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  background: #ef4444;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.nav-logout {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.15s;
  white-space: nowrap;
}

.nav-logout:hover {
  color: #ef4444;
  border-color: #fecaca;
  background: #fef2f2;
}

/* ====== APP LAYOUT ====== */
.app-layout {
  display: flex;
  padding-top: var(--navbar-h);
  min-height: 100vh;
}

/* ====== SIDEBAR — DARK ====== */
.sidebar {
  position: fixed;
  top: var(--navbar-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  padding: 0 0 20px;
  overflow-y: auto;
  z-index: 90;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Sidebar logo block */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

/* Sidebar nav */
.sidebar-nav {
  padding: 12px 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.35);
  padding: 10px 12px 4px;
  display: block;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
}

.sidebar-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.sidebar-link.active {
  background: #1a7a3c;
  color: #fff;
  font-weight: 600;
}

.sidebar-link.active:hover {
  background: #1e8a44;
}

.sidebar-link .s-icon {
  font-size: 15px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.9;
}

.sidebar-spacer { flex: 1; }

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-version {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  text-align: center;
  padding: 8px 12px;
}

/* ====== MAIN CONTENT ====== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 32px 32px 56px;
  min-width: 0;
}

/* ====== PAGE HEADER ====== */
.page-header {
  margin-bottom: 28px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--green); }
.breadcrumb-sep { color: var(--text-light); }

/* ====== CARD COMPONENT ====== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ====== BADGE COMPONENT ====== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.badge-green   { background: #dcfce7; color: #15803d; }
.badge-yellow  { background: #fef9c3; color: #854d0e; }
.badge-red     { background: #fee2e2; color: #b91c1c; }
.badge-blue    { background: #dbeafe; color: #1d4ed8; }
.badge-purple  { background: #ede9fe; color: #6d28d9; }
.badge-gray    { background: #f3f4f6; color: #374151; }
.badge-gold    { background: #fef9c3; color: #854d0e; }

/* Legacy alias */
.kpi-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 500; white-space: nowrap; }

/* ====== BUTTON COMPONENT ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn-primary:hover  { background: var(--green-dark); border-color: var(--green-dark); box-shadow: 0 2px 8px rgba(26,122,60,0.25); }

.btn-secondary {
  background: var(--white);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg); border-color: #d1d5db; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
.btn-danger:hover { background: #fee2e2; border-color: #fca5a5; }

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 6px;
}

.btn-lg {
  padding: 13px 24px;
  font-size: 15px;
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  border-color: #25d366;
}
.btn-whatsapp:hover { background: #1db957; border-color: #1db957; }

/* ====== INPUT COMPONENT ====== */
.input,
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  line-height: 1.5;
}

.input:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26,122,60,0.1);
}

.input::placeholder,
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-light);
}

.form-group { margin-bottom: 16px; }

.form-label,
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.input-group {
  position: relative;
  display: flex;
}

/* ====== TABLE COMPONENT ====== */
.table-wrap { overflow-x: auto; }

.table,
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table thead th,
thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table tbody tr,
tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.1s;
}

.table tbody tr:hover,
tbody tr:hover { background: #f9fafb; }

.table tbody td,
tbody td {
  padding: 12px 16px;
  color: var(--text);
  vertical-align: middle;
}

.table tbody tr:last-child,
tbody tr:last-child { border-bottom: none; }

/* ====== KPI CARDS ====== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  border-left: 3px solid var(--green);
}

.kpi-card.gold   { border-left-color: var(--gold); }
.kpi-card.blue   { border-left-color: #3b82f6; }
.kpi-card.purple { border-left-color: #8b5cf6; }
.kpi-card.red    { border-left-color: #ef4444; }

.kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.5px;
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ====== SERVICES DROPDOWN ====== */
.services-dropdown { position: relative; }

.services-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--green-light);
  border: 1px solid #c3e8d0;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--green);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  outline: none;
}

.services-btn:hover,
.services-btn[aria-expanded="true"] {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.services-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.services-btn[aria-expanded="true"] .services-chevron {
  transform: rotate(180deg);
}

.services-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  z-index: 500;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.services-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.services-menu-header {
  padding: 10px 14px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
}

.services-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.1s;
}

.services-item:hover {
  background: var(--green-light);
  color: var(--green);
}

.services-item-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.services-item-text { flex: 1; }

.services-unread-dot {
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ====== MODAL ====== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.1);
  transform: scale(0.96);
  transition: transform 0.2s;
}
.modal-overlay.open .modal-box { transform: scale(1); }

.modal-title    { font-size: 18px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.modal-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }

.modal-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}
.modal-detail-row:last-of-type { border-bottom: none; }
.modal-detail-label { color: var(--text-secondary); }
.modal-detail-value { font-weight: 600; color: var(--text); }
.modal-actions { margin-top: 24px; display: flex; gap: 10px; }

/* ====== HELP BANNER (subtle) ====== */
.help-banner {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}

.help-banner-text h3 {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.help-banner-text p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 2px;
}

.help-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ====== INFO BANNER ====== */
.info-banner {
  background: var(--green-light);
  border: 1px solid #c3e8d0;
  border-left: 3px solid var(--green);
  color: var(--green-dark);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ====== EXPLAINER BANNER ====== */
.explainer-banner {
  background: var(--green-light);
  border: 1px solid #c3e8d0;
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 20px 24px;
  color: var(--text);
  margin-bottom: 28px;
}
.explainer-banner h2 { font-size: 16px; font-weight: 700; color: var(--green); margin-bottom: 4px; }
.explainer-banner p  { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ====== STORE PAGE ====== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.product-image {
  background: var(--green-light);
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  border-bottom: 1px solid var(--border);
}

.product-info { padding: 16px; }
.product-name     { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.product-name-sub { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.product-price    { font-size: 20px; font-weight: 700; color: var(--green); margin-bottom: 12px; letter-spacing: -0.3px; }

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stock-badge { font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 99px; }
.stock-in    { background: #dcfce7; color: #15803d; }
.stock-low   { background: #fef9c3; color: #854d0e; }

/* Cart Sidebar */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-sidebar {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 320px;
  background: var(--white);
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
}
.cart-sidebar.open { transform: translateX(0); }

.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-close {
  width: 32px; height: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.cart-close:hover { background: #fee2e2; border-color: #fecaca; color: #dc2626; }

.cart-items { flex: 1; overflow-y: auto; padding: 12px 16px; }

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
  align-items: flex-start;
}

.cart-item-emoji {
  width: 40px; height: 40px;
  background: var(--green-light);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.cart-item-details { flex: 1; }
.cart-item-name  { font-size: 13px; font-weight: 600; color: var(--text); }
.cart-item-price { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.cart-item-remove {
  background: none; border: none; cursor: pointer;
  color: var(--text-light); font-size: 14px; padding: 0;
  transition: color 0.15s; line-height: 1;
}
.cart-item-remove:hover { color: #ef4444; }

.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.cart-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
}

.cart-nav-btn {
  position: relative;
  width: 36px; height: 36px;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  color: var(--text-secondary);
  font-size: 16px;
}
.cart-nav-btn:hover { background: var(--green-light); border-color: #c3e8d0; }

.cart-count-badge {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 16px; height: 16px;
  background: var(--green);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
  padding: 0 3px;
}

/* ====== FINANCING PAGE ====== */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.plan-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 18px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
  text-align: center;
}
.plan-card:hover    { border-color: var(--green); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.plan-card.selected { border-color: var(--green); background: var(--green-light); box-shadow: 0 0 0 2px rgba(26,122,60,0.15); }

.plan-badge {
  position: absolute;
  top: 10px; right: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 600;
}

.plan-name { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.plan-days { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }
.plan-fee  { font-size: 32px; font-weight: 800; color: var(--green); margin-bottom: 6px; letter-spacing: -1px; }
.plan-desc { font-size: 12px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }

.calculator-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.calc-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.calc-results {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.calc-result-box {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  border: 1px solid var(--border);
}
.calc-result-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 4px; }
.calc-result-value { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }

/* ====== DELIVERY PAGE ====== */
.delivery-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.fuel-checkboxes { display: flex; gap: 8px; flex-wrap: wrap; }

.fuel-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}
.fuel-check-label:hover { border-color: var(--green); background: var(--green-light); }
.fuel-check-label input { accent-color: var(--green); }

.time-options { display: flex; gap: 8px; flex-wrap: wrap; }

.time-option {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  display: flex; align-items: center; gap: 6px;
}
.time-option input { accent-color: var(--green); }
.time-option:hover { border-color: var(--green); background: var(--green-light); }

.estimated-total {
  background: var(--green-light);
  border: 1px solid #c3e8d0;
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.est-label { font-size: 13px; font-weight: 500; color: var(--green); }
.est-value { font-size: 20px; font-weight: 700; color: var(--green); letter-spacing: -0.3px; }

/* Progress tracker */
.progress-tracker {
  display: flex;
  align-items: flex-start;
  margin: 12px 0 4px;
  position: relative;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 9px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.progress-step.done:not(:last-child)::after  { background: var(--green); }
.progress-step.active:not(:last-child)::after { background: linear-gradient(to right, var(--green), var(--border)); }

.progress-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
  margin-bottom: 5px;
  position: relative;
  z-index: 1;
}
.progress-dot.done   { background: var(--green); border-color: var(--green); color: #fff; }
.progress-dot.active { background: var(--gold); border-color: var(--gold); color: #fff; animation: pulseGold 1.5s infinite; }

@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,197,24,0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(245,197,24,0); }
}

.progress-label { font-size: 10px; color: var(--text-secondary); text-align: center; font-weight: 500; line-height: 1.3; }

.delivery-status-cards { display: flex; flex-direction: column; gap: 12px; }

.delivery-status-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* ====== REWARDS PAGE ====== */
.points-hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 60%, var(--green-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  color: #fff;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.points-main-value { font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -2px; }
.points-main-label { font-size: 14px; opacity: 0.85; margin-top: 2px; }
.points-tier       { font-size: 14px; font-weight: 600; opacity: 0.9; margin-top: 10px; }

.points-progress-wrap {
  background: rgba(255,255,255,0.2);
  border-radius: 99px;
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
}
.points-progress-fill {
  background: var(--gold);
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s ease;
}
.points-progress-info { font-size: 12px; opacity: 0.75; margin-top: 4px; }

.points-month { text-align: right; }
.points-month-value { font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.points-month-label { font-size: 12px; opacity: 0.75; margin-top: 2px; }

.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.tier-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
}
.tier-card.current { border-color: var(--green); box-shadow: 0 0 0 1px rgba(26,122,60,0.2), var(--shadow); }
.tier-card.current::before {
  content: 'Actual';
  position: absolute;
  top: -1px; left: 50%; transform: translateX(-50%);
  background: var(--green);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 0 0 6px 6px;
  letter-spacing: 0.5px;
}

.tier-emoji { font-size: 28px; margin-bottom: 8px; }
.tier-name  { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.tier-range { font-size: 11px; color: var(--text-secondary); margin-bottom: 6px; }
.tier-rate  { font-size: 12px; font-weight: 600; color: var(--green); }

.redeem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.redeem-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.redeem-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.redeem-emoji { font-size: 26px; margin-bottom: 8px; display: block; }
.redeem-name  { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.redeem-cost  { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.redeem-pts   { font-size: 18px; font-weight: 700; color: var(--green); display: block; margin-bottom: 12px; letter-spacing: -0.3px; }

/* ====== ANNOUNCEMENTS PAGE ====== */
.filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-tab {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--white);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
}
.filter-tab:hover  { border-color: var(--green); color: var(--green); background: var(--green-light); }
.filter-tab.active { background: var(--green); color: #fff; border-color: var(--green); }

.announcement-list { display: flex; flex-direction: column; gap: 12px; }

.announcement-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  position: relative;
  transition: box-shadow 0.15s;
}
.announcement-card:hover { box-shadow: var(--shadow-md); }
.announcement-card.unread { background: #f8fffc; }

.announcement-card.urgente    { border-left-color: #ef4444; }
.announcement-card.promocion  { border-left-color: var(--gold); }
.announcement-card.operaciones{ border-left-color: #22c55e; }
.announcement-card.general    { border-left-color: #3b82f6; }

.announcement-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.announcement-type-badge {
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.type-urgente    { background: #fee2e2; color: #b91c1c; }
.type-promocion  { background: #fef9c3; color: #854d0e; }
.type-operaciones{ background: #dcfce7; color: #15803d; }
.type-general    { background: #dbeafe; color: #1d4ed8; }

.announcement-title { font-size: 14px; font-weight: 600; color: var(--text); flex: 1; }
.announcement-time  { font-size: 12px; color: var(--text-light); white-space: nowrap; margin-left: auto; flex-shrink: 0; }
.announcement-body  { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; }
.announcement-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.unread-dot {
  position: absolute;
  top: 20px; right: 20px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
}

/* ====== BRAND SECTION (dashboard) ====== */
.brand-section { margin-top: 32px; }

.brand-section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  margin-bottom: 20px;
}

.brand-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.brand-motto-banner {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 60%, var(--green-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.brand-motto-banner::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(245,197,24,0.07);
  pointer-events: none;
}

.brand-motto-es {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.brand-motto-en {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  font-style: italic;
  position: relative;
  z-index: 1;
}

.value-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.value-pillar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s;
}
.value-pillar-card:hover { box-shadow: var(--shadow-md); }

.value-pillar-icon        { font-size: 28px; margin-bottom: 10px; display: block; }
.value-pillar-title-es    { font-size: 14px; font-weight: 700; color: var(--green); margin-bottom: 2px; }
.value-pillar-title-en    { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light); margin-bottom: 8px; }
.value-pillar-text-es     { font-size: 13px; color: var(--text); line-height: 1.6; margin-bottom: 6px; }
.value-pillar-text-en     { font-size: 12px; color: var(--text-secondary); line-height: 1.6; font-style: italic; }

.benefit-strips { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }

.benefit-strip {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.15s;
}
.benefit-strip:hover { border-color: #c3e8d0; }

.benefit-strip-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 40px; height: 40px;
  background: var(--green-light);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}

.benefit-strip-content          { flex: 1; }
.benefit-strip-title-es         { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 1px; }
.benefit-strip-title-en         { font-size: 11px; color: var(--green); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 2px; }
.benefit-strip-desc             { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

.brand-footer-quote {
  text-align: center;
  padding: 20px 20px 8px;
  font-size: 14px;
  font-style: italic;
  color: var(--green);
  font-weight: 600;
}
.brand-footer-quote span {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  font-style: normal;
  font-weight: 500;
  margin-top: 4px;
}

/* ====== VOLUME ROW (delivery) ====== */
.volume-row {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--green-light);
  border: 1px solid #c3e8d0;
  border-radius: var(--radius);
  margin-top: 6px;
}
.volume-row.visible { display: flex; }
.volume-row label { font-size: 12px; font-weight: 600; color: var(--green); white-space: nowrap; min-width: 80px; }
.volume-row input { width: 110px; padding: 6px 10px; border: 1px solid #c3e8d0; border-radius: 6px; font-family: 'Inter', sans-serif; font-size: 13px; background: #fff; outline: none; }
.volume-row input:focus { border-color: var(--green); }
.volume-row span { font-size: 12px; color: var(--text-secondary); }

/* ====== HELP PAGE ====== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.contact-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.contact-emoji { font-size: 32px; margin-bottom: 12px; display: block; }
.contact-card h3 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.contact-card p  { font-size: 13px; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.5; }
.contact-card .contact-info { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 14px; }

.faq-section { margin-bottom: 28px; }
.faq-list { display: flex; flex-direction: column; gap: 6px; }

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s;
}
.faq-item.open { border-color: var(--green); }

.faq-question {
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
  transition: background 0.1s;
}
.faq-question:hover    { background: var(--bg); }
.faq-item.open .faq-question { background: var(--green-light); }

.faq-q-text { flex: 1; }
.faq-q-text strong { display: block; font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.4; }
.faq-q-text span   { display: block; font-size: 12px; color: var(--text-secondary); margin-top: 1px; font-style: italic; }

.faq-chevron {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: 10px;
  transition: transform 0.2s, background 0.15s;
  margin-top: 2px;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); background: var(--green); border-color: var(--green); color: #fff; }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-answer-inner {
  padding: 14px 18px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  border-top: 1px solid #f3f4f6;
}
.faq-answer-inner strong { color: var(--text); }

.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.tip-card {
  background: var(--green-light);
  border: 1px solid #c3e8d0;
  border-radius: var(--radius);
  padding: 16px;
}
.tip-card h4 { font-size: 13px; font-weight: 600; color: var(--green); margin-bottom: 5px; }
.tip-card p  { font-size: 12px; color: #374151; line-height: 1.5; }

/* ====== PRICES PAGE ====== */
.price-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.price-hero-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  position: relative;
  transition: box-shadow 0.15s;
}
.price-hero-card:hover          { box-shadow: var(--shadow-md); }
.price-hero-card.regular        { border-left-color: var(--green); }
.price-hero-card.premium        { border-left-color: var(--gold); }
.price-hero-card.diesel         { border-left-color: #3b82f6; }

.phc-type { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-secondary); margin-bottom: 10px; }
.phc-emoji { font-size: 22px; margin-bottom: 10px; display: block; }

.phc-price {
  font-size: 40px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
}
.phc-unit { font-size: 14px; font-weight: 400; color: var(--text-secondary); margin-left: 2px; }

.phc-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 99px;
}
.change-up   { background: #fee2e2; color: #b91c1c; }
.change-down { background: #dcfce7; color: #15803d; }
.change-flat { background: #f3f4f6; color: #6b7280; }

.phc-timestamp { font-size: 11px; color: var(--text-light); margin-top: 10px; }

.table-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--green); }
th.sorted-asc::after  { content: ' ▲'; font-size: 9px; }
th.sorted-desc::after { content: ' ▼'; font-size: 9px; }

.change-cell-up   { color: #b91c1c; font-weight: 600; }
.change-cell-down { color: #15803d; font-weight: 600; }

.daily-note {
  text-align: center;
  padding: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  border-top: 1px dashed var(--border);
}

/* ====== INVOICES PAGE ====== */
.filter-bar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.filter-bar label { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.filter-bar input[type="date"],
.filter-bar select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.filter-bar input[type="date"]:focus,
.filter-bar select:focus { border-color: var(--green); }

.filter-divider { width: 1px; height: 20px; background: var(--border); }
.filter-bar-label { display: flex; align-items: center; gap: 8px; }

.invoice-num { font-weight: 600; color: var(--green); font-family: 'SF Mono', 'Fira Code', monospace; font-size: 13px; }

.btn-dl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-dl:hover { background: var(--white); border-color: var(--green); color: var(--green); }

.summary-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.summary-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
}
.summary-box-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); margin-bottom: 6px; }
.summary-box-value { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; }
.summary-box-sub   { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }

.val-green  { color: var(--green); }
.val-red    { color: #b91c1c; }
.val-normal { color: var(--text); }

td.amount { font-weight: 700; }

/* ====== RESPONSIVE ====== */
@media (max-width: 1200px) {
  .plan-grid  { grid-template-columns: repeat(2, 1fr); }
  .tier-grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .kpi-grid        { grid-template-columns: repeat(2, 1fr); }
  .product-grid    { grid-template-columns: repeat(2, 1fr); }
  .delivery-layout { grid-template-columns: 1fr; }
  .calc-inputs     { grid-template-columns: 1fr; }
  .calc-results    { grid-template-columns: repeat(2, 1fr); }
  .redeem-grid     { grid-template-columns: repeat(2, 1fr); }
  .value-pillars   { grid-template-columns: 1fr 1fr; }
  .contact-grid    { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    transform: translateX(-240px);
    transition: transform 0.25s ease;
    width: 240px;
    z-index: 200;
    top: 0;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
  }

  .navbar-left {
    width: auto;
    padding-left: 16px;
  }

  .menu-toggle { display: flex; }
  .main-content { margin-left: 0; padding: 24px 16px 40px; }
  .navbar { padding-right: 16px; }
  .navbar-center { display: none; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .price-cards { grid-template-columns: 1fr; }
  .summary-bar { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
  .cart-sidebar { width: 100%; }
  .points-hero { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .services-btn { font-size: 12px; padding: 6px 10px; }
  .services-menu {
    position: fixed;
    top: var(--navbar-h);
    left: 0; right: 0;
    min-width: 100%;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border-top: none;
  }
}

@media (max-width: 480px) {
  .kpi-grid    { grid-template-columns: 1fr; }
  .plan-grid   { grid-template-columns: 1fr; }
  .tier-grid   { grid-template-columns: 1fr 1fr; }
  .redeem-grid { grid-template-columns: 1fr 1fr; }
  .calc-results{ grid-template-columns: 1fr 1fr; }
  .value-pillars { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
}

/* ====== TUTORIAL BUTTON + MODAL ====== */
.tutorial-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  background: transparent;
  border: 1.5px solid var(--green);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.tutorial-btn:hover { background: var(--green-light); }
.tutorial-btn .play-icon { font-size: 11px; }

.tutorial-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 900;
  align-items: center;
  justify-content: center;
}
.tutorial-modal-overlay.open { display: flex; }

.tutorial-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 540px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}
.tutorial-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.tutorial-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.tutorial-modal-close {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: background 0.15s;
}
.tutorial-modal-close:hover { background: var(--border); }
.tutorial-video-placeholder {
  margin: 16px 20px;
  background: #f3f4f6;
  border-radius: var(--radius);
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-secondary);
  border: 2px dashed var(--border);
}
.tutorial-video-placeholder .big-play {
  width: 52px; height: 52px;
  background: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: var(--shadow-sm);
}
.tutorial-video-placeholder span { font-size: 13px; font-weight: 500; }
.tutorial-steps {
  padding: 0 20px 20px;
}
.tutorial-steps h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  padding-top: 4px;
}
.tutorial-steps ol {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tutorial-steps ol li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ====== LEGAL DISCLOSURE MODAL ====== */
.legal-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.legal-modal-overlay.open { display: flex; }

.legal-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.legal-modal-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}
.legal-modal-logo span {
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.5px;
}
.legal-modal-title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.legal-modal-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--bg);
  max-height: 240px;
  overflow-y: auto;
}
.legal-modal-body p { margin-bottom: 12px; }
.legal-modal-body p:last-child { margin-bottom: 0; }
.legal-modal-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
}
.legal-modal-checkbox input[type="checkbox"] {
  width: 16px; height: 16px;
  margin-top: 1px;
  accent-color: var(--green);
  flex-shrink: 0;
}
.legal-modal-timestamp {
  font-size: 11px;
  color: var(--text-light);
  text-align: center;
}
.legal-modal .btn-accept {
  width: 100%;
  padding: 12px;
  background: var(--green);
  color: white;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.legal-modal .btn-accept:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.legal-modal .btn-accept:not(:disabled):hover { background: var(--green-dark); }

/* ====== SUPPLY OPTIONS TABLE ====== */
.supply-table-wrap { overflow-x: auto; }
.supply-table-wrap table { min-width: 720px; }
.avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.avail-available  { background: #dcfce7; color: #15803d; }
.avail-limited    { background: #fef9c3; color: #854d0e; }
.avail-unavailable{ background: #fee2e2; color: #991b1b; }
.prices-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--green-light);
  border-radius: var(--radius);
  border-left: 3px solid var(--green);
}

/* ====== HELP CONTACTS GRID ====== */
.help-contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.help-contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.help-contact-card-icon {
  font-size: 24px;
  line-height: 1;
}
.help-contact-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.help-contact-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}
.help-contact-card-info {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
}
.help-contact-card-hours {
  font-size: 11px;
  color: var(--text-light);
}
@media (max-width: 700px) {
  .help-contacts-grid { grid-template-columns: 1fr; }
}
