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

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

:root {
  /* DoorDash light theme */
  --bg: #ffffff;
  --bg-2: #f8f9fa;
  --bg-card: #f5f5f5;
  --bg-input: #f8f9fa;
  --border: #e8e8e8;
  --primary: #cc2b2b;
  --primary-hover: #ff3333;
  --primary-dim: #992222;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text: #1a1a1a;
  --text-light: #626262;
  --text-muted: #909090;
  --radius: 24px;
  --radius-sm: 16px;
}

html { 
  height: 100%; 
  font-size: 72%; /* 25% less than 75% */
}
body {
  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.emoji { font-style: normal; }
.hidden { display: none !important; }

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.header-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-icon { font-size: 1.8rem; font-weight: 800; }
.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  font-family: 'Poppins', sans-serif;
}
.header-nav { display: flex; align-items: center; gap: 1.5rem; }
.nav-link {
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.nav-link:hover { color: var(--primary); text-decoration: none; }
.nav-link.active { color: var(--primary); border-bottom-color: var(--primary); }
.header-username { color: var(--text); font-weight: 600; font-size: 0.95rem; }
.header-balance {
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  margin-right: 1rem;
}
.header-badge {
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 600;
}
.header-role-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  background: #ffe8e8;
  color: var(--primary);
  margin-left: 0.5rem;
}
.header-role-badge.dasher { background: #e8f5e9; color: #2e7d32; }
.header-role-badge.merchant { background: #fff3e0; color: #e65100; }
.header-role-badge.multi { background: linear-gradient(90deg, #ffe8e8, #fff3e0); color: var(--text); }

.stat-pill {
  display: inline-block; padding: 0.3rem 0.8rem; border-radius: 20px;
  background: var(--bg-card); color: var(--text); border: 1px solid var(--border);
  font-size: 0.8rem; font-weight: 600;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border: none;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  gap: 0.4rem;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: white; color: var(--text); border: 2px solid var(--border); }
.btn-ghost:hover { background: var(--bg-card); border-color: var(--primary); }
.btn-link { background: none; color: var(--primary); padding: 0; font-weight: 600; }
.btn-link:hover { text-decoration: underline; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.btn-block { width: 100%; }
.result-msg { font-size: 0.85rem; margin-top: 0.5rem; color: var(--danger); }
.success-msg { color: var(--success); }

/* ===== MAIN CONTENT ===== */
#hero-section {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* ===== HERO ===== */
.hero {
  width: 100%;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #fafaf8 100%);
  padding: 4rem 2rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero-content { max-width: 700px; margin: 0 auto; }
.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  font-family: 'Poppins', sans-serif;
  color: var(--text);
}
.hero-highlight { color: var(--primary); }
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}
.hero-search {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.hero-search input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 24px;
  font-size: 0.95rem;
  font-family: inherit;
}
.hero-search input:focus { outline: none; border-color: var(--primary); }

.hero-cta {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-light);
}

/* ===== TRACKING HERO ===== */
.tracking-hero {
  width: 100%;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #fafaf8 100%);
  padding: 4rem 2rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  flex: 1;
}
.tracking-hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  font-family: 'Poppins', sans-serif;
  color: var(--text);
}
.tracking-hero > p {
  font-size: 1.05rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.tracking-box {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.tracking-box input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 24px;
  font-size: 0.95rem;
  font-family: inherit;
}
.tracking-box input:focus {
  outline: none;
  border-color: var(--primary);
}
.tracking-result {
  max-width: 600px;
  margin: 2rem auto;
  padding: 0 2rem;
}

/* ===== HOW SECTION ===== */
.how-section {
  width: 100%;
  padding: 4rem 2rem;
  background: var(--bg);
}
.section-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 2rem;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}
.how-card {
  text-align: center;
  padding: 2rem;
  border-radius: 24px;
  background: white;
  border: 1px solid var(--border);
}
.how-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.how-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.how-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ===== FEATURE SECTIONS ===== */
.feature-section {
  width: 100%;
  padding: 3rem 2rem;
  text-align: center;
}
.feature-dasher {
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
  border-top: 1px solid var(--border);
}
.feature-merchant {
  background: linear-gradient(135deg, #fff3e0 0%, #fffde7 100%);
  border-top: 1px solid var(--border);
}
.feature-content {
  max-width: 600px;
  margin: 0 auto;
}
.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.feature-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
}
.feature-desc {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* ===== DASHBOARD ===== */
.dashboard {
  width: 100%;
  background: var(--bg);
  min-height: calc(100vh - 60px);
  padding: 2rem;
  flex: 1;
}

.balance-bar {
  background: linear-gradient(135deg, var(--primary) 0%, #ff4a4a 100%);
  color: white;
  padding: 1.5rem 2rem;
  border-radius: 24px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(204,43,43,0.15);
  max-width: 100%;
}
.balance-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}
.balance-amount {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  font-family: 'Poppins', sans-serif;
}
.balance-note {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* ===== DASHBOARD TABS ===== */
.dashboard-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2rem;
  overflow-x: auto;
}
.dash-tab {
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-light);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dash-tab:hover { color: var(--text); }
.dash-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.dash-tab-icon { font-size: 1.1rem; }

/* ===== PAGES ===== */
.dash-content {
  width: 100%;
  max-width: 100%;
}
.page { display: none; }
.page.active { display: block; }

/* ===== FORM CARDS ===== */
.form-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.form-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 0.95rem;
}
.form-input, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  color: var(--text);
  transition: all 0.2s;
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(204,43,43,0.1);
}
.form-checkbox {
  margin-right: 0.5rem;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* ===== PRODUCTS SECTION ===== */
.store-section {
  margin-bottom: 3rem;
}
.store-header {
  margin-bottom: 1.5rem;
}
.store-name {
  color: var(--text);
  font-family: 'Poppins', sans-serif;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.product-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(204,43,43,0.15);
  transform: translateY(-4px);
}
.product-image {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-info {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.4;
  flex: 1;
}
.product-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.product-qty-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.product-qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s;
}
.product-qty-btn:hover {
  background: var(--bg-card);
  border-color: var(--primary);
}
.product-qty-display {
  flex: 1;
  text-align: center;
  font-weight: 600;
  color: var(--text);
}
.product-add-btn {
  width: 100%;
  padding: 0.6rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}
.product-add-btn:hover {
  background: var(--primary-hover);
}

/* ===== CART ===== */
.cart-section {
  margin: 2rem 0;
}
.cart-items {
  background: white;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.cart-empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 0.75rem;
  background: white;
}
.cart-item-info {
  flex: 1;
}
.cart-item-name {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.cart-item-store {
  font-size: 0.8rem;
  color: var(--text-light);
}
.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.cart-qty-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
}
.cart-qty-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}
.cart-item-price {
  font-weight: 600;
  color: var(--primary);
  min-width: 50px;
  text-align: right;
}
.cart-remove {
  color: var(--danger);
  cursor: pointer;
  font-weight: 600;
}

/* ===== ORDERS ===== */
.order-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.order-id {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}
.order-status {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #ffeaea;
  color: var(--primary);
}
.order-status.in-transit { background: #fff3e0; color: #e65100; }
.order-status.delivered { background: #e8f5e9; color: #2e7d32; }
.order-status.confirmed { background: #e8f5e9; color: #2e7d32; }

.order-timeline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.5rem 0;
  position: relative;
}
.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}
.timeline-step::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  width: calc(100% - 0px);
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.timeline-step:last-child::after { display: none; }
.timeline-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 2;
  position: relative;
  margin-bottom: 0.5rem;
}
.timeline-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.timeline-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  text-align: center;
  margin-top: 0.25rem;
}

.order-items {
  margin: 1rem 0;
}
.order-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}
.order-item:last-child { border-bottom: none; }
.order-item-name { color: var(--text); }
.order-item-price { color: var(--primary); font-weight: 600; }

.order-total {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.05rem;
}

/* ===== MODAL ===== */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.auth-overlay.hidden { display: none; }
.auth-modal {
  background: white;
  border-radius: 24px;
  width: 90%;
  max-width: 400px;
  padding: 2rem;
  padding-top: 3rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.auth-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--primary);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.auth-close:hover {
  color: var(--primary-hover);
  transform: scale(1.1);
}
.auth-modal h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
}
.auth-modal p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}
.auth-modal-header {
  text-align: center;
  margin-bottom: 2rem;
}
#auth-subtitle {
  margin-bottom: 0 !important;
}
.auth-form-content {
  display: none;
}
.auth-form-content.active {
  display: block;
}

/* ===== FOOTER ===== */
.footer {
  width: 100%;
  background: #1a1a1a;
  color: white;
  padding: 3rem 2rem;
  margin-top: auto;
  border-top: 3px solid var(--primary);
}
.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}
.footer-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
}
.footer-text {
  color: #aaa;
  font-size: 0.9rem;
}
.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.footer-link {
  color: #aaa;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}
.footer-link:hover {
  color: var(--primary);
  text-decoration: underline;
}
.footer-divider {
  width: 100%;
  height: 1px;
  background: #333;
  margin: 1rem 0;
}
.footer-bottom {
  color: #666;
  font-size: 0.85rem;
}
.vanguard-link {
  color: var(--primary);
  font-weight: 600;
}
.vanguard-link:hover {
  text-decoration: underline;
}

/* ===== TOS MODAL ===== */
.tos-modal {
  max-width: 600px !important;
  max-height: 80vh;
}
.tos-content {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
  padding: 1rem 0;
}
.tos-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.tos-content ol, .tos-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}
.tos-content li {
  margin-bottom: 0.5rem;
}

/* ===== ADMIN PANEL ===== */
.admin-content {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
}
.admin-search {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table thead {
  background: var(--bg-card);
  font-weight: 600;
  color: var(--text);
}
.admin-table th {
  padding: 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border);
}
.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}
.admin-table tr:hover { background: var(--bg-card); }

.admin-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.admin-btn {
  padding: 0.3rem 0.6rem;
  border: none;
  border-radius: 4px;
  background: var(--bg-card);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.admin-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header-inner { padding: 0 1rem; }
  .dashboard { padding: 1rem; }
  .hero { padding: 3rem 1rem 2rem; }
  .hero-title { font-size: 2rem; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
  .form-card { padding: 1rem; }
  .order-card { padding: 1rem; }
  .balance-bar { padding: 1rem; }
  .balance-amount { font-size: 2rem; }
  .dashboard-tabs { flex-wrap: wrap; }
  .dash-tab { padding: 0.75rem 1rem; font-size: 0.85rem; }
  .hero-search { flex-direction: column; }
  .auth-modal { width: 95%; max-width: 95%; }
  .footer { padding: 2rem 1rem; }
  .how-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .header-inner { gap: 1rem; }
  .logo-text { font-size: 1.2rem; }
  .header-nav { gap: 0.5rem; }
  .btn { padding: 0.5rem 1rem; font-size: 0.85rem; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
  .dashboard-tabs { padding: 0; }
  .dash-tab { padding: 0.5rem; font-size: 0.75rem; }
  .dash-tab-label { display: none; }
  .form-card { padding: 0.75rem; }
  .order-card { padding: 0.75rem; }
  .hero-title { font-size: 1.5rem; }
  .balance-amount { font-size: 1.5rem; }
  .hero { padding: 2rem 1rem; }
  .footer { padding: 1.5rem 1rem; }
  .footer-links { gap: 1rem; }
}

/* ===== STORE DASHBOARD ===== */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
body.dark-mode .stat-card {
  background: var(--bg-card);
}
.stat-card-label {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}
.stat-card-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  font-family: 'Poppins', sans-serif;
}
.dashboard-sections-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 992px) {
  .dashboard-sections-grid {
    grid-template-columns: 1fr;
  }
}
.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.dashboard-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border);
  color: var(--text-light);
  font-weight: 600;
}
.dashboard-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.dashboard-table tr:hover {
  background: var(--bg-2);
}
.sparkline-container {
  height: 120px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding-top: 1rem;
  border-bottom: 1px solid var(--border);
}
.sparkline-bar {
  flex: 1;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
  transition: height 0.3s;
  position: relative;
  min-height: 4px;
}
.sparkline-bar:hover {
  background: var(--primary-hover);
}
.sparkline-tooltip {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 10;
}
.sparkline-bar:hover .sparkline-tooltip {
  opacity: 1;
}

/* ===== ANNOUNCEMENTS ===== */
.announcement-banner {
  background: linear-gradient(90deg, #ffeaea 0%, #fff5f5 100%);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
body.dark-mode .announcement-banner {
  background: linear-gradient(90deg, #3a1a1a 0%, #201212 100%);
  border-left-color: var(--primary);
}

/* ===== DARK MODE OVERRIDES ===== */
body.dark-mode {
  --bg: #121212;
  --bg-2: #1a1a1a;
  --bg-card: #242424;
  --bg-input: #2d2d2d;
  --border: #333333;
  --text: #f5f5f5;
  --text-light: #b0b0b0;
  --text-muted: #707070;
}
body.dark-mode .header {
  background: var(--bg);
}
body.dark-mode .form-card,
body.dark-mode .product-card,
body.dark-mode .cart-item,
body.dark-mode .order-card,
body.dark-mode .timeline-dot,
body.dark-mode .admin-content,
body.dark-mode .auth-modal,
body.dark-mode .how-card,
body.dark-mode .stat-pill {
  background: var(--bg-card);
}
body.dark-mode .btn-ghost {
  background: var(--bg);
  color: var(--text);
}
body.dark-mode .nav-link {
  color: var(--text-light);
}
body.dark-mode .logo-text {
  color: #ff4a4a;
}
body.dark-mode input, body.dark-mode textarea, body.dark-mode select {
  background: var(--bg-input);
  color: var(--text);
  border-color: var(--border);
}
body.dark-mode .dashboard-table tr:hover {
  background: var(--bg-card);
}
body.dark-mode .admin-table tr:hover {
  background: var(--bg-card);
}
body.dark-mode .admin-table thead {
  background: var(--bg-input);
}
body.dark-mode .footer {
  background: #0a0a0a;
}

/* ===== SUB TABS & SUB VIEWS ===== */
.sub-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}
.sub-tab {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}
.sub-tab:hover {
  background: var(--bg-2);
  color: var(--text);
  border-color: var(--text-light);
}
.sub-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
body.dark-mode .sub-tab {
  background: var(--bg-input);
  color: var(--text-light);
  border-color: var(--border);
}
body.dark-mode .sub-tab:hover {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--text-light);
}
body.dark-mode .sub-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.mview, .dview, .aview {
  display: none;
}
.mview.active, .dview.active, .aview.active {
  display: block;
}

