/* ═══════════════════════════════════════════════
   QuMart v3 — Shopee-Style Design System
   ═══════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Design Tokens ── */
:root {
  --primary: #EE4D2D;
  --primary-dark: #D23F1F;
  --primary-light: #FFF0EC;
  --green: #26AA99;
  --gold: #FFD700;
  --red: #FF424E;
  --warning: #F59E0B;
  --danger: #FF424E;

  --bg: #F5F5F5;
  --white: #FFFFFF;
  --text: #222222;
  --text-secondary: #757575;
  --text-light: #999999;
  --border: #E8E8E8;
  --divider: #F0F0F0;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.10);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --header-h: 56px;
  --bottom-nav-h: 56px;

  --font: 'Inter', -apple-system, sans-serif;
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --primary: #FF5C3A;
  --primary-dark: #E0482F;
  --primary-light: #2C1A14;

  --bg: #0F0F0F;
  --white: #1A1A1A;
  --text: #E8E8E8;
  --text-secondary: #9E9E9E;
  --text-light: #777777;
  --border: #2A2A2A;
  --divider: #222222;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.5);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.5);

  color-scheme: dark;
}
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] #category-strip { background: var(--white); border-bottom: 1px solid var(--border); }
[data-theme="dark"] #bottom-nav { background: var(--white); border-top: 1px solid var(--border); }
[data-theme="dark"] .product-card { background: var(--white); }
[data-theme="dark"] .product-card .card-img-wrap { background: #252525; }
[data-theme="dark"] input, [data-theme="dark"] textarea, [data-theme="dark"] select {
  background: #252525; color: var(--text); border-color: var(--border);
}
[data-theme="dark"] .modal-overlay.show .modal-sheet { background: var(--white); }
[data-theme="dark"] .admin-sidebar { background: #121212; border-right: 1px solid var(--border); }
[data-theme="dark"] .admin-main { background: var(--bg); }
[data-theme="dark"] .admin-card { background: var(--white); border: 1px solid var(--border); }
[data-theme="dark"] .cart-item { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .order-card { background: var(--white); }
[data-theme="dark"] .flash-sale { background: var(--white); }
[data-theme="dark"] .banner-content { opacity: 0.95; }
[data-theme="dark"] table td, [data-theme="dark"] table th { border-color: var(--border); }
[data-theme="dark"] .toast-item { background: #252525; color: var(--text); }

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: var(--header-h);
  padding-bottom: calc(var(--bottom-nav-h) + 16px);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; outline: none; }

/* ── Animations ── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideDown { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes shimmer { 0% { background-position: -200px 0; } 100% { background-position: calc(200px + 100%) 0; } }
@keyframes toastIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes badgePop { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* ── Skeleton Loading ── */
.skeleton {
  background: linear-gradient(90deg, #eee 0%, #f5f5f5 40%, #eee 80%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

/* ═══════════════════════════════════════════════
   HEADER BAR (Shopee Orange)
   ═══════════════════════════════════════════════ */
#top-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px;
  box-shadow: var(--shadow-md);
}
#top-header .header-logo {
  height: 32px; flex-shrink: 0;
}
.header-search {
  flex: 1; display: flex; align-items: center;
  background: rgba(255,255,255,0.25); border-radius: 20px;
  height: 36px; padding: 0 12px; gap: 6px;
  backdrop-filter: blur(4px);
}
.header-search input {
  flex: 1; background: none; border: none; color: #fff;
  font-size: 13px; height: 100%;
}
.header-search input::placeholder { color: rgba(255,255,255,0.7); }
.header-search .search-btn {
  background: none; color: #fff; font-size: 18px;
  display: flex; align-items: center;
}
.header-cart {
  position: relative; color: #fff; font-size: 22px;
  display: flex; align-items: center; flex-shrink: 0;
  padding: 4px;
}
.header-cart .cart-badge {
  position: absolute; top: -2px; right: -4px;
  background: #fff; color: var(--primary);
  font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: none; align-items: center; justify-content: center;
  animation: badgePop 0.3s ease;
}
.header-cart .cart-badge.show { display: flex; }

/* Dark mode toggle */
.dark-toggle {
  background: none; border: none; color: #fff; font-size: 18px;
  cursor: pointer; padding: 4px 6px; display: flex; align-items: center;
  flex-shrink: 0; transition: transform 0.2s; line-height: 1;
}
.dark-toggle:hover { transform: scale(1.15); }
.dark-toggle:active { transform: scale(0.9); }

/* ── Logged-in header style ── */
#top-header.logged-in .header-greeting {
  flex: 0 0 auto; width: auto; color: #fff; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px;
  display: flex !important; align-items: center; max-width: 80px;
}
#top-header.logged-in .header-menu {
  color: #fff; font-size: 20px; display: flex; align-items: center; padding: 4px;
}

/* ═══════════════════════════════════════════════
   BOTTOM NAVIGATION (5 Tab Shopee)
   ═══════════════════════════════════════════════ */
#bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--bottom-nav-h);
  background: var(--white);
  display: flex; align-items: center;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}
.nav-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--text-light); font-size: 10px; font-weight: 500;
  transition: color 0.2s; padding: 6px 0; position: relative;
}
.nav-tab .nav-icon { font-size: 20px; line-height: 1; }
.nav-tab.active { color: var(--primary); font-weight: 600; }
.nav-tab.active::after {
  content: ''; position: absolute; top: 0; left: 25%; right: 25%;
  height: 2px; background: var(--primary); border-radius: 0 0 2px 2px;
}
.nav-tab .cart-dot {
  position: absolute; top: 4px; right: calc(50% - 24px);
  width: 8px; height: 8px; background: var(--primary); border-radius: 50%;
  display: none;
}
.nav-tab .cart-dot.show { display: block; }

/* ═══════════════════════════════════════════════
   CATEGORY STRIP (Horizontal Scroll)
   ═══════════════════════════════════════════════ */
#category-strip {
  background: var(--white); padding: 12px 0 8px;
  margin-bottom: 8px; box-shadow: var(--shadow-sm);
}
#category-strip .cat-scroll {
  display: flex; gap: 6px; overflow-x: auto; scroll-behavior: smooth;
  padding: 0 12px; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  justify-content: center; flex-wrap: wrap;
}
#category-strip .cat-scroll::-webkit-scrollbar { display: none; }
.cat-item {
  flex-shrink: 0; width: 72px; display: flex; flex-direction: column;
  align-items: center; gap: 6px; cursor: pointer; padding: 4px;
  border-radius: var(--radius); transition: background 0.15s;
}
.cat-item:active { background: var(--divider); }
.cat-item.active { background: var(--primary-light); }
.cat-item.active .cat-name { color: var(--primary); font-weight: 600; }
.cat-item .cat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.cat-item:nth-child(1) .cat-icon { background: #FFF3E0; }
.cat-item:nth-child(2) .cat-icon { background: #E8F5E9; }
.cat-item:nth-child(3) .cat-icon { background: #F3E5F5; }
.cat-item:nth-child(4) .cat-icon { background: #E3F2FD; }
.cat-item:nth-child(5) .cat-icon { background: #FFF8E1; }
.cat-item:nth-child(6) .cat-icon { background: #FFEBEE; }
.cat-item:nth-child(7) .cat-icon { background: #E0F7FA; }
.cat-item:nth-child(8) .cat-icon { background: #F9FBE7; }
.cat-item:nth-child(9) .cat-icon { background: #FCE4EC; }
.cat-item:nth-child(10) .cat-icon { background: #EFEBE9; }
.cat-item .cat-name {
  font-size: 11px; font-weight: 500; color: var(--text);
  text-align: center; line-height: 1.2; max-width: 72px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════════
   FLASH SALE SECTION
   ═══════════════════════════════════════════════ */
#flash-sale {
  background: var(--white); margin-bottom: 8px; padding: 12px;
  box-shadow: var(--shadow-sm);
}
.flash-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.flash-header .flash-title {
  font-size: 16px; font-weight: 700; color: var(--primary);
  display: flex; align-items: center; gap: 8px;
}
.flash-countdown {
  display: flex; align-items: center; gap: 4px;
}
.flash-countdown .timer-box {
  background: #222; color: #fff; font-size: 12px; font-weight: 700;
  padding: 2px 5px; border-radius: 3px; min-width: 22px; text-align: center;
}
.flash-countdown .timer-sep {
  color: #222; font-weight: 700; font-size: 11px;
}
.flash-products {
  display: flex; gap: 10px; overflow-x: auto;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.flash-products::-webkit-scrollbar { display: none; }
.flash-card {
  flex-shrink: 0; width: 120px; cursor: pointer;
}
.flash-card .flash-img {
  width: 120px; height: 120px; border-radius: 4px;
  object-fit: cover; background: var(--divider);
}
.flash-card .flash-price {
  font-size: 16px; font-weight: 700; color: var(--primary);
  margin-top: 4px;
}
.flash-card .flash-discount {
  font-size: 10px; color: var(--text-light); text-decoration: line-through;
}
.flash-card .flash-progress {
  margin-top: 6px; height: 14px; background: #FFD1C4;
  border-radius: 7px; position: relative; overflow: hidden;
}
.flash-card .flash-progress .bar {
  height: 100%; background: var(--primary); border-radius: 7px;
  transition: width 0.5s;
}
.flash-card .flash-progress .label {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 9px; font-weight: 700; color: #fff;
}

/* ═══════════════════════════════════════════════
   PRODUCT GRID (2 Kolom ala Shopee)
   ═══════════════════════════════════════════════ */
#product-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 8px; padding: 0 8px;

}
.product-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
  display: flex; flex-direction: column;
}
.product-card:active { transform: scale(0.98); box-shadow: var(--shadow-md); }
.product-card .card-img-wrap {
  position: relative; padding-top: 100%; overflow: hidden; background: #F0F0F0;
}
.product-card .card-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.3s;
}
.product-card .card-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.product-card .card-emoji {
  font-size: 40px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}
.product-card .card-discount {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,0.5); color: var(--gold);
  font-size: 10px; font-weight: 700; padding: 2px 5px;
  border-radius: 2px;
}
.product-card .card-body { padding: 8px 10px 10px; flex: 1; display: flex; flex-direction: column; }
.product-card .card-name {
  font-size: 12px; line-height: 1.3; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 6px; min-height: 31px;
}
.product-card .card-bottom {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
}
.product-card .card-price {
  font-size: 15px; font-weight: 700; color: var(--primary);
}
.product-card .card-sold {
  font-size: 10px; color: var(--text-light);
}
.product-card .btn-add-cart-quick {
  margin-top: 8px; padding: 6px 0;
  background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius); font-size: 12px;
  font-weight: 600; cursor: pointer; width: 100%;
  transition: background 0.15s; text-align: center;
}
.product-card .btn-add-cart-quick:hover { background: var(--primary-dark); }
.product-card .btn-add-cart-quick:active { transform: scale(0.96); }

/* ── Variant Pills ── */
.variant-pill {
  padding: 4px 10px; border: 1px solid var(--border);
  border-radius: 16px; background: var(--bg);
  font-size: 11px; color: var(--text-dim); cursor: pointer;
  white-space: nowrap; transition: all 0.15s;
}
.variant-pill:hover {
  border-color: var(--primary); color: var(--primary);
  background: var(--primary-light);
}
.detail-variant-pill:hover {
  border-color: var(--primary) !important; color: var(--primary) !important;
}

/* ── Banner Slider ── */
.banner-slider {
  margin: 8px 12px; border-radius: 12px; overflow: hidden;
  position: relative; box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.banner-track {
  display: flex; transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.banner-slide {
  min-width: 100%; flex-shrink: 0;
}
.banner-content {
  display: flex; align-items: center; padding: 20px 18px; color: #fff;
  min-height: 100px; position: relative; overflow: hidden;
}
.banner-content::after {
  content: ''; position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px; background: rgba(255,255,255,0.1);
  border-radius: 50%;
}
.banner-text { flex: 1; z-index: 1; }
.banner-text h2 { font-size: 18px; font-weight: 800; margin: 0 0 4px 0; }
.banner-text p { font-size: 13px; opacity: 0.9; margin: 0; }
.banner-icon { font-size: 48px; margin-left: 12px; z-index: 1; animation: bannerFloat 2s ease-in-out infinite; }
@keyframes bannerFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.banner-dots {
  display: flex; justify-content: center; gap: 6px;
  position: absolute; bottom: 10px; left: 0; right: 0;
}
.banner-dot {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4);
  cursor: pointer; transition: all 0.3s; border: none; padding: 0;
}
.banner-dot.active { background: #fff; width: 24px; border-radius: 4px; }


/* ═══════════════════════════════════════════════
   BOTTOM SHEET MODAL (Shopee Style)
   ═══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.65);
  display: none; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.2s;
}
.modal-overlay.show { display: flex; }
.modal-sheet {
  width: 100%; max-width: 480px; max-height: 85vh;
  background: var(--white); border-radius: 16px 16px 0 0;
  overflow-y: auto; animation: slideUp 0.3s ease;
  display: flex; flex-direction: column;
}
.modal-sheet .sheet-handle {
  width: 36px; height: 4px; background: #D0D0D0; border-radius: 2px;
  margin: 10px auto 6px; flex-shrink: 0;
}
.modal-sheet .sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px 12px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--white); z-index: 1;
}
.modal-sheet .sheet-title { font-size: 16px; font-weight: 700; }
.modal-sheet .sheet-close {
  width: 28px; height: 28px; border-radius: 50%; background: var(--divider);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-secondary);
}
.modal-sheet .sheet-body { padding: 16px; flex: 1; }
.sheet-body .product-detail-img {
  width: 100%; max-height: 300px; object-fit: contain;
  border-radius: var(--radius); background: var(--divider);
  margin-bottom: 12px;
}
.sheet-body .detail-name { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.sheet-body .detail-price { font-size: 22px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.sheet-body .detail-stock { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }
.sheet-body .detail-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }
.qty-control {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.qty-control button {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--white); font-size: 16px; display: flex; align-items: center; justify-content: center;
}
.qty-control button:active { background: var(--divider); }
.qty-control .qty-val { font-size: 16px; font-weight: 600; min-width: 24px; text-align: center; }

/* Detail action row — Keranjang + Beli */
.detail-action-row {
  display: flex; gap: 10px;
}
.detail-action-row .btn-add-cart {
  flex: 1; height: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, #FF6B35 100%);
  color: #fff; font-size: 14px; font-weight: 700; border-radius: var(--radius);
  transition: opacity 0.2s;
}
.detail-action-row .btn-add-cart:active { opacity: 0.85; }
.btn-buy-now {
  flex: 1; height: 44px;
  background: linear-gradient(135deg, var(--green) 0%, #2ecc71 100%);
  color: #fff; font-size: 14px; font-weight: 700; border: none; border-radius: var(--radius);
  cursor: pointer; transition: opacity 0.2s;
}
.btn-buy-now:active { opacity: 0.85; }

/* ═══════════════════════════════════════════════
   LOGIN / REGISTER SHEET
   ═══════════════════════════════════════════════ */
.login-body { display: flex; flex-direction: column; gap: 14px; }
.login-body .input-group { display: flex; flex-direction: column; gap: 4px; }
.login-body .input-group label {
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.login-body .input-group input {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; transition: border-color 0.2s;
}
.login-body .input-group input:focus { border-color: var(--primary); }
.login-body .input-hint { font-size: 11px; color: var(--red); display: none; }
.login-body .input-group.error .input-hint { display: block; }
.login-body .input-group.error input { border-color: var(--red); }
.btn-primary {
  width: 100%; height: 42px; background: var(--primary);
  color: #fff; font-size: 15px; font-weight: 600; border-radius: var(--radius);
  transition: opacity 0.2s;
}
.btn-primary:active { opacity: 0.85; }
.login-footer {
  text-align: center; font-size: 13px; color: var(--text-secondary);
  margin-top: 4px;
}
.login-footer a { color: var(--primary); font-weight: 600; cursor: pointer; }

/* ═══════════════════════════════════════════════
   ACCOUNT PAGE
   ═══════════════════════════════════════════════ */
.account-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 20px 16px; color: #fff; display: flex; align-items: center; gap: 12px;
}
.account-avatar {
  width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.account-info .acct-name { font-size: 16px; font-weight: 600; }
.account-info .acct-phone { font-size: 12px; opacity: 0.8; }
.account-menu {
  background: var(--white); margin: 8px 8px 0; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.acct-menu-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--divider); cursor: pointer; font-size: 14px;
}
.acct-menu-item:last-child { border-bottom: none; }
.acct-menu-item .menu-icon { font-size: 20px; width: 28px; text-align: center; }
.acct-menu-item .arrow { margin-left: auto; color: var(--text-light); }
.acct-menu-item:active { background: var(--divider); }
.btn-logout {
  width: calc(100% - 16px); height: 42px; margin: 12px 8px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; font-weight: 600; color: var(--red);
  box-shadow: var(--shadow-sm);
}

/* ═══════════════════════════════════════════════
   ORDER PAGE
   ═══════════════════════════════════════════════ */
.order-tabs {
  display: flex; background: var(--white); border-bottom: 1px solid var(--border);
  position: sticky; top: var(--header-h); z-index: 10;
}
.order-tab {
  flex: 1; padding: 12px 8px; text-align: center; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.order-tab.active { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.order-card {
  background: var(--white); margin: 8px; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.order-card .order-hdr {
  display: flex; justify-content: space-between; padding: 10px 12px;
  border-bottom: 1px solid var(--divider); font-size: 12px; color: var(--text-secondary);
}
.order-card .order-item { padding: 10px 12px; display: flex; gap: 10px; }
.order-card .order-img {
  width: 64px; height: 64px; border-radius: 4px; object-fit: cover; background: var(--divider);
}
.order-card .order-nfo { flex: 1; font-size: 13px; }
.order-card .order-price { font-weight: 600; color: var(--primary); margin-top: 4px; }
.order-card .order-qty { font-size: 11px; color: var(--text-light); }
.order-card .order-total {
  display: flex; justify-content: flex-end; padding: 8px 12px;
  border-top: 1px solid var(--divider); font-size: 13px; font-weight: 600;
}

/* ═══════════════════════════════════════════════
   CART PAGE
   ═══════════════════════════════════════════════ */
.cart-item {
  display: flex; gap: 10px; padding: 12px;
  background: var(--white); margin: 8px; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); align-items: center;
}
.cart-item .cart-img {
  width: 72px; height: 72px; border-radius: 4px; object-fit: cover; background: var(--divider);
}
.cart-item .cart-info { flex: 1; }
.cart-item .cart-name { font-size: 13px; margin-bottom: 4px; }
.cart-item .cart-price { font-size: 15px; font-weight: 700; color: var(--primary); }
.cart-item .qty-row {
  display: flex; align-items: center; gap: 6px; margin-top: 8px;
}
.cart-item .qty-btn {
  width: 28px; height: 28px; border-radius: 4px; border: 1px solid var(--border);
  background: var(--white); font-size: 16px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); transition: all 0.15s;
}
.cart-item .qty-btn:hover { background: var(--primary-light); border-color: var(--primary); }
.cart-item .qty-input {
  width: 52px; height: 28px; border: 1px solid var(--border); border-radius: 4px;
  text-align: center; font-size: 14px; font-weight: 600; padding: 0;
  appearance: textfield;
  -moz-appearance: textfield;
}
.cart-item .qty-input::-webkit-outer-spin-button,
.cart-item .qty-input::-webkit-inner-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}
.cart-item .qty-del {
  margin-left: auto; width: 28px; height: 28px; border-radius: 4px;
  border: 1px solid var(--border); background: var(--white);
  font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; color: var(--text-secondary);
}
.cart-item .qty-del:hover { background: #fff0f0; border-color: var(--red); color: var(--red); }
.cart-summary {
  position: fixed; bottom: var(--bottom-nav-h); left: 0; right: 0; z-index: 50;
  background: var(--white); padding: 10px 16px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}
.cart-summary .total-label { font-size: 12px; color: var(--text-secondary); }
.cart-summary .total-price { font-size: 18px; font-weight: 700; color: var(--primary); }
.btn-checkout {
  height: 40px; padding: 0 24px; background: var(--primary); color: #fff;
  font-size: 14px; font-weight: 600; border-radius: 20px;
}
.cart-empty {
  text-align: center; padding: 60px 20px; color: var(--text-light);
}
.cart-empty .empty-icon { font-size: 64px; display: block; margin-bottom: 12px; }

/* ═══════════════════════════════════════════════
   ADDRESS FORM
   ═══════════════════════════════════════════════ */
.btn-add-address {
  width: 100%; padding: 12px; background: var(--primary-light); color: var(--primary);
  border: 1px dashed var(--primary); border-radius: 8px; font-size: 14px;
  font-weight: 600; cursor: pointer; margin-top: 16px; transition: background 0.2s;
}
.btn-add-address:hover { background: var(--primary); color: #fff; }
.address-form {
  margin-top: 16px; padding: 16px; background: var(--divider); border-radius: 12px;
}
.address-form .input-group { margin-bottom: 12px; gap: 2px; }
.address-form .input-group label { font-size: 12px; font-weight: 500; }
.address-form .input-group input,
.address-form .input-group textarea,
.address-form .input-group select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: var(--font); background: var(--white);
  color: var(--text); transition: border-color 0.2s;
}
.address-form .input-group input:focus,
.address-form .input-group textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light);
}
.address-form textarea { resize: vertical; min-height: 60px; }
.addr-form-btns {
  display: flex; gap: 10px; margin-top: 16px;
}
.btn-save-addr {
  flex: 1; padding: 12px; background: var(--primary); color: #fff;
  border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-cancel-addr {
  padding: 12px 20px; background: var(--divider); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: 8px; font-size: 13px; cursor: pointer;
}
#address-list > div:hover { border-color: var(--primary) !important; }

/* ═══════════════════════════════════════════════
   TOAST / NOTIFICATION
   ═══════════════════════════════════════════════ */
#toast {
  position: fixed; top: var(--header-h); left: 12px; right: 12px; z-index: 300;
  display: flex; flex-direction: column; gap: 6px; pointer-events: none;
}
.toast-item {
  padding: 12px 16px; border-radius: var(--radius); color: #fff;
  font-size: 13px; font-weight: 500; animation: toastIn 0.3s ease;
  box-shadow: var(--shadow-md); pointer-events: auto;
}
.toast-item.success { background: linear-gradient(135deg, #F59E0B, #FBBF24); }
.toast-item.error { background: linear-gradient(135deg, #F59E0B, #D97706); }
.toast-item.info { background: linear-gradient(135deg, #FBBF24, #F59E0B); }
.toast-item.wallet {
  background: linear-gradient(135deg, #F59E0B, #FBBF24); color: #fff;
  position: fixed; bottom: 0; left: 0; right: 0; top: auto; z-index: 210;
  border-radius: 16px 16px 0 0; padding: 24px 16px;
  max-height: 60vh; overflow-y: auto;
  animation: slideUp 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}
.toast-item.address {
  background: linear-gradient(135deg, #FBBF24, #F59E0B); color: #fff;
  position: fixed; bottom: 0; left: 0; right: 0; top: auto; z-index: 210;
  border-radius: 16px 16px 0 0; padding: 24px 16px;
  max-height: 60vh; overflow-y: auto;
  animation: slideUp 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

/* ═══════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--text-light);
}
.empty-state .empty-icon { font-size: 56px; margin-bottom: 12px; }
.empty-state .empty-text { font-size: 14px; }
.empty-state .empty-action {
  margin-top: 12px; padding: 10px 24px; background: var(--primary);
  color: #fff; border-radius: 20px; font-weight: 600; font-size: 13px;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — TOKO PENGGUNA (4 Tier)
   ═══════════════════════════════════════════════ */

/* ── Mobile Small (<480px) — default sudah mobile-first ── */
@media (max-width: 479px) {
  #top-header { padding: 0 8px; gap: 6px; }
  #top-header .header-logo { height: 26px; }
  .header-search { height: 32px; padding: 0 8px; }
  .header-search input { font-size: 12px; }
  .header-cart { font-size: 20px; }
  #top-header.logged-in .header-greeting { font-size: 10px; max-width: 56px; }
  #top-header.logged-in .header-menu { font-size: 18px; }
  .header-search .search-btn { font-size: 16px; }

  .banner-slider { margin: 6px 8px; }
  .banner-content { padding: 14px 12px; min-height: 80px; }
  .banner-text h2 { font-size: 14px; }
  .banner-text p { font-size: 11px; }
  .banner-icon { font-size: 36px; margin-left: 8px; }

  .cat-item { width: 62px; }
  .cat-item .cat-icon { width: 40px; height: 40px; font-size: 20px; }
  .cat-item .cat-name { font-size: 10px; }

  #product-grid { gap: 6px; padding: 0 6px; }
  .product-card .card-name { font-size: 11px; min-height: 28px; }
  .product-card .card-price { font-size: 13px; }
  .product-card .card-body { padding: 6px 8px 8px; }
  .product-card .card-discount { font-size: 9px; padding: 1px 4px; }

  .flash-card { width: 100px; }
  .flash-card .flash-img { width: 100px; height: 100px; }
  .flash-card .flash-price { font-size: 14px; }

  .account-header { padding: 16px 12px; }
  .account-avatar { width: 40px; height: 40px; font-size: 20px; }
  .account-info .acct-name { font-size: 14px; }
  .acct-menu-item { padding: 12px 14px; font-size: 13px; gap: 10px; }

  .order-tab { font-size: 11px; padding: 10px 4px; }
  .cart-item { padding: 10px; gap: 8px; margin: 6px; }
  .cart-item .cart-img { width: 60px; height: 60px; }
  .cart-item .cart-name { font-size: 12px; }
  .cart-item .cart-price { font-size: 13px; }
  .cart-item .qty-btn { width: 24px; height: 24px; font-size: 14px; }
  .cart-item .qty-input { width: 44px; height: 24px; font-size: 12px; }
  .cart-item .qty-del { width: 24px; height: 24px; font-size: 12px; }

  .btn-checkout { padding: 0 16px; font-size: 13px; height: 36px; }
  .cart-summary { padding: 8px 12px; }
  .cart-summary .total-price { font-size: 16px; }

  .modal-sheet { max-height: 90vh; border-radius: 12px 12px 0 0; }
  .modal-sheet .sheet-header { padding: 0 12px 10px; }
  .modal-sheet .sheet-title { font-size: 15px; }
  .modal-sheet .sheet-body { padding: 12px; }

  .nav-tab { font-size: 9px; padding: 4px 0; }
  .nav-tab .nav-icon { font-size: 18px; }

  /* Chat */
  .chat-sheet .chat-footer { padding: 8px; }
  .chat-sheet .chat-input-wrap { gap: 6px; }
  .chat-sheet .chat-input-wrap input { font-size: 13px; height: 38px; }
  .quick-btn { font-size: 11px; padding: 6px 10px; }
}

/* ── Mobile Medium (480–767px) — default styling sudah ok, just tweaks ── */
@media (min-width: 480px) and (max-width: 767px) {
  #top-header { gap: 10px; }
  #product-grid { gap: 8px; padding: 0 8px; }
  .flash-card { width: 115px; }
  .flash-card .flash-img { width: 115px; height: 115px; }
}

/* ── Tablet (768–1023px) ── */
@media (min-width: 768px) and (max-width: 1023px) {
  #top-header { padding: 0 16px; }
  #top-header .header-logo { height: 36px; }
  .header-search { max-width: 400px; margin: 0 auto; }
  #top-header.logged-in .header-greeting { font-size: 12px; max-width: none; }
  #top-header.logged-in .header-menu { font-size: 22px; }

  .banner-slider { max-width: 700px; margin: 12px auto; border-radius: 14px; }
  .banner-content { padding: 24px 28px; min-height: 120px; }
  .banner-text h2 { font-size: 22px; }
  .banner-text p { font-size: 14px; }
  .banner-icon { font-size: 56px; }

  #product-grid { grid-template-columns: repeat(3, 1fr); max-width: 720px; margin: 0 auto; gap: 10px; padding: 0 10px; }
  .product-card .card-name { font-size: 13px; }
  .product-card .card-price { font-size: 16px; }

  .flash-card { width: 130px; }
  .flash-card .flash-img { width: 130px; height: 130px; }

  .cat-item { width: 80px; }
  .cat-item .cat-icon { width: 52px; height: 52px; }

  .account-header { padding: 24px 20px; }
  .account-menu, .btn-logout { max-width: 600px; margin-left: auto; margin-right: auto; }

  .cart-summary { padding: 12px 20px; }
  .modal-sheet { max-width: 520px; }
}

/* ── Desktop (≥1024px) ── */
@media (min-width: 1024px) {
  body {
    max-width: 1024px; margin: 0 auto;
    padding-top: calc(var(--header-h) + 8px);
    padding-bottom: calc(var(--bottom-nav-h) + 24px);
    box-shadow: 0 0 40px rgba(0,0,0,0.05);
  }
  #top-header { max-width: 1024px; left: 50%; transform: translateX(-50%); border-radius: 0 0 12px 12px; }
  #bottom-nav { max-width: 1024px; left: 50%; transform: translateX(-50%); border-radius: 12px 12px 0 0; }

  .banner-slider { max-width: 960px; margin: 12px auto; }
  #product-grid { grid-template-columns: repeat(4, 1fr); max-width: 960px; margin: 0 auto; gap: 12px; }

  .flash-card { width: 140px; }
  .flash-card .flash-img { width: 140px; height: 140px; }

  .account-header { max-width: 100%; border-radius: var(--radius-xl); margin: 0 8px; }
  .account-menu, .btn-logout { max-width: 700px; margin-left: auto; margin-right: auto; }

  .order-tabs { max-width: 960px; margin: 0 auto; }
  .order-card { max-width: 960px; margin: 8px auto; }

  .cart-item { max-width: 960px; margin: 8px auto; }
  .cart-summary { max-width: 1024px; left: 50%; transform: translateX(-50%); border-radius: 12px 12px 0 0; }

  .modal-sheet { max-width: 540px; }
}

/* ── Hide non-active sections ── */
.page-section { display: none; }
.page-section.active { display: block; animation: fadeIn 0.2s; }

/* ═══════════════════════════════════════════════
   ADMIN PANEL STYLES (Shopee-style)
   ═══════════════════════════════════════════════ */

/* Login Screen */
.login-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
}
.login-screen.hidden { display: none; }
.login-card {
  background: var(--white); border-radius: 16px; padding: 32px 24px;
  box-shadow: var(--shadow-lg); width: 100%; max-width: 380px; text-align: center;
}
.login-card h1 { font-size: 24px; margin-bottom: 8px; }

/* Admin Layout */
.admin-layout { display: flex; min-height: 100vh; margin: 0; padding: 0; }

/* Hamburger (mobile) */
.admin-hamburger {
  display: none; position: fixed; top: 10px; left: 10px; z-index: 1001;
  background: var(--primary); color: #fff; border: none; border-radius: 8px;
  width: 40px; height: 40px; font-size: 22px; cursor: pointer; box-shadow: var(--shadow-md);
}

/* Sidebar */
.admin-sidebar {
  width: 220px; min-height: 100vh; background: var(--white);
  border-right: 1px solid var(--border); padding: 16px 0;
  display: flex; flex-direction: column; flex-shrink: 0;
  transition: transform 0.25s ease;
  z-index: 1000;
}
.admin-sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.4);
}
.admin-sidebar-overlay.open { display: block; }
.admin-nav-item {
  padding: 12px 20px; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; gap: 8px;
  transition: background 0.15s; color: var(--text);
}
.admin-nav-item:hover { background: var(--primary-light); }
.admin-nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* Main Content */
.admin-main { flex: 1; padding: 20px; overflow-x: hidden; background: var(--bg); }
.admin-page { display: none; }
.admin-page.active { display: block; }

/* Stat Cards */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.stat-card {
  background: var(--white); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-card-value {
  font-size: 28px; font-weight: 800; color: var(--primary);
}
.stat-card .stat-card-label {
  font-size: 12px; color: var(--text-secondary); margin-top: 4px;
}

/* Admin Tables */
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.admin-table th { background: var(--bg); padding: 12px; font-size: 12px; text-align: left; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; }
.admin-table td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid var(--divider); }

/* Form Elements */
.form-group { margin-bottom: 12px; }
.form-label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; color: var(--text-secondary); }
.form-input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 13px; font-family: inherit;
  box-sizing: border-box; background: var(--white);
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
textarea.form-input { resize: vertical; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 8px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; transition: all 0.15s; font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--primary-light); }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-sm { padding: 4px 10px; font-size: 11px; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #D32F2F; }
.btn-outline { background: transparent; border: 1px solid var(--border); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.5);
  display: none; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white); border-radius: 16px; width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 18px; }
.modal-close {
  background: none; border: none; font-size: 22px;
  cursor: pointer; color: var(--text-secondary); padding: 4px 8px;
}

/* Flex utilities */
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: 12px; }
.text-dim { color: var(--text-secondary); }

/* Chatbot AI Help */
.chat-sheet { max-width: 420px; height: 80vh; }
.chat-body { display: flex; flex-direction: column; height: calc(80vh - 56px); padding: 0 !important; }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  background: var(--bg);
}
.chat-msg { display: flex; gap: 8px; align-items: flex-start; animation: msgIn 0.3s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.chat-msg.user { flex-direction: row-reverse; }
.chat-msg .msg-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.chat-msg.user .msg-avatar { background: var(--primary); }
.chat-msg .msg-bubble {
  background: #fff; border-radius: 16px 16px 16px 4px;
  padding: 10px 14px; font-size: 13px; line-height: 1.5;
  max-width: 75%; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  color: var(--text);
}
.chat-msg.user .msg-bubble { background: var(--primary); color: #fff; border-radius: 16px 16px 4px 16px; }
.chat-quick-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.quick-btn {
  background: var(--primary-light); color: var(--primary);
  border: none; border-radius: 16px; padding: 6px 14px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all 0.2s;
}
.quick-btn:hover { background: var(--primary); color: #fff; }
.chat-input-row {
  display: flex; gap: 8px; padding: 10px 12px;
  border-top: 1px solid var(--border); background: #fff;
}
.chat-input-row input {
  flex: 1; border: 1px solid var(--border); border-radius: 20px;
  padding: 10px 16px; font-size: 13px; outline: none;
  transition: border-color 0.2s;
}
.chat-input-row input:focus { border-color: var(--primary); }
.chat-input-row button {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: var(--primary); color: #fff; font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-footer {
  padding: 8px 16px; text-align: center; font-size: 11px;
  color: var(--text-secondary); border-top: 1px solid var(--border); background: #fff;
}
.chat-wa-link {
  color: #25D366; font-weight: 700; text-decoration: none;
}
.chat-escalate {
  margin-top: 8px; padding: 8px 12px; background: #fff8e1;
  border-radius: 12px; font-size: 12px; color: #e65100;
  border: 1px solid #ffe0b2;
}
.chat-typing {
  display: flex; gap: 4px; padding: 10px 14px;
  align-items: center;
}
.chat-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--text-light);
  animation: typingBounce 1.4s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%,80%,100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.toast {
  background: var(--text); color: #fff; padding: 10px 20px;
  border-radius: 8px; font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg); animation: fadeIn 0.2s;
}

/* Admin floating button */
.admin-floating-btn {
  position: fixed; bottom: 80px; right: 16px; z-index: 500;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 24px;
  border: none; box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  cursor: pointer; display: none; align-items: center; justify-content: center;
  animation: fadeIn 0.3s ease;
}
.admin-floating-btn:hover { transform: scale(1.1); }

/* Responsive Admin */
@media (max-width: 768px) {
  .admin-hamburger { display: block; }
  .admin-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { padding: 16px 12px; padding-top: 56px; }
}

/* Image upload area */
.img-upload-area {
  border: 2px dashed var(--border); border-radius: 12px;
  padding: 24px; text-align: center; cursor: pointer;
  transition: border-color 0.15s;
}
.img-upload-area:hover { border-color: var(--primary); }

/* ═══════════════════════════════════════════════
   SETTINGS PAGE
   ═══════════════════════════════════════════════ */
#page-settings { padding: 16px 12px 80px; }
.settings-section {
  background: var(--white); border-radius: var(--radius-lg);
  margin-bottom: 12px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.settings-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-secondary);
  padding: 14px 16px 8px;
}
.settings-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--divider);
  transition: background 0.15s;
}
.settings-item:last-child { border-bottom: none; }
.settings-item:active { background: var(--bg); }
.settings-label { display: flex; align-items: center; gap: 12px; flex: 1; }
.settings-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--bg); display: flex; align-items: center;
  justify-content: center; font-size: 18px; flex-shrink: 0;
}
.settings-name { font-size: 14px; font-weight: 600; color: var(--text); }
.settings-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 48px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; background: #ccc;
  border-radius: 28px; cursor: pointer; transition: background 0.3s;
}
.slider::before {
  content: ''; position: absolute; height: 22px; width: 22px;
  left: 3px; bottom: 3px; background: #fff; border-radius: 50%;
  transition: transform 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:disabled + .slider { opacity: 0.5; cursor: not-allowed; }

/* ═══════════════════════════════════════════════
   QRIS PAYMENT PAGE
   ═══════════════════════════════════════════════ */
#page-qris { padding: 16px 12px 80px; max-width: 480px; margin: 0 auto; }
.qris-container { display: flex; flex-direction: column; gap: 16px; }
.qris-header { text-align: center; }
.qris-header h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.qris-subtitle { font-size: 13px; color: var(--text-secondary); }
.qris-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 24px; text-align: center; box-shadow: var(--shadow-sm);
}
.qris-amount-display { margin-bottom: 20px; padding: 16px; background: linear-gradient(135deg, #e8f5e9, #c8e6c9); border-radius: 12px; border: 2px solid #4caf50; }
.qris-amount-label { font-size: 11px; color: #2e7d32; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.qris-amount-value { font-size: 36px; font-weight: 900; color: #1b5e20; margin: 4px 0; letter-spacing: -1px; }
.qris-unique-code { font-size: 11px; color: #388e3c; margin-top: 4px; font-weight: 500; }
.qris-code-wrapper {
  background: #fff; border-radius: var(--radius); padding: 16px;
  display: inline-block; margin: 0 auto; box-shadow: var(--shadow-sm);
}
#qris-code { width: 240px; height: 240px; display: flex; align-items: center; justify-content: center; }
#qris-code img { max-width: 100%; max-height: 100%; }
.qris-timer {
  margin-top: 16px; padding: 10px 16px; background: var(--bg);
  border-radius: var(--radius); font-size: 13px; color: var(--text-secondary);
  display: inline-flex; align-items: center; gap: 6px;
}
.timer-icon { font-size: 16px; }
.qris-status { text-align: center; padding: 16px; }
.status-pending { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.status-spinner {
  width: 32px; height: 32px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.status-text { font-size: 14px; font-weight: 600; }
.status-hint { font-size: 12px; color: var(--text-secondary); }
.status-paid { color: var(--green); }
.status-paid .status-icon { font-size: 48px; margin-bottom: 8px; }
.status-paid .status-text { font-size: 18px; font-weight: 700; }
.qris-instructions {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-sm);
}
.instruction-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.instruction-list { padding-left: 20px; font-size: 13px; color: var(--text-secondary); line-height: 1.8; }
.instruction-list li { margin-bottom: 6px; }
.qris-actions { display: flex; gap: 12px; }
.qris-actions .btn-secondary {
  flex: 1; padding: 14px; background: var(--white); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.qris-actions .btn-primary {
  flex: 1; padding: 14px; background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius); font-size: 14px; font-weight: 600; cursor: pointer;
}

/* Dark mode QRIS */
[data-theme="dark"] .qris-card,
[data-theme="dark"] .qris-instructions { background: var(--white); }
[data-theme="dark"] .qris-code-wrapper { background: #fff; }
