/* ===== TAMAKI VAPE POS — Premium Storefront + Admin UI ===== */

/* --- Variables --- */
:root {
  --primary: #141922;
  --primary-hover: #0c1017;
  --primary-light: #f3f4f6;
  --primary-50: rgba(20, 25, 34, .12);
  --success: #d72933;
  background: linear-gradient(135deg, #b6131d, var(--success));
  --success-light: #fff1f2;
  --danger: #991b1b;
  box-shadow: 0 4px 16px rgba(215,41,51,.35);
  --danger-light: #fee2e2;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --orange: #ea580c;
  --orange-light: #fff7ed;
  --accent: #d72933;
  background: linear-gradient(135deg, #b6131d, var(--success));
  --gray-50: #f8fafc;
  --gray-100: #edf0f4;
  box-shadow: 0 4px 16px rgba(215,41,51,.35);
  --gray-300: #c3ccd8;
  --gray-400: #93a0b1;
  --gray-500: #5f6f83;
  --gray-600: #445367;
  --gray-700: #2f3c50;
  --gray-800: #1d2735;
  background: linear-gradient(135deg, #b6131d, var(--success));
  --radius: 16px;
  --radius-sm: 10px;
  box-shadow: 0 4px 16px rgba(215,41,51,.35);
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
  --shadow: 0 4px 16px rgba(0,0,0,.06), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.1), 0 4px 16px rgba(0,0,0,.06);
  --shadow-primary: 0 6px 20px rgba(215,41,51,.28);
  --transition: 0.2s cubic-bezier(.4,0,.2,1);
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --heading: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  --brand-font: 'Bebas Neue', 'Space Grotesk', sans-serif;
  --jp-font: 'Noto Sans JP', 'Plus Jakarta Sans', sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: #090d14;
  background-image:
    radial-gradient(at 8% 8%, rgba(215,41,51,.34) 0%, transparent 42%),
    radial-gradient(at 92% 0%, rgba(43,61,92,.38) 0%, transparent 45%),
    linear-gradient(180deg, #090d14 0%, #101623 68%, #0a0e16 100%);
  color: var(--gray-900);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: auto auto -200px -140px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(215,41,51,.18), transparent 65%);
  pointer-events: none;
  z-index: -1;
}

/* --- Utility --- */
.hidden { display: none !important; }
.container { max-width: 1400px; margin: 0 auto; padding: 16px 20px; }

/* --- Glass Card --- */
.glass-card {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 18px 34px rgba(3,8,20,.18);
  border: 1px solid rgba(255,255,255,.72);
}

/* --- Loading Overlay --- */
.loading-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
}
.loading-overlay p { color: var(--gray-500); font-size: 14px; font-weight: 500; }
.spinner {
  width: 44px; height: 44px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ====== STOREFRONT HEADER ====== */
.store-header {
  background: linear-gradient(120deg, #080b12, #141a25 56%, #0b1018);
  border-bottom: 1px solid rgba(215,41,51,.42);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 10px 28px rgba(0,0,0,.3);
}

.store-header::after {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #9f1019, #da2d39, #9f1019);
}
.store-header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px;
}
.store-brand {
  display: flex; align-items: center; gap: 12px;
}
.store-logo {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}

.store-logo-main {
  font-family: var(--brand-font);
  font-size: 42px;
  letter-spacing: .08em;
  color: #fff;
  text-shadow: 0 6px 20px rgba(0,0,0,.44);
}

.store-logo-sub {
  display: inline-block;
  width: max-content;
  font-family: var(--jp-font);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(90deg, #ab101a, #de3240);
  border-radius: 4px;
  padding: 3px 8px;
}

.store-brand-copy {
  display: grid;
  gap: 2px;
}

.store-title {
  font-family: var(--heading);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .01em;
}
.store-subtitle { color: #c8d1dd; font-size: 12px; margin-top: 1px; }

.store-actions { display: flex; align-items: center; gap: 10px; }

.cart-toggle-btn {
  position: relative;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.2);
  color: #f8fafc;
  border-radius: 12px; padding: 8px 14px;
  font-size: 18px; cursor: pointer;
  transition: all var(--transition);
}
.cart-toggle-btn:hover {
  border-color: rgba(215,41,51,.9);
  background: rgba(215,41,51,.16);
}
.cart-count-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--accent); color: #fff;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
}

.btn-admin-login {
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.22);
  border-radius: 10px; padding: 8px 16px;
  font-size: 13px; font-weight: 700; color: #f8fafc;
  cursor: pointer; transition: all var(--transition);
  font-family: var(--font);
}
.btn-admin-login:hover {
  border-color: rgba(215,41,51,.95);
  color: #fff;
  background: rgba(215,41,51,.28);
}

/* ====== STORE MAIN ====== */
.store-main {
  max-width: 1200px; margin: 0 auto;
  padding: 20px 20px 80px;
}

#adminView {
  color: var(--gray-900);
}

.store-hero-strip {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px 22px;
  border: 1px solid rgba(131,24,34,.52);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(132,9,26,.28) 0%, transparent 48%),
    linear-gradient(136deg, #1a0206, #250206 58%, #130103);
  color: #e2e8f0;
  box-shadow: 0 18px 34px rgba(1,4,11,.52), inset 0 0 0 1px rgba(255,255,255,.03);
}

.hero-kicker {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #dbeafe;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(147,197,253,.86);
  opacity: .96;
}

.store-hero-strip h2 {
  margin: 0 0 6px;
  color: #fff;
  font-family: var(--heading);
  font-size: clamp(34px, 4.4vw, 48px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.07;
  max-width: 760px;
}

.store-hero-strip p {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #dbe5f3;
  line-height: 1.35;
  max-width: 620px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-badges span {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #eaf2ff;
  background: rgba(10,15,25,.34);
  border: 1px solid rgba(148,163,184,.58);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

.store-search-wrap { margin-bottom: 20px; }
.store-search-input {
  width: 100%; max-width: 480px;
  padding: 12px 20px;
  border-radius: 28px;
  border: 1.5px solid rgba(215,41,51,.25);
  font-size: 15px; background: #fff;
  transition: all var(--transition);
  font-family: var(--font);
}
.store-search-input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--primary-50);
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 16px;
}

.quick-tag {
  border: 1px solid var(--gray-200);
  background: #fff;
  color: var(--gray-600);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
}

.quick-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.quick-tag.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, #b6131d, var(--accent));
  color: #fff;
}

/* ====== STORE PRODUCT GRID ====== */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.store-product-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-100);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.store-product-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(20,25,34,.2);
}
.store-product-card:active { transform: scale(0.97); }
.store-product-card.oos { opacity: .5; pointer-events: none; }

.store-card-body { padding: 16px; }
.store-card-emoji { font-size: 36px; text-align: center; margin-bottom: 8px; display: block; }
.store-card-name {
  font-size: 14px; font-weight: 700; color: var(--gray-800);
  margin-bottom: 4px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.store-card-price {
  font-size: 18px; font-weight: 800; color: var(--accent);
  margin-bottom: 6px;
}
.store-card-member {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(15, 118, 110, 0.1);
  border: 1px solid rgba(15, 118, 110, 0.25);
  border-radius: 999px;
  padding: 4px 8px;
  margin-bottom: 8px;
  display: inline-flex;
}
.store-card-member.special {
  color: #9a3412;
  background: #fff7ed;
  border-color: #fdba74;
}
.store-card-stock {
  font-size: 12px; color: var(--gray-400); font-weight: 500;
}
.store-card-stock.low { color: var(--warning); }
.store-card-stock.empty { color: var(--danger); font-weight: 700; }

.store-card-badge {
  position: absolute; top: 8px; right: 8px;
  background: var(--accent); color: #fff;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  box-shadow: 0 2px 8px rgba(215,41,51,.45);
  animation: badgePop .25s ease;
  z-index: 2;
}
@keyframes badgePop { from { transform: scale(0); } to { transform: scale(1); } }

.store-empty {
  text-align: center; padding: 60px 20px; color: var(--gray-400);
}
.store-empty span { font-size: 48px; display: block; margin-bottom: 12px; opacity: .4; }
.store-empty p { font-size: 16px; font-weight: 500; }

/* ====== CART SIDEBAR ====== */
.cart-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,23,42,.3);
  backdrop-filter: blur(4px);
  animation: fadeIn .2s ease;
}

.cart-sidebar {
  position: fixed; top: 0; right: -400px; bottom: 0;
  width: 380px; max-width: 90vw;
  background: #fff;
  box-shadow: -8px 0 40px rgba(0,0,0,.12);
  z-index: 210;
  display: flex; flex-direction: column;
  transition: right .3s cubic-bezier(.4,0,.2,1);
}
.cart-sidebar.open { right: 0; }

.cart-sidebar-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
}
.cart-sidebar-header h2 { font-size: 18px; font-weight: 700; }

.btn-close-sidebar {
  width: 36px; height: 36px;
  border-radius: 10px; border: 1.5px solid var(--gray-200);
  background: var(--gray-50); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.btn-close-sidebar:hover { background: var(--danger-light); color: var(--danger); border-color: var(--danger); }

.cart-sidebar-body {
  flex: 1; overflow-y: auto;
  padding: 16px 24px;
}
.cart-sidebar-body::-webkit-scrollbar { width: 4px; }
.cart-sidebar-body::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 4px; }

.cart-empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; color: var(--gray-600); gap: 4px;
  text-align: center;
}
.cart-empty-state > span { font-size: 48px; opacity: .3; }
.cart-empty-state p { font-size: 14px; font-weight: 500; }
.cart-empty-state small { font-size: 12px; }

.store-cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-50);
  animation: slideIn .2s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }

.store-cart-item-info { flex: 1; min-width: 0; }
.store-cart-item-name {
  font-size: 14px; font-weight: 600; color: var(--gray-800);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.store-cart-item-price { font-size: 12px; color: var(--gray-400); }

.store-cart-item-qty {
  display: flex; align-items: center; gap: 0;
  border: 1.5px solid var(--gray-200); border-radius: 8px; overflow: hidden;
}
.store-cart-item-qty button {
  width: 32px; height: 32px; padding: 0;
  font-size: 16px; font-weight: 700;
  background: var(--gray-50); color: var(--gray-600);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.store-cart-item-qty button:hover { background: var(--gray-200); }
.store-cart-item-qty .qty-display {
  width: 36px; text-align: center; font-size: 14px; font-weight: 700;
  border-left: 1px solid var(--gray-200);
  border-right: 1px solid var(--gray-200);
  padding: 4px 0; background: #fff;
}

.store-cart-item-subtotal {
  font-size: 14px; font-weight: 700; color: var(--gray-800);
  min-width: 70px; text-align: right;
}
.store-cart-item-remove {
  background: none; border: none; color: var(--gray-300); cursor: pointer;
  font-size: 16px; padding: 4px; border-radius: 6px;
  transition: all var(--transition);
}
.store-cart-item-remove:hover { color: var(--danger); background: var(--danger-light); }

.cart-sidebar-footer {
  padding: 16px 24px 24px;
  border-top: 2px solid var(--gray-100);
  background: #fff;
}
.cart-total-line {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.cart-total-line span { font-size: 15px; font-weight: 600; color: var(--gray-500); }
.cart-total-line strong { font-size: 22px; font-weight: 800; color: var(--accent); }

.btn-checkout-main {
  width: 100%; padding: 14px 24px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #b6131d, var(--success));
  color: #fff; font-size: 16px; font-weight: 700; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 16px rgba(215,41,51,.35);
  transition: all var(--transition);
  font-family: var(--font);
}
.btn-checkout-main:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(215,41,51,.45); }
.btn-checkout-main:active:not(:disabled) { transform: scale(0.98); }
.btn-checkout-main:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ====== CHECKOUT MODAL (QRIS) ====== */
.modal-checkout {
  max-width: 420px; width: 92%; padding: 0;
  border-radius: 20px; overflow: hidden;
  border-top: 4px solid var(--success);
}
.checkout-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
}
.checkout-top h3 { font-size: 18px; font-weight: 700; margin: 0; }
.modal-close-btn {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--gray-200); background: var(--gray-50);
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close-btn:hover { background: var(--danger-light); color: var(--danger); }

.checkout-body { padding: 24px; }

.checkout-amount {
  text-align: center; margin-bottom: 20px;
  padding: 16px; background: var(--success-light); border-radius: var(--radius-sm);
}
.checkout-amount span { display: block; font-size: 13px; color: var(--gray-500); margin-bottom: 4px; }
.checkout-amount strong { font-size: 28px; font-weight: 800; color: var(--success); }
.checkout-pricing-hint {
  margin-top: 8px;
  display: block;
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.45;
}
.checkout-pricing-hint.is-discount {
  color: var(--success);
  font-weight: 700;
}

.qris-card {
  text-align: center;
  padding: 20px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 16px;
  background: #fff;
}
.qris-image {
  max-width: 280px; width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border: 1px solid var(--gray-100);
}
.qris-scan-hint {
  font-size: 13px; color: var(--primary); font-weight: 600;
  margin: 0 0 10px; padding: 0;
}
.qris-merchant-info {
  display: flex; flex-direction: column; gap: 2px;
}
.qris-merchant-info strong { font-size: 14px; color: var(--gray-800); }
.qris-merchant-info span { font-size: 12px; color: var(--gray-500); }
.qris-merchant-info small { font-size: 11px; color: var(--gray-400); }

.checkout-name-field { display: grid; gap: 6px; }
.checkout-member-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--gray-600);
}
.checkout-member-toggle input {
  width: auto;
  margin: 0;
}

.checkout-actions {
  display: flex; gap: 10px; padding: 16px 24px 24px;
}
.btn-confirm-pay {
  flex: 1; padding: 14px 20px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #b6131d, var(--success));
  color: #fff; font-size: 16px; font-weight: 700;
  border: none; cursor: pointer;
  box-shadow: 0 4px 16px rgba(215,41,51,.35);
  transition: all var(--transition);
  font-family: var(--font);
}
.btn-confirm-pay:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(215,41,51,.45); }
.btn-cancel-pay {
  padding: 14px 20px; border-radius: var(--radius-sm);
  background: var(--gray-100); color: var(--gray-600);
  font-size: 14px; font-weight: 600;
  border: none; cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.btn-cancel-pay:hover { background: var(--gray-200); }

/* ====== LOGIN MODAL ====== */
#loginModal {
  padding: 18px;
  background: rgba(7, 9, 15, .72);
  backdrop-filter: blur(10px);
}

.modal-login {
  max-width: 440px;
  width: min(94vw, 440px);
  text-align: left;
  padding: 30px 28px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 22px 44px rgba(7,10,17,.46);
  border: 1px solid rgba(215,41,51,.25);
  border-top: 4px solid var(--accent);
}

.login-brand {
  display: inline-grid;
  margin-bottom: 14px;
  color: #0f172a;
  font-family: var(--brand-font);
  font-size: 42px;
  letter-spacing: .08em;
  line-height: .9;
  text-transform: uppercase;
}

.login-brand::after {
  content: 'VAPE STUDIO - ベイプスタジオ';
  width: max-content;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: 4px;
  color: #fff;
  background: linear-gradient(90deg, #ad111b, #dc2f3d);
  font-family: var(--jp-font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
}

.modal-login h2 {
  font-family: var(--heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 6px;
  color: #111827;
}

.login-subtitle {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--gray-700);
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-field {
  margin: 0;
  text-align: left;
}

.login-field .label-text {
  text-transform: none;
  letter-spacing: .01em;
  font-size: 12px;
  color: var(--gray-700);
}

.login-form input {
  background: #fff;
  border-color: var(--gray-300);
  padding: 12px 14px;
}

.login-submit {
  margin-top: 4px;
  min-height: 46px;
  font-size: 15px;
  font-weight: 700;
}

.login-error {
  margin-top: 10px;
  min-height: 20px;
  text-align: left;
}

.login-back-btn {
  margin-top: 6px;
  min-height: 44px;
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  background: #fff;
  color: var(--gray-600);
  font-weight: 600;
}

.login-back-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--gray-700);
}

.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
.icon-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none !important; border: none !important; cursor: pointer;
  padding: 4px !important; font-size: 18px; color: var(--gray-400);
  box-shadow: none !important;
}
.icon-btn:hover { color: var(--gray-600); background: none !important; transform: translateY(-50%); box-shadow: none !important; }

/* --- Labels & Inputs --- */
label { display: grid; gap: 6px; margin-bottom: 14px; }
.label-text { font-size: 12px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; }

input, select {
  padding: 10px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--gray-200);
  font-size: 14px; background: var(--gray-50); transition: all var(--transition);
  font-family: var(--font); width: 100%; color: var(--gray-900);
}
input:focus, select:focus {
  outline: none; border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 3px var(--primary-50);
}
input::placeholder { color: var(--gray-400); }
input[readonly] { background: var(--gray-100); color: var(--gray-500); cursor: default; }
input[readonly]:focus { border-color: var(--gray-200); box-shadow: none; }

.input-flat {
  background: rgba(255,255,255,.6); border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-xs); padding: 8px 12px; font-size: 13px;
}
.inline-label { display: flex; align-items: center; gap: 8px; margin: 0; }
.inline-label span { font-size: 16px; flex-shrink: 0; }
.inline-check {
  gap: 6px;
  padding: 6px 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,.6);
}
.inline-check input {
  width: auto;
  margin: 0;
}
.inline-label .inline-check-text {
  font-size: 12px;
  color: var(--gray-600);
}
.kasir-member-btn { white-space: nowrap; }

.search-input { max-width: 220px; padding: 8px 14px; font-size: 13px; border-radius: 20px; }
.hint-text { color: var(--gray-600); font-size: 12px; margin: -4px 0 16px; }

/* --- Buttons --- */
button {
  padding: 10px 20px; border-radius: var(--radius-sm); border: none;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all var(--transition); display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font);
}
button:active { transform: scale(0.97); }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, #b6131d, var(--accent));
  color: #fff;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #951019, #c81f2a);
  box-shadow: var(--shadow-primary);
}
.btn-secondary { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: var(--success-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); }
.btn-ghost { background: transparent; color: var(--gray-500); padding: 6px 12px; }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-600); }
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-icon { background: rgba(255,255,255,.7); color: var(--gray-600); padding: 8px 12px; font-size: 16px; border-radius: 10px; }
.btn-icon:hover { background: var(--gray-100); }
.btn-logout { background: rgba(239,68,68,.08); color: var(--danger); border-radius: 10px; font-size: 13px; }
.btn-logout:hover { background: var(--danger); color: #fff; }

/* --- Toolbar --- */
.toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; padding: 12px 20px;
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.8); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.5);
}
.toolbar-left { display: flex; align-items: center; gap: 12px; }
.toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.admin-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), #0e7490);
  color: #fff; padding: 6px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(15,118,110,.25);
}
.clock-display {
  font-size: 12px; color: var(--gray-600); font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.btn-tab {
  background: rgba(255,255,255,.6); color: var(--gray-600); border: 1.5px solid var(--gray-200);
  border-radius: 20px; padding: 7px 18px; font-size: 13px; font-weight: 600;
}
.btn-tab:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.btn-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: var(--shadow-primary); }
.btn-tab.active:hover { background: var(--primary-hover); }

/* --- Stats Row --- */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-xs); border: 1px solid var(--gray-100);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon { font-size: 32px; flex-shrink: 0; width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.stat-blue .stat-icon { background: var(--primary-light); }
.stat-orange .stat-icon { background: var(--orange-light); }
.stat-red .stat-icon { background: var(--danger-light); }
.stat-green .stat-icon { background: var(--success-light); }
.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--gray-900); line-height: 1.2; }
.stat-label { font-size: 11px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: .5px; }
#yearSummaryRow.stats-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* ====== KASIR LAYOUT ====== */
.kasir-layout { display: grid; grid-template-columns: 1fr 380px; gap: 16px; }
.kasir-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.kasir-header h2 { margin: 0; font-size: 20px; color: var(--gray-900); }
.kasir-info { display: flex; gap: 12px; flex-wrap: wrap; }

.picker-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.picker-header h3 { margin: 0; font-size: 15px; }

.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;
  max-height: 420px; overflow-y: auto; padding-right: 4px;
}
.product-grid::-webkit-scrollbar { width: 4px; }
.product-grid::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

.product-card {
  background: var(--gray-50); border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  padding: 14px; cursor: pointer; transition: all var(--transition); text-align: center;
  user-select: none; position: relative; overflow: hidden;
}
.product-card:hover { border-color: var(--primary); background: var(--primary-light); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.product-card:active:not(.out-of-stock) { transform: scale(0.93); transition: transform .1s ease; }
.product-card.out-of-stock { opacity: .45; pointer-events: none; }
.product-card .p-name { font-size: 13px; font-weight: 600; color: var(--gray-800); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-card .p-price { font-size: 14px; font-weight: 700; color: var(--primary); }
.product-card .p-member-price {
  font-size: 10px;
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 999px;
  padding: 3px 6px;
  margin-top: 4px;
  display: inline-flex;
  font-weight: 700;
}
.product-card .p-stock { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.product-card .p-stock.low { color: var(--warning); }
.product-card .p-stock.empty { color: var(--danger); font-weight: 600; }
.p-cart-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--primary); color: #fff;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  box-shadow: 0 2px 6px rgba(15,118,110,.4);
  animation: badgePop .25s ease;
  z-index: 2;
}

/* --- Admin Cart Panel --- */
.cart-panel { display: flex; flex-direction: column; height: calc(100vh - 200px); min-height: 500px; position: sticky; top: 80px; }
.cart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cart-header h3 { margin: 0; font-size: 16px; }

.cart-items { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.cart-items::-webkit-scrollbar { width: 4px; }
.cart-items::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 4px; }

.cart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--gray-600); gap: 4px; }
.cart-empty-icon { font-size: 48px; opacity: .3; }
.cart-empty p { font-size: 14px; font-weight: 500; }
.cart-empty small { font-size: 12px; }

.cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--gray-100);
  animation: slideIn .2s ease;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 13px; font-weight: 600; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { font-size: 12px; color: var(--gray-400); }
.cart-item-discount { font-size: 11px; color: var(--success); font-weight: 700; margin-top: 2px; }
.cart-item-qty {
  display: flex; align-items: center; gap: 0;
  border: 1.5px solid var(--gray-200); border-radius: 8px; overflow: hidden;
}
.pricing-warning {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 2px 0 14px;
}
.cart-item-qty button {
  width: 30px; height: 30px; padding: 0; font-size: 14px; font-weight: 700;
  background: var(--gray-50); color: var(--gray-600); border-radius: 0; border: none;
  display: flex; align-items: center; justify-content: center;
}
.cart-item-qty button:hover { background: var(--gray-200); }
.cart-item-qty .qty-val {
  width: 32px; text-align: center; font-size: 13px; font-weight: 700;
  color: var(--gray-800); border-left: 1px solid var(--gray-200); border-right: 1px solid var(--gray-200);
  padding: 4px 0; background: #fff;
}
.cart-item-subtotal { font-size: 13px; font-weight: 700; color: var(--gray-800); min-width: 70px; text-align: right; }
.cart-item-remove { background: none; border: none; color: var(--gray-300); cursor: pointer; font-size: 16px; padding: 4px; border-radius: 6px; }
.cart-item-remove:hover { color: var(--danger); background: var(--danger-light); }

.cart-footer { border-top: 2px solid var(--gray-100); padding-top: 16px; margin-top: 12px; }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cart-total span { font-size: 15px; font-weight: 600; color: var(--gray-500); }
.cart-total strong { font-size: 24px; font-weight: 800; color: var(--primary); }

.btn-checkout {
  width: 100%; padding: 14px 24px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #b6131d, var(--success));
  color: #fff; font-size: 16px; font-weight: 700; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 16px rgba(215,41,51,.35);
  transition: all var(--transition);
}
.btn-checkout:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(215,41,51,.45); }
.btn-checkout:active { transform: scale(0.98); }
.checkout-icon { font-size: 20px; }

/* --- Product Form --- */
.product-form { margin-top: 4px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.form-field.flex-2 { flex: 2; min-width: 200px; }
.form-field.flex-1 { flex: 1; min-width: 120px; }
.form-field.flex-half { flex: 0.7; min-width: 80px; }
.form-actions { justify-content: flex-end; display: flex; align-items: flex-end; }

/* --- Section Headers --- */
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; gap: 12px; flex-wrap: wrap;
}
h2 { margin: 0 0 16px; font-size: 20px; font-weight: 700; color: var(--gray-900); }
h3 { font-size: 15px; font-weight: 700; color: var(--gray-800); margin: 0 0 12px; display: flex; align-items: center; gap: 6px; }

/* --- Tables --- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); border: 1px solid var(--gray-200); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead { background: var(--gray-50); }
th {
  padding: 12px 14px; text-align: left; font-weight: 600; font-size: 11px;
  color: var(--gray-600); text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 2px solid var(--gray-100);
}
td { padding: 11px 14px; border-bottom: 1px solid var(--gray-50); vertical-align: middle; color: var(--gray-800); }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--primary-50); }
tbody tr:last-child td { border-bottom: none; }

/* Profit column highlighting */
td.profit-cell { color: var(--success); font-weight: 700; }
td.profit-cell.negative { color: var(--danger); }

/* --- Badges --- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-primary { background: var(--primary-light); color: var(--primary); }

/* ====== ANALISIS / QUARTER GRID ====== */
.analisis-header-card { margin-bottom: 16px; }
.analisis-top-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
}
.analisis-top-row h2 { margin: 0; }
.analisis-controls { display: flex; gap: 8px; align-items: center; }

.quarter-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 16px;
}

.quarter-card {
  background: #fff; border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-xs); border: 1px solid var(--gray-100);
  transition: transform var(--transition), box-shadow var(--transition);
}
.quarter-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.quarter-card-title {
  font-size: 14px; font-weight: 700; color: var(--gray-600);
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.quarter-card-title .q-label {
  background: var(--primary-light); color: var(--primary);
  padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 700;
}

.quarter-stat {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; font-size: 13px;
}
.quarter-stat-label { color: var(--gray-500); }
.quarter-stat-value { font-weight: 700; color: var(--gray-800); }
.quarter-stat-value.profit { color: var(--success); }
.quarter-stat-value.revenue { color: var(--primary); }

.quarter-divider { border: none; border-top: 1px solid var(--gray-100); margin: 8px 0; }

.quarter-profit-big {
  text-align: center; padding: 8px 0;
}
.quarter-profit-big span { display: block; font-size: 11px; color: var(--gray-400); text-transform: uppercase; letter-spacing: .5px; }
.quarter-profit-big strong { font-size: 20px; font-weight: 800; color: var(--success); }

/* Bar chart for quarter comparison */
.quarter-bar-wrap { margin-top: 10px; }
.quarter-bar {
  height: 8px; border-radius: 4px; background: var(--gray-100);
  overflow: hidden;
}
.quarter-bar-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

.daily-metrics-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.daily-metric-item {
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 12px;
  display: grid;
  gap: 4px;
}

.daily-metric-item span {
  font-size: 11px;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
}

.daily-metric-item strong {
  color: var(--gray-900);
  font-size: 20px;
  font-family: var(--heading);
}

/* ====== MODALS ====== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15,23,42,.4); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .2s ease;
}
.modal-backdrop.hidden { display: none !important; }

.modal {
  background: #fff; border-radius: 20px; padding: 36px;
  max-width: 420px; width: 90%; text-align: center;
  box-shadow: var(--shadow-lg); animation: modalIn .3s ease;
  color: var(--gray-900);
}

/* Prevent Bootstrap .modal defaults from hiding custom modal cards */
.modal-backdrop > .modal {
  display: block !important;
  position: relative;
  inset: auto;
  margin: 0;
  height: auto;
  overflow: visible;
}
@keyframes modalIn { from { transform: scale(.95) translateY(10px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }

.modal-icon { font-size: 52px; margin-bottom: 8px; }
.modal h3 { margin-bottom: 8px; font-size: 18px; font-weight: 700; }
.modal p { color: var(--gray-500); margin-bottom: 20px; font-size: 14px; line-height: 1.5; }
.modal-success { border-top: 4px solid var(--success); }
.modal-error { border-top: 4px solid var(--danger); }

/* --- Receipt Modal --- */
.modal-receipt { max-width: 360px; padding: 0; border-top: 4px solid var(--primary); }
.receipt-content { padding: 28px 24px; font-size: 13px; }
.receipt-content .receipt-header { text-align: center; margin-bottom: 16px; }
.receipt-content .receipt-header h3 { font-size: 16px; margin-bottom: 2px; }
.receipt-content .receipt-header p { font-size: 11px; color: var(--gray-600); }
.receipt-content .receipt-divider { border: none; border-top: 1.5px dashed var(--gray-200); margin: 12px 0; }
.receipt-content .receipt-line { display: flex; justify-content: space-between; padding: 3px 0; font-size: 12px; }
.receipt-content .receipt-line.total { font-size: 16px; font-weight: 800; color: var(--primary); border-top: 2px solid var(--gray-200); padding-top: 10px; margin-top: 8px; }
.receipt-content .receipt-item { padding: 4px 0; }
.receipt-content .receipt-item-name { font-weight: 700; font-size: 12px; color: var(--gray-800); }
.receipt-content .receipt-item-detail { font-size: 11px; color: var(--gray-600); display: flex; justify-content: space-between; }

.receipt-actions {
  display: flex; gap: 8px; padding: 16px 24px 24px;
  justify-content: stretch;
}
.btn-print, .btn-share, .btn-close-receipt {
  flex: 1; padding: 10px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 600; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  transition: all var(--transition);
}
.btn-print {
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: #fff; box-shadow: 0 2px 8px rgba(99,102,241,.3);
}
.btn-print:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99,102,241,.4); }
.btn-share {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff; box-shadow: 0 2px 8px rgba(37,211,102,.3);
}
.btn-share:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,211,102,.4); }
.btn-close-receipt { background: var(--gray-100); color: var(--gray-600); }
.btn-close-receipt:hover { background: var(--gray-200); }

/* --- Toast --- */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 2000;
  display: flex; flex-direction: column-reverse; gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 12px 20px; border-radius: 12px;
  background: rgba(30,41,59,.92); backdrop-filter: blur(12px);
  color: #fff; font-size: 13px; font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  animation: toastIn .3s ease;
  display: flex; align-items: center; gap: 8px;
  max-width: 340px;
}
.toast.toast-success { border-left: 3px solid var(--success); }
.toast.toast-error { border-left: 3px solid var(--danger); }
.toast.toast-info { border-left: 3px solid var(--primary); }
.toast-icon { font-size: 18px; flex-shrink: 0; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100px); } }

/* --- Error, Animations --- */
.error { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 8px; text-align: center; font-weight: 500; }
.tab-panel.hidden { display: none !important; }
.tab-panel { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Keyboard hints --- */
.shortcut-hint {
  display: block; margin-top: 8px; font-size: 11px; color: var(--gray-300); letter-spacing: .3px;
}
kbd, .kbd-sm {
  display: inline-block; padding: 2px 5px; border-radius: 4px;
  font-size: 10px; font-weight: 600; font-family: inherit;
  background: var(--gray-100); color: var(--gray-500); border: 1px solid var(--gray-200);
}
.kbd-sm { font-size: 9px; padding: 1px 4px; margin-left: 4px; opacity: .7; vertical-align: middle; }

.input-readonly {
  background: var(--gray-50) !important; color: var(--gray-500) !important;
  border-color: var(--gray-200) !important; cursor: not-allowed;
}

/* --- Export Buttons --- */
.export-btns { display: flex; gap: 6px; }
.btn-export {
  padding: 6px 14px; border: 1.5px solid var(--gray-200); border-radius: 8px;
  background: #fff; color: var(--gray-600); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.btn-export:hover { border-color: var(--primary); color: var(--primary); background: rgba(37,99,235,.05); }

/* --- Checkout Notice --- */
.checkout-notice {
  display: flex; gap: 8px; align-items: flex-start;
  background: #fef3c7; border: 1px solid #fbbf24; border-radius: 8px;
  padding: 12px 14px; margin-top: 12px; font-size: 13px; color: #92400e; line-height: 1.4;
}
.order-proof-notice {
  background: #fef3c7; border: 1px solid #fbbf24; border-radius: 8px;
  padding: 14px; margin: 12px 0; text-align: left; font-size: 13px; color: #92400e; line-height: 1.5;
}
.order-proof-notice strong { display: block; margin-bottom: 4px; font-size: 14px; }
.order-proof-notice p { margin: 0; }

/* --- Pending Orders --- */
.pending-orders-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.pending-order-card {
  background: #fffbeb; border: 1.5px solid #fbbf24; border-radius: var(--radius-sm);
  padding: 14px; transition: all var(--transition);
}
.pending-order-header {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #fde68a;
}
.pending-order-time { font-size: 12px; color: var(--gray-400); }
.pending-order-items { margin-bottom: 10px; }
.pending-item { font-size: 13px; color: var(--gray-600); padding: 2px 0; }
.pending-order-footer {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}
.pending-order-total { font-size: 15px; color: var(--gray-800); }
.pending-order-actions { display: flex; gap: 8px; }
.btn-confirm-order {
  padding: 6px 16px; border: none; border-radius: 6px;
  background: var(--success); color: #fff; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.btn-confirm-order:hover { background: #15803d; }
.btn-reject-order {
  padding: 6px 16px; border: 1.5px solid var(--danger); border-radius: 6px;
  background: #fff; color: var(--danger); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.btn-reject-order:hover { background: var(--danger); color: #fff; }

/* --- Footer --- */
.footer { text-align: center; padding: 24px 0 16px; color: var(--gray-400); font-size: 12px; }
.footer { color: #b8c2d0; }

/* --- Pagination Controls --- */
.pagination-controls {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0 0; margin-top: 12px; border-top: 1px solid var(--gray-100);
  gap: 12px; flex-wrap: wrap;
}
.pagination-info { font-size: 13px; color: var(--gray-500); font-weight: 500; }
.pagination-btns { display: flex; gap: 8px; }

/* --- Loading Skeleton --- */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-xs);
}
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-card {
  height: 120px; border-radius: var(--radius);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ====== RESPONSIVE ====== */

/* --- Tablet landscape & small desktops --- */
@media (max-width: 1024px) {
  .quarter-grid { grid-template-columns: repeat(2, 1fr); }
  .kasir-layout { grid-template-columns: 1fr 340px; }
}

/* --- Tablet portrait --- */
@media (max-width: 900px) {
  .store-hero-strip { padding: 16px 16px; }

  .kasir-layout { grid-template-columns: 1fr; }
  .cart-panel { position: static; height: auto; min-height: auto; }
  .product-grid { max-height: 320px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  #yearSummaryRow.stats-row { grid-template-columns: repeat(2, 1fr); }
  .store-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .analisis-top-row { flex-direction: column; align-items: stretch; }
  .analisis-controls { flex-wrap: wrap; }
}

/* --- Mobile landscape / large phones --- */
@media (max-width: 768px) {
  .container { padding: 10px; }

  /* Store header */
  .store-header-inner { padding: 10px 14px; }
  .store-title { font-size: 16px; }
  .store-subtitle { font-size: 10px; }
  .store-logo-main { font-size: 32px; }
  .store-logo-sub { font-size: 8px; letter-spacing: .12em; }
  .store-brand { gap: 8px; }
  .btn-admin-login { padding: 6px 12px; font-size: 12px; }
  .cart-toggle-btn { padding: 6px 10px; font-size: 16px; }

  /* Store grid */
  .store-main { padding: 14px 10px 90px; }
  .store-hero-strip {
    padding: 16px 14px;
    border-radius: 10px;
    gap: 12px;
  }
  .hero-kicker {
    font-size: 10px;
  }
  .store-hero-strip h2 {
    font-size: clamp(28px, 8.2vw, 34px);
    line-height: 1.08;
  }
  .store-hero-strip p {
    font-size: 14px;
  }
  .hero-badges { gap: 8px; }
  .hero-badges span {
    font-size: 11px;
    padding: 6px 10px;
  }
  .store-search-input { font-size: 14px; padding: 10px 16px; }
  .store-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .store-card-body { padding: 12px; }
  .store-card-emoji { font-size: 28px; margin-bottom: 6px; }
  .store-card-name { font-size: 13px; }
  .store-card-price { font-size: 16px; }

  /* Cart sidebar full width on mobile */
  .cart-sidebar { width: 100%; max-width: 100%; right: -100%; }

  /* Admin toolbar */
  .toolbar {
    flex-direction: column; align-items: stretch;
    padding: 10px 12px; gap: 8px;
    position: sticky; top: 0;
  }
  .toolbar-left {
    justify-content: space-between; width: 100%;
  }
  .toolbar-right {
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto auto auto;
    gap: 6px; width: 100%;
  }
  .btn-tab { flex: 1; justify-content: center; font-size: 12px; padding: 7px 8px; min-width: 0; }
  .btn-icon { padding: 7px 10px; font-size: 15px; justify-content: center; }
  .btn-logout { font-size: 12px; padding: 7px 10px; justify-content: center; }
  .admin-badge { font-size: 12px; padding: 5px 12px; }
  .clock-display { font-size: 11px; }

  /* Kasir */
  .kasir-header { padding: 14px 16px; }
  .kasir-header h2 { font-size: 17px; }
  .kasir-info { flex-direction: column; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); max-height: 280px; }
  .product-card { padding: 10px; }
  .product-card .p-name { font-size: 12px; }
  .product-card .p-price { font-size: 13px; }

  /* Forms */
  .form-row { flex-direction: column; }
  .form-field.flex-2, .form-field.flex-1, .form-field.flex-half { flex: auto; min-width: 100%; }

  /* Tables */
  th, td { padding: 8px 10px; font-size: 12px; }
  .search-input { max-width: 100%; }

  /* Stats */
  .stats-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  #yearSummaryRow.stats-row { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 14px; gap: 10px; }
  .stat-value { font-size: 20px; }
  .stat-icon { width: 40px; height: 40px; font-size: 24px; border-radius: 10px; }

  /* Section headers */
  .section-header { flex-direction: column; align-items: stretch; gap: 8px; }
  .export-btns { width: 100%; }
  .btn-export { flex: 1; text-align: center; justify-content: center; }

  /* Quarter analysis */
  .quarter-grid { grid-template-columns: 1fr; }
  .quarter-profit-big strong { font-size: 18px; }
  .daily-metrics-grid {
    grid-template-columns: 1fr;
  }

  /* Pending orders */
  .pending-order-footer { flex-direction: column; align-items: stretch; }
  .pending-order-actions { justify-content: stretch; }
  .btn-confirm-order, .btn-reject-order { flex: 1; text-align: center; justify-content: center; padding: 8px 12px; }

  /* Glass card */
  .glass-card { padding: 14px 14px; border-radius: 12px; }

  /* Modals */
  .modal { padding: 28px 20px; width: 94%; border-radius: 16px; }
  .modal-checkout { width: 96%; border-radius: 16px; }
  .checkout-body { padding: 16px; }
  .checkout-actions { padding: 12px 16px 20px; }
  .checkout-amount strong { font-size: 24px; }
  .qris-card { padding: 14px; }

  /* Receipt */
  .modal-receipt { max-width: 100%; width: 96%; }
  .receipt-actions { flex-wrap: wrap; }

  /* Toast centered on mobile */
  .toast-container { left: 50%; right: auto; transform: translateX(-50%); bottom: 20px; }
  .toast { max-width: 300px; }
}

/* --- Small phones --- */
@media (max-width: 480px) {
  .store-header-inner { padding: 8px 10px; }
  .store-title { font-size: 14px; }
  .store-subtitle { display: none; }
  .store-logo-main { font-size: 27px; }
  .store-logo-sub { font-size: 7px; letter-spacing: .1em; }
  .store-actions { gap: 6px; }
  .btn-admin-login { padding: 5px 10px; font-size: 11px; }

  .store-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .store-card-body { padding: 10px; }
  .store-card-emoji { font-size: 24px; margin-bottom: 4px; }
  .store-card-name { font-size: 12px; }
  .store-card-price { font-size: 15px; }
  .store-card-stock { font-size: 11px; }

  .store-main { padding: 10px 8px 80px; }
  .store-hero-strip h2 { font-size: 25px; }
  .store-hero-strip p { font-size: 13px; }
  .store-search-input { font-size: 13px; padding: 10px 14px; border-radius: 20px; }

  /* Toolbar compact */
  .toolbar { padding: 8px 10px; gap: 6px; }
  .toolbar-right {
    display: flex; flex-wrap: wrap; gap: 4px;
    justify-content: center;
  }
  .btn-tab { font-size: 11px; padding: 6px 10px; border-radius: 16px; }
  .btn-icon { padding: 6px 8px; font-size: 14px; border-radius: 8px; }
  .btn-logout { font-size: 11px; padding: 6px 8px; border-radius: 8px; }
  .admin-badge { font-size: 11px; padding: 4px 10px; }

  /* Stats single column on small phones */
  .stats-row { grid-template-columns: 1fr; }
  #yearSummaryRow.stats-row { grid-template-columns: 1fr; }
  .stat-card { padding: 12px; }
  .stat-value { font-size: 18px; }

  /* Tables smaller */
  table { font-size: 11px; }
  th, td { padding: 6px 8px; }
  th { font-size: 10px; }

  /* Cart */
  .cart-total strong { font-size: 20px; }
  .cart-sidebar-body { padding: 12px 16px; }
  .cart-sidebar-footer { padding: 12px 16px 20px; }
  .cart-sidebar-header { padding: 14px 16px; }

  /* Checkout modal */
  .modal-checkout { width: 100%; max-width: 100%; border-radius: 16px 16px 0 0; }
  .checkout-top { padding: 16px; }
  .checkout-top h3 { font-size: 16px; }
  .checkout-body { padding: 14px; }
  .checkout-amount { padding: 12px; }
  .checkout-amount strong { font-size: 22px; }
  .checkout-actions { padding: 10px 14px 16px; gap: 8px; }
  .btn-confirm-pay { font-size: 14px; padding: 12px 16px; }
  .btn-cancel-pay { font-size: 13px; padding: 12px 16px; }

  .qris-image { max-width: 220px; }
  .qris-merchant-info strong { font-size: 13px; }

  /* Pending orders */
  .pending-order-card { padding: 12px; }
  .pending-order-header { font-size: 13px; }
  .pending-item { font-size: 12px; }
  .pending-order-total { font-size: 14px; }

  /* Receipt */
  .receipt-actions { flex-direction: column; }
  .btn-print, .btn-share, .btn-close-receipt { padding: 10px; }

  /* Toast */
  .toast { max-width: 260px; font-size: 12px; padding: 10px 14px; }

  /* Glass card */
  .glass-card { padding: 12px; margin-bottom: 10px; }

  /* Container */
  .container { padding: 8px; }

  /* Analisis */
  .analisis-controls { flex-wrap: wrap; gap: 6px; }
  .analisis-controls select { min-width: 80px; }
  .analisis-controls .btn-primary { font-size: 12px; }
  .quarter-card { padding: 14px; }
  .quarter-profit-big strong { font-size: 16px; }
  .quarter-stat { font-size: 12px; }

  /* Login */
  #loginModal { padding: 14px; }
  .modal-login { padding: 24px 18px; border-radius: 18px; }
  .modal-login h2 { font-size: 20px; margin-bottom: 4px; }
  .login-subtitle { font-size: 12px; margin-bottom: 14px; }

  /* Footer */
  .footer { padding: 16px 10px 12px; font-size: 11px; }
}

/* --- Very small phones (320px) --- */
@media (max-width: 360px) {
  .store-title { font-size: 14px; }
  .store-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .store-card-price { font-size: 14px; }
  .btn-tab { font-size: 10px; padding: 5px 8px; }
  .stat-value { font-size: 16px; }
  .stat-label { font-size: 10px; }
  .checkout-amount strong { font-size: 20px; }
  .qris-image { max-width: 180px; }
}

/* --- Safe area for notched phones --- */
@supports (padding: max(0px)) {
  .store-header-inner {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  .cart-sidebar-footer {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  .checkout-actions {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  .footer {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

@media print {
  body * { visibility: hidden !important; }
  .modal-receipt, .modal-receipt * { visibility: visible !important; }
  .modal-receipt {
    position: fixed; inset: 0; width: 100%; max-width: 100%;
    box-shadow: none; border-radius: 0; padding: 0;
  }
  .receipt-actions { display: none !important; }
  .modal-backdrop { background: #fff !important; backdrop-filter: none !important; }
}
