:root {
  --ink: #0e0c0b;
  --ink-2: #1b1715;
  --ink-3: #2a2522;
  --orange: #ff6a00;
  --orange-2: #dc5100;
  --orange-soft: #fff0e5;
  --blue: #ffb478;
  --paper: #f6f4f3;
  --card: #ffffff;
  --line: #e6e2df;
  --muted: #77706c;
  --danger: #dc3545;
  --warning: #f59f00;
  --shadow: 0 16px 42px rgba(17, 27, 20, .09);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
.demo-banner { position: sticky; z-index: 51; top: 0; min-height: 34px; padding: 6px 18px; display: flex; align-items: center; justify-content: center; gap: 9px; color: #f2ece8; background: #302925; font-size: 11px; text-align: center; }
.demo-banner b { color: var(--orange); }
.demo-topbar { top: 34px; }
.demo-banner ~ .shop-shell .category-sidebar, .demo-banner ~ .shop-shell .cart-panel { top: 124px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  min-height: 78px;
  padding: 10px clamp(16px, 3vw, 44px);
  display: grid;
  grid-template-columns: minmax(230px, 310px) minmax(280px, 720px) auto;
  align-items: center;
  gap: 24px;
  color: white;
  background: linear-gradient(110deg, #070605 0%, #130f0d 72%, #22170f 100%);
  border-bottom: 1px solid rgba(255, 106, 0, .36);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .2);
}
.topbar::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), var(--blue), transparent);
  opacity: .65;
}
.brand { display: flex; align-items: center; min-width: 0; gap: 12px; }
.brand img { width: 68px; height: 54px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(255, 106, 0, .18)); }
.brand span { display: grid; min-width: 0; }
.brand b { overflow: hidden; font-size: 17px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.brand small { color: #c0bab6; font-size: 12px; }
.global-search, .admin-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 15px;
  color: #97908c;
  background: white;
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(11, 14, 12, .03);
}
.global-search:focus-within, .admin-search:focus-within { border-color: var(--orange-2); box-shadow: 0 0 0 3px rgba(255, 106, 0, .18); }
.global-search span, .admin-search span { font-size: 25px; line-height: 1; }
.global-search input, .admin-search input { min-width: 0; width: 100%; color: var(--ink); background: transparent; border: 0; outline: 0; }
.topnav { display: flex; justify-content: flex-end; gap: 4px; white-space: nowrap; }
.topnav a { padding: 10px 12px; color: #c3bdb9; border-radius: 9px; font-size: 13px; font-weight: 700; }
.topnav a:hover, .topnav a.active { color: var(--orange); background: rgba(255, 106, 0, .09); }
.mobile-cart { display: none; }
.logout-link { justify-self: end; padding: 9px 12px; color: #d4cfcc; border: 1px solid #46403c; border-radius: 9px; font-size: 13px; font-weight: 700; }
.logout-link:hover { color: white; border-color: var(--orange-2); }
.logout-form { justify-self: end; margin: 0; }
.logout-form .logout-link { background: transparent; }

.shop-shell {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 24px clamp(14px, 2vw, 30px) 60px;
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr) 350px;
  align-items: start;
  gap: 20px;
}
.category-sidebar, .cart-panel { position: sticky; top: 102px; }
.category-sidebar {
  overflow: hidden;
  padding: 9px;
  background: #12100e;
  border: 1px solid #292420;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.sidebar-title { padding: 11px 12px 8px; color: #a9a29d; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.category-button {
  width: 100%;
  min-height: 45px;
  margin: 2px 0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cec9c5;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
}
.category-button:hover { color: white; background: #231e1b; }
.category-button.active { color: #100700; background: linear-gradient(135deg, var(--orange), #ff8a32); box-shadow: 0 7px 20px rgba(255, 106, 0, .18); }
.shop-promo { margin-top: 12px; padding: 16px 13px; color: white; background: radial-gradient(circle at 100% 0, rgba(0, 169, 255, .28), transparent 52%), linear-gradient(145deg, #231d19, #13100e); border: 1px solid #3a332e; border-radius: 12px; }
.shop-promo b { color: var(--orange); }
.shop-promo p { margin: 6px 0 14px; color: #b5aeaa; font-size: 12px; }
.shop-promo span { color: rgba(255, 255, 255, .1); font-size: 30px; font-style: italic; font-weight: 900; letter-spacing: -.08em; }

.catalog-area { min-width: 0; }
.catalog-head { min-height: 78px; margin-bottom: 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.eyebrow { margin: 0 0 3px; color: var(--orange-2); font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.catalog-head h1, .admin-title h1 { margin: 0; font-size: clamp(25px, 2.5vw, 38px); line-height: 1.15; letter-spacing: -.035em; }
.subtle { color: var(--muted); font-size: 12px; }
.catalog-controls { display: flex; gap: 8px; }
.catalog-controls select, .catalog-controls button, .secondary-button {
  min-height: 40px;
  padding: 8px 12px;
  color: #403935;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-weight: 700;
}
.catalog-controls button:hover, .secondary-button:hover { color: var(--ink); border-color: var(--orange-2); }
.status-message { min-height: 0; margin-bottom: 0; padding: 0; color: #524b47; border-radius: 10px; }
.status-message:not(:empty) { margin-bottom: 12px; padding: 11px 13px; background: #fff; border: 1px solid var(--line); }
.status-message.error { color: #8f1f2a; background: #fff1f2; border-color: #ffc7cd; }

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.product-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid #e8e4e2;
  border-radius: 14px;
  box-shadow: 0 3px 14px rgba(20, 34, 23, .04);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.product-card:hover { z-index: 2; transform: translateY(-3px); border-color: #d7b49c; box-shadow: 0 15px 35px rgba(16, 35, 19, .12); }
.product-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: radial-gradient(circle at 50% 50%, #312a26 0, #181513 60%, #0f0d0c 100%);
}
.product-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.product-card:hover .product-image img { transform: scale(1.025); }
.product-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--orange); font-size: clamp(25px, 3vw, 48px); font-style: italic; font-weight: 950; letter-spacing: -.08em; }
.stock-badge { position: absolute; right: 9px; top: 9px; padding: 5px 8px; color: #331806; background: rgba(234, 255, 215, .94); border: 1px solid rgba(255, 106, 0, .45); border-radius: 999px; font-size: 10px; font-weight: 850; backdrop-filter: blur(6px); }
.stock-badge.low { color: #6d4200; background: #fff2c8; border-color: #ffd36f; }
.stock-badge.out { color: #8d1c27; background: #ffe1e4; border-color: #ffadb5; }
.product-info { flex: 1; padding: 13px 13px 8px; }
.product-category { color: var(--orange-2); font-size: 10px; font-weight: 850; letter-spacing: .03em; }
.product-info h3 { min-height: 42px; margin: 3px 0 5px; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 14px; line-height: 1.42; }
.product-variant { overflow: hidden; color: #625b57; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.product-sku { overflow: hidden; color: #a19c99; font-family: Consolas, monospace; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.product-desc { min-height: 34px; margin: 8px 0 0; display: -webkit-box; overflow: hidden; color: #857f7b; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 11px; }
.product-buy { padding: 8px 13px 13px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.product-price { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; }
.product-price del { color: #9b9692; font-size: 10px; }
.product-price b { color: #24c77a; font-size: 20px; letter-spacing: -.03em; }
.product-discount-badge { display: inline-flex; align-items: center; padding: 2px 6px; color: #fff; background: #c92c35; border-radius: 999px; font-size: 9px; font-style: normal; font-weight: 850; line-height: 1.4; }
.add-button { min-width: 44px; height: 42px; padding: 0 13px; color: #160c05; background: linear-gradient(135deg, var(--orange), #ff8a32); border: 0; border-radius: 10px; font-size: 20px; font-weight: 900; box-shadow: 0 7px 16px rgba(234, 88, 12, .2); }
.add-button:hover { filter: brightness(.95); transform: translateY(-1px); }
.add-button:disabled { cursor: not-allowed; color: #908b87; background: #e7e5e3; box-shadow: none; }
.empty-products { grid-column: 1 / -1; min-height: 280px; display: grid; place-items: center; align-content: center; gap: 5px; color: var(--muted); background: white; border: 1px dashed #c9c2bd; border-radius: var(--radius); text-align: center; }
.empty-products b { color: var(--ink); font-size: 18px; }

.cart-panel { overflow: hidden; background: white; border: 1px solid #e4dfdc; border-radius: var(--radius); box-shadow: var(--shadow); }
.cart-head { min-height: 58px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; background: var(--ink); border-bottom: 2px solid var(--orange); }
.cart-head h2 { margin: 0; color: white; font-size: 17px; }
.cart-head button { color: #b8b2ae; background: transparent; border: 0; font-size: 11px; }
.cart-head button:hover { color: white; }
.cart-items { max-height: 280px; overflow: auto; padding: 7px 14px; scrollbar-width: thin; }
.empty-cart { min-height: 132px; display: grid; place-items: center; align-content: center; gap: 2px; color: var(--muted); text-align: center; }
.empty-cart span { font-size: 32px; filter: grayscale(1); opacity: .45; }
.empty-cart b { color: #504843; font-size: 13px; }
.empty-cart small { font-size: 10px; }
.cart-item { padding: 9px 0; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 9px; border-bottom: 1px solid #f0eeed; }
.cart-item-thumb { width: 42px; height: 42px; overflow: hidden; display: grid; place-items: center; color: var(--orange-2); background: #171412; border-radius: 8px; font-weight: 900; }
.cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-copy { min-width: 0; display: grid; }
.cart-item-copy b, .cart-item-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-copy b { font-size: 11px; }
.cart-item-copy small { color: var(--muted); font-size: 9px; }
.cart-item-price { color: var(--ink); font-size: 11px; font-weight: 850; }
.quantity-control { grid-column: 2 / 4; display: flex; align-items: center; justify-content: space-between; }
.quantity-buttons { display: flex; align-items: center; gap: 3px; }
.quantity-buttons button { width: 25px; height: 25px; padding: 0; color: #453e3a; background: #f4f2f1; border: 1px solid #e5e1df; border-radius: 6px; font-weight: 900; }
.quantity-buttons output { min-width: 27px; text-align: center; font-size: 11px; font-weight: 800; }
.remove-item { padding: 3px 0; color: #a44a52; background: transparent; border: 0; font-size: 9px; }
.cart-fields { padding: 9px 14px 11px; display: grid; gap: 7px; background: #faf9f8; border-block: 1px solid #e9e6e4; }
.cart-fields label, .login-card label, .modal-card label { display: grid; gap: 4px; color: #635c58; font-size: 10px; font-weight: 750; }
.cart-fields input, .cart-fields textarea, .login-card input, .modal-card input, .modal-card textarea, .modal-card select {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  color: var(--ink);
  background: white;
  border: 1px solid #e0dcd9;
  border-radius: 8px;
  outline: 0;
}
.cart-fields textarea, .modal-card textarea { resize: vertical; }
.cart-fields input:focus, .cart-fields textarea:focus, .login-card input:focus, .modal-card input:focus, .modal-card textarea:focus, .modal-card select:focus { border-color: var(--orange-2); box-shadow: 0 0 0 3px rgba(255, 106, 0, .14); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
  .delivery-options { margin: 0; padding: 0; display: grid; gap: 6px; border: 0; }
  .delivery-options legend { width: 100%; margin-bottom: 2px; color: var(--ink); font-size: 10px; font-weight: 850; }
  .delivery-options legend span { margin-left: 4px; color: #8b827c; font-weight: 600; }
  .cart-fields .delivery-option { min-height: 43px; padding: 7px 9px; display: flex; grid-template-columns: none; align-items: center; gap: 8px; background: #fff; border: 1px solid #e4dfdc; border-radius: 8px; cursor: pointer; }
  .cart-fields .delivery-option:has(input:checked) { border-color: var(--orange-2); background: #fff7f1; box-shadow: 0 0 0 2px rgba(255, 106, 0, .1); }
  .delivery-option input { width: 15px; min-height: 15px; margin: 0; accent-color: var(--orange-2); }
  .delivery-option span { display: grid; gap: 2px; }
  .delivery-option b { color: var(--ink); font-size: 10px; }
  .delivery-option small { color: #8b827c; font-size: 9px; font-weight: 550; }
.totals { padding: 10px 15px; display: grid; gap: 5px; }
.totals > div, .invoice-summary > div { display: flex; align-items: center; justify-content: space-between; color: #68615d; font-size: 11px; }
.totals b { color: var(--ink); }
.totals .grand-total { margin-top: 3px; padding-top: 8px; border-top: 1px dashed #d5d0cc; font-size: 14px; }
.totals .grand-total b { color: var(--orange-2); font-size: 23px; }
.checkout-button { width: calc(100% - 28px); min-height: 48px; margin: 0 14px; color: #100700; background: linear-gradient(135deg, var(--orange), #ff8a32); border: 0; border-radius: 10px; font-weight: 900; box-shadow: 0 9px 20px rgba(234, 88, 12, .2); }
.checkout-button:hover:not(:disabled) { filter: brightness(.96); transform: translateY(-1px); }
.checkout-button:disabled { cursor: not-allowed; color: #928d89; background: #e4e1df; box-shadow: none; }
.cart-note { margin: 7px 15px 12px; color: #9a9490; font-size: 9px; text-align: center; }

.toast { position: fixed; z-index: 200; right: 22px; bottom: 22px; max-width: min(390px, calc(100vw - 32px)); padding: 12px 16px; color: white; background: #201914; border: 1px solid #3e332c; border-left: 4px solid var(--orange); border-radius: 10px; box-shadow: 0 16px 38px rgba(0,0,0,.24); opacity: 0; pointer-events: none; transform: translateY(12px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-left-color: var(--danger); }
.busy-overlay { position: fixed; z-index: 300; inset: 0; display: grid; place-items: center; align-content: center; gap: 12px; color: white; background: rgba(4, 8, 5, .76); backdrop-filter: blur(4px); }
.loader { width: 42px; height: 42px; border: 4px solid rgba(255,255,255,.18); border-top-color: var(--orange); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Admin */
.admin-page .topbar { grid-template-columns: minmax(230px, 1fr) auto auto; }
.admin-shell { width: min(1500px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 70px; display: grid; gap: 18px; }
.admin-title { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-title p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); }
.primary-button { min-height: 42px; padding: 9px 15px; color: #100700; background: linear-gradient(135deg, var(--orange), #ff8a32); border: 0; border-radius: 9px; font-weight: 900; box-shadow: 0 8px 19px rgba(234, 88, 12, .17); }
.primary-button:hover { filter: brightness(.95); transform: translateY(-1px); }
.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.stat-grid article { min-height: 126px; padding: 17px; display: grid; align-content: center; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 5px 18px rgba(17, 27, 20, .04); }
.stat-grid span { color: var(--muted); font-size: 11px; font-weight: 750; }
.stat-grid b { margin: 2px 0; font-size: clamp(25px, 2.2vw, 35px); line-height: 1.1; letter-spacing: -.04em; }
.stat-grid small { color: #9b9591; font-size: 10px; }
.stat-grid .warning { border-left: 4px solid var(--warning); }
.stat-grid .warning b { color: #ad6a00; }
.stat-grid .profit { color: white; background: linear-gradient(145deg, #1a1511, #2d221b); border-color: #362e29; }
.stat-grid .profit span, .stat-grid .profit small { color: #bdb4ae; }
.stat-grid .profit b { color: var(--orange); }
.monthly-sales-panel { margin-top: 14px; }
.monthly-sales-heading { min-height: 78px; align-items: center; padding: 15px 20px; }
.monthly-sales-heading .eyebrow { margin: 0 0 2px; color: #b6530a; font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.monthly-sales-heading h2 { margin: 0; font-size: 19px; }
.monthly-sales-heading .subtle { display: inline-block; margin-top: 4px; font-size: 10px; }
.monthly-report-controls { display:flex; align-items:end; gap:8px; }
.monthly-report-controls label { display:grid; gap:4px; color:#6f6965; font-size:10px; font-weight:750; }
.monthly-report-controls input { min-height:38px; padding:7px 10px; color:#34312e; background:#fff; border:1px solid #e2dfdc; border-radius:8px; font:inherit; }
.monthly-report-controls .secondary-button { min-height:38px; display:inline-flex; align-items:center; justify-content:center; text-decoration:none; white-space:nowrap; }
.monthly-report-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:14px 18px 4px; }
.monthly-report-stats article { min-width:0; padding:12px 14px; display:grid; gap:4px; background:#fbfaf9; border:1px solid #efedea; border-radius:10px; }
.monthly-report-stats span { color:#77716c; font-size:10px; font-weight:750; }
.monthly-report-stats b { color:#282522; font-size:clamp(18px,2vw,25px); line-height:1.15; }
.monthly-report-stats article:nth-child(2) b { color:#d65c0a; }
.monthly-report-chart-section,.monthly-report-table-section { padding:13px 18px 16px; }
.monthly-report-table-section { padding-top:4px; }
.monthly-report-subhead { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.monthly-report-subhead h3 { margin:0; color:#393531; font-size:12px; }
.monthly-report-subhead small { color:#93908c; font-size:9px; }
.monthly-report-legend { display:flex; align-items:center; gap:12px; color:#77716c; font-size:9px; white-space:nowrap; }
.monthly-report-legend span { display:inline-flex; align-items:center; gap:5px; }
.monthly-report-legend i { width:8px; height:8px; border-radius:3px; }
.monthly-report-legend .sales-legend { background:#f47a20; }
.monthly-report-legend .profit-legend { background:#2f8b61; }
.monthly-report-chart { height:136px; margin-top:4px; padding:2px 0 0; display:flex; align-items:center; color:#8c8782; font-size:10px; }
.monthly-report-chart svg { width:100%; height:100%; overflow:visible; }
.monthly-chart-sales { fill:#f47a20; }
.monthly-chart-profit { fill:#2f8b61; }
.monthly-chart-baseline { stroke:#e8e5e2; stroke-width:1; }
.monthly-chart-day { fill:#8f8a86; font-size:8px; }
.monthly-report-table-wrap { max-height:390px; margin-top:8px; overflow:auto; border:1px solid #eeecea; border-radius:9px; }
.monthly-report-table { width:100%; border-collapse:collapse; font-size:10px; }
.monthly-report-table th { position:sticky; top:0; z-index:1; padding:9px 10px; color:#77716c; background:#f8f7f6; border-bottom:1px solid #eae7e4; text-align:left; white-space:nowrap; }
.monthly-report-table td { padding:8px 10px; border-bottom:1px solid #f0eeec; vertical-align:top; }
.monthly-report-table tbody tr:last-child td { border-bottom:0; }
.monthly-report-table td b { color:#34302d; }
.monthly-report-table td small { display:block; margin-top:3px; color:#89837e; font-size:9px; }
.monthly-report-table .num { white-space:nowrap; text-align:right; }
.monthly-report-items { min-width:190px; max-width:470px; color:#635d58; line-height:1.5; }
.monthly-report-profit-cell { color:#267e56; font-weight:750; }
.admin-panel { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 7px 24px rgba(17, 27, 20, .05); }
.admin-list-selection,.invoice-panel-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.admin-list-selection[hidden] { display:none; }
.admin-list-selection span { color:#77716c; font-size:10px; font-weight:750; white-space:nowrap; }
.admin-list-selection .danger-button { min-height:34px; padding:7px 11px; }
.admin-panel input[type="checkbox"] { width:16px; height:16px; accent-color:#f27622; cursor:pointer; }
.admin-panel#inventory > .panel-head { min-height: 86px; padding: 18px 22px; }
.admin-panel#inventory > .panel-head h2 { color: #24211f; font-size: 20px; font-weight: 850; letter-spacing: -.02em; }
.admin-panel#inventory > .panel-head .subtle { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; color: #827b76; font-size: 11px; }
.admin-panel#inventory > .panel-head .subtle::before { width: 6px; height: 6px; content: ''; background: #f27622; border-radius: 50%; }
.admin-panel#inventory .admin-search { width: min(390px, 38vw); height: 44px; padding: 0 13px; background: #f8f7f5; border-color: #e9e5e2; border-radius: 10px; }
.inventory-category-area { padding: 13px 20px 11px; background: #fbfaf9; border-top: 1px solid #f0edeb; border-bottom: 1px solid #eeebe8; }
.inventory-category-head { margin-bottom: 10px; display: flex; align-items: baseline; gap: 9px; }
.inventory-category-head span { color: #39332f; font-size: 12px; font-weight: 850; }
.inventory-category-head small { color: #92908d; font-size: 10px; }
.footer-admin-disclosure[open] { overflow: visible; }
.footer-disclosure-summary { position: relative; min-height: 106px; padding: 18px 24px; display: flex; align-items: center; gap: 18px; cursor: pointer; list-style: none; background: linear-gradient(100deg, #fff8f1 0%, #fff 58%, #fafafa 100%); }
.footer-disclosure-summary::-webkit-details-marker { display: none; }
.footer-disclosure-summary::before { position: absolute; inset: 0 auto 0 0; width: 4px; content: ''; background: linear-gradient(180deg, var(--orange), #ffb36c); }
.footer-summary-mark { width: 54px; height: 54px; display: grid; place-items: center; flex: 0 0 54px; color: #ff7a19; background: #1b1918; border: 1px solid #332c27; border-radius: 15px; box-shadow: 0 5px 12px rgba(34, 24, 18, .12); font-size: 15px; font-weight: 950; letter-spacing: -.04em; }
.footer-summary-copy { min-width: 0; display: grid; gap: 3px; }
.footer-summary-copy b { color: var(--ink); font-size: 18px; line-height: 1.3; }
.footer-summary-copy small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.footer-summary-copy .footer-summary-eyebrow { color: #b6530a; font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.footer-summary-count { margin-left: auto; padding: 8px 11px; color: #6d625a; background: #fff; border: 1px solid #eee4db; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.footer-disclosure-action { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 10px; color: #a64d0a; font-size: 11px; font-weight: 850; white-space: nowrap; }
.footer-close-label, .footer-admin-disclosure[open] .footer-open-label { display: none; }
.footer-admin-disclosure[open] .footer-close-label { display: inline; }
.footer-disclosure-action i { width: 34px; height: 34px; display: grid; place-items: center; color: white; background: var(--orange); border-radius: 11px; font-size: 19px; font-style: normal; transition: transform .18s ease; }
.footer-admin-disclosure[open] .footer-disclosure-summary { border-bottom: 1px solid #ebe8e6; }
.footer-admin-disclosure[open] .footer-disclosure-action i { transform: rotate(180deg); }
.footer-disclosure-summary:hover { background: linear-gradient(100deg, #fff0e3 0%, #fff 66%, #fafafa 100%); }
.footer-disclosure-summary:focus-visible { outline: 3px solid rgba(255, 102, 0, .35); outline-offset: -3px; border-radius: 14px; }
.panel-head { min-height: 70px; padding: 13px 17px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #ebe8e6; }
.panel-head h2 { margin: 0; font-size: 18px; }
.admin-search { width: min(340px, 42vw); height: 40px; background: #f8f7f6; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.admin-table th { padding: 11px 12px; color: #817b77; background: #f8f7f6; border-bottom: 1px solid #e9e5e3; font-size: 9px; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
.admin-table td { padding: 11px 12px; border-bottom: 1px solid #f0eeed; vertical-align: middle; }
.admin-table tbody tr:hover { background: #fdfcfb; }
.admin-table .num { text-align: right; }
.product-cell { display: flex; align-items: center; gap: 10px; min-width: 230px; white-space: normal; }
.product-cell img, .product-cell .mini-placeholder { flex: 0 0 44px; width: 44px; height: 44px; object-fit: cover; display: grid; place-items: center; color: var(--orange); background: #171311; border-radius: 8px; font-size: 10px; font-weight: 900; }
.product-cell span { display: grid; }
.product-cell b { font-size: 12px; }
.product-cell small { color: var(--muted); font-size: 9px; }
.sku-cell { display: grid; }
.sku-cell code { font-size: 10px; }
.sku-cell small { color: var(--muted); font-size: 9px; }
.inventory-product-row { background: #f9fafb; }
.inventory-product-row td { padding-top: 13px; padding-bottom: 10px; border-top: 1px solid #e8e9ec; }
.inventory-product-cell { min-width: 430px; gap: 12px; }
.inventory-product-cell > span { gap: 3px; }
.inventory-product-cell > em { margin-left: auto; padding: 4px 9px; color: #737987; background: #eef0f3; border-radius: 999px; font-size: 10px; font-style: normal; white-space: nowrap; }
.inventory-product-cell .seller-sku-line { margin-top: 2px; }
.seller-sku-line code, .variant-copy code { color: #727987; font-family: inherit; font-size: 10px; }
.inventory-variant-row td { padding-top: 8px; padding-bottom: 8px; background: #fff; }
.inventory-variant-row:hover td { background: #fffaf6; }
.inventory-variant-cell { display: flex; align-items: center; gap: 10px; min-width: 430px; padding-left: 34px; white-space: normal; }
.inventory-variant-cell > img, .inventory-variant-cell > .mini-placeholder { flex: 0 0 40px !important; width: 40px !important; min-width: 40px; max-width: 40px !important; height: 40px !important; min-height: 40px; max-height: 40px !important; object-fit: contain; display: grid; place-items: center; color: var(--orange); background: #f3f4f6; border: 1px solid #e7e8eb; border-radius: 7px; font-size: 9px; font-weight: 900; }
.variant-branch { align-self: stretch; position: relative; flex: 0 0 12px; margin-left: -21px; }
.variant-branch::before { content: ""; position: absolute; left: 8px; top: -16px; bottom: -16px; width: 1px; background: #d7dbe1; }
.variant-branch::after { content: ""; position: absolute; left: 8px; top: 50%; width: 11px; height: 1px; background: #d7dbe1; }
.inventory-variant-last .variant-branch::before { bottom: 50%; }
.variant-copy { display: grid; gap: 3px; }
.variant-copy b { font-size: 11px; font-weight: 650; }
.variant-copy small { color: var(--muted); font-size: 9px; }
.profit-value { color: var(--orange-2); font-weight: 850; }
.stock-value { font-size: 15px; font-weight: 900; }
.stock-value.low { color: #b66c00; }
.status-pill { display: inline-flex; padding: 4px 8px; color: #a44000; background: var(--orange-soft); border-radius: 99px; font-size: 9px; font-weight: 800; }
.status-pill.off { color: #736d69; background: #eceae8; }
.status-pill.partial { color: #8a5800; background: #fff1bf; }
.status-pill.paid { color: #783100; background: #ffe5d3; }
.status-pill.unpaid { color: #9d2732; background: #ffe3e6; }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.row-actions button, .row-actions a { min-height: 32px; padding: 6px 9px; color: #4b443f; background: white; border: 1px solid #e0dbd8; border-radius: 7px; font-size: 10px; font-weight: 800; }
.row-actions button:hover, .row-actions a:hover { color: var(--ink); border-color: var(--orange-2); }
.loading-cell { height: 130px; color: var(--muted); text-align: center; }
.integration-note { padding: 15px 17px; display: flex; gap: 12px; color: #c8bfb9; background: #171311; border: 1px solid #302b27; border-left: 4px solid var(--orange); border-radius: 11px; }
.integration-note b { color: var(--orange); white-space: nowrap; }
.integration-note span { font-size: 12px; }

/* Modals and forms */
.modal-card { width: min(470px, calc(100% - 24px)); padding: 0; color: var(--ink); background: white; border: 0; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.32); }
.modal-card::backdrop { background: rgba(4, 8, 5, .7); backdrop-filter: blur(3px); }
.modal-card form { padding: 19px; }
.modal-wide { width: min(760px, calc(100% - 24px)); }
.modal-head { margin-bottom: 15px; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.modal-head h2 { margin: 0; font-size: 22px; }
.icon-button { width: 34px; height: 34px; color: #736c68; background: #f3f1f0; border: 0; border-radius: 8px; font-size: 22px; }
.modal-product { margin: -5px 0 13px; color: #504944; font-weight: 800; }
.mode-picker { margin-bottom: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mode-picker label { cursor: pointer; }
.mode-picker input { position: absolute; opacity: 0; }
.mode-picker span { padding: 9px; color: #615a56; background: #f5f3f2; border: 1px solid #e5e2e0; border-radius: 8px; text-align: center; }
.mode-picker input:checked + span { color: #8c3900; background: var(--orange-soft); border-color: var(--orange-2); }
.modal-card form > label { margin-bottom: 11px; }
.modal-actions { margin-top: 18px; display: flex; justify-content: flex-end; gap: 8px; }
.inline-edit-pencil { width:24px; height:24px; margin-left:4px; padding:0; vertical-align:middle; color:#838993; background:transparent; border:0; border-radius:6px; font-size:15px; line-height:1; cursor:pointer; }
.inline-edit-pencil:hover, .inline-edit-pencil:focus-visible { color:#c65306; background:#fff0e5; outline:none; }
.inventory-quick-edit { width:min(620px,calc(100% - 24px)); max-height:min(92vh,760px); overflow:auto; }
.inventory-quick-edit form { padding:22px; }
.quick-edit-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px 13px; }
.quick-edit-grid label { display:grid; gap:5px; color:#635c58; font-size:11px; font-weight:750; }
.quick-edit-grid input { width:100%; min-width:0; padding:10px 11px; color:var(--ink); background:white; border:1px solid #dedfe3; border-radius:8px; font:inherit; }
.quick-edit-grid input:focus { border-color:var(--orange-2); box-shadow:0 0 0 3px rgba(255,106,0,.14); outline:none; }
.quick-stock-field { grid-column:1/-1; }
.quick-edit-hint { margin:8px 0; line-height:1.6; }
.quick-edit-preview { margin-top:12px; padding:13px 14px; display:grid; grid-template-columns:1fr auto; gap:9px 12px; color:#626873; background:#fff8f2; border:1px solid #f2dfcf; border-radius:10px; font-size:12px; }
.quick-edit-preview b { color:#303640; text-align:right; }
.quick-edit-preview b:first-of-type { color:#d95500; }
.invoice-adjust-preview { margin: 10px 0; padding: 12px; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; color: #626873; background: #fff8f2; border: 1px solid #f2dfcf; border-radius: 9px; font-size: 12px; }
.invoice-adjust-preview b { color: #303640; text-align: right; }
.invoice-adjust-preview b:last-child { color: #d95500; font-size: 15px; }
.invoice-items-dialog { max-height: min(90vh, 860px); overflow-y: auto; }
.invoice-list .row-actions { flex-wrap: wrap; }
.invoice-items-dialog form { padding: 22px; }
.invoice-items-help { margin: -5px 0 14px; line-height: 1.65; }
.invoice-items-list { max-height: min(43vh, 390px); overflow: auto; display: grid; gap: 8px; padding: 2px 3px 2px 1px; }
.invoice-edit-row { display: grid; grid-template-columns: minmax(0,1fr) 78px 132px 48px; align-items: end; gap: 9px; padding: 10px; background: #fafbfc; border: 1px solid #e7e9ed; border-radius: 10px; }
.invoice-edit-row label { min-width: 0; margin: 0!important; }
.invoice-edit-row select { min-width: 0; text-overflow: ellipsis; }
.invoice-edit-quantity input { text-align: center; }
.invoice-edit-price { min-width: 0; display: grid; align-content: end; gap: 3px; }
.invoice-edit-price small { color: #808793; font-size: 10px; }
.invoice-edit-price input { min-width: 0; height: 36px; padding: 6px 8px; color: #bd4e08; font-weight: 700; }
.invoice-edit-remove { min-height: 36px; padding-inline: 8px; }
.invoice-returned-note { grid-column: 1/-1; color: #a85300; font-size: 10px; }
.invoice-item-add { margin-top: 10px; }
.invoice-items-preview { margin: 13px 0 8px; padding: 12px; display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; color: #646c77; background: #fff7f0; border: 1px solid #f3dfcd; border-radius: 10px; font-size: 12px; }
.invoice-items-preview b { color: #303640; text-align: right; }
.invoice-items-preview b:last-child { color: #d95500; font-size: 16px; }
@media(max-width:620px) {
  .invoice-items-dialog form { padding: 16px; }
  .invoice-edit-row { grid-template-columns: minmax(0,1fr) 78px; gap: 7px; }
  .invoice-edit-row>label:first-child { grid-column: 1/-1; }
  .invoice-edit-price { min-height: 0; }
  .invoice-edit-remove { justify-self: end; }
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.product-import-tools { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px 10px; align-items:end; margin:0 0 14px; padding:12px; background:#fff8f2; border:1px solid #ffe2ca; border-radius:10px; }
.inventory-tools { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; }
.inventory-excel-link { display:inline-flex; align-items:center; text-decoration:none; white-space:nowrap; }
.category-filter-buttons { display:flex; flex-wrap:wrap; align-items:center; gap:7px; overflow:visible; padding:0; margin:0; }
.category-filter-buttons button { flex:0 0 auto; min-height:33px; padding:7px 12px; border:1px solid #e4e1de; border-radius:999px; background:#fff; color:#555e6b; font-size:10px; white-space:nowrap; transition:background .15s ease,border-color .15s ease,color .15s ease,transform .15s ease; }
.category-filter-buttons button:hover { border-color:#f4a36c; color:#a94708; transform:translateY(-1px); }
.category-filter-buttons button[aria-pressed="true"] { border-color:#f17a2b; background:#fff0e5; color:#b94c06; font-weight:800; box-shadow:0 2px 5px rgba(225,92,13,.08); }
.category-manager { margin:12px 18px 15px; border:1px solid #ebe5df; border-radius:10px; background:#fffdfa; }
.category-manager > summary { padding:11px 14px; color:#9c480e; font-size:11px; font-weight:800; cursor:pointer; list-style:none; }
.category-manager > summary::-webkit-details-marker { display:none; }
.category-manager > summary::before { display:inline-block; width:19px; content:'＋'; font-size:13px; font-weight:900; }
.category-manager[open] > summary { border-bottom:1px solid #f1ece8; }
.category-manager[open] > summary::before { content:'−'; }
.category-add-form { display:flex; align-items:end; gap:8px; padding:0 12px 10px; }
.category-add-form label { flex:1; display:grid; gap:4px; color:var(--muted); font-size:10px; }
.category-add-form input { padding:9px; border:1px solid #e3e5e9; border-radius:7px; }
.category-management-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:7px; padding:0 12px 10px; }
.category-management-row { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:7px 8px; border:1px solid #eceef1; border-radius:7px; background:white; }
.category-management-row span { display:grid; gap:3px; min-width:0; }
.category-management-row b { overflow:hidden; text-overflow:ellipsis; font-size:11px; }
.category-management-row small, .category-manager > small { color:var(--muted); font-size:10px; }
.category-management-row button { padding:5px 8px; border:1px solid #f1c9b3; border-radius:6px; background:#fff8f4; color:#b44713; font-size:10px; white-space:nowrap; }
.category-management-row button:disabled { opacity:.55; cursor:not-allowed; }
.category-manager > small { display:block; padding:0 12px 10px; }
.invoice-settlement { padding:8px 10px; border:1px solid #e2e4e8; border-radius:7px; background:#fff; color:var(--ink); font:inherit; }
.invoice-settlement { max-width:170px; color:#30343b; font-size:11px; }
.product-import-tools label { display:grid; gap:5px; color:#635c58; font-size:10px; font-weight:750; }
.product-import-tools input { min-width:0; padding:10px; border:1px solid #e4e4e7; border-radius:7px; }
.product-import-tools small { grid-column:1/-1; }
.product-image-preview { margin-top:8px; }
.product-image-preview img { display:block; width:132px; height:132px; object-fit:contain; border:1px solid #e8e8eb; border-radius:8px; background:white; }
.product-image-preview:not([hidden]) { color:#6a6d75; font-size:12px; }
.check-row { display: flex !important; grid-template-columns: auto 1fr; align-items: center; }
.check-row input { width: 17px; min-height: 17px; accent-color: var(--orange-2); }
.demo-receipt { padding: 20px; }
.demo-bill-head, .demo-bill-customer { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #f7f5f4; border-radius: 8px; }
.demo-bill-head b { color: var(--orange-2); }
.demo-bill-head span, .demo-bill-customer { color: var(--muted); font-size: 11px; }
.demo-bill-lines { margin: 14px 0; display: grid; }
.demo-bill-lines > div { padding: 9px 2px; display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #ebe8e6; }
.demo-bill-lines span { min-width: 0; }
.demo-bill-lines b { white-space: nowrap; }
.demo-bill-total { padding: 4px 2px; display: flex; justify-content: space-between; }
.demo-bill-total.balance { margin-top: 6px; padding-top: 10px; border-top: 1px dashed #c4bdb9; font-size: 17px; }
.demo-bill-total.balance b { color: var(--orange-2); font-size: 21px; }
.demo-hint { padding: 9px; color: #735000; background: #fff6d8; border: 1px solid #f2dc93; border-radius: 7px; font-size: 10px; }

/* Login */
.login-page { min-height: 100vh; padding: 24px; display: grid; place-items: center; background: radial-gradient(circle at 20% 0, rgba(0,169,255,.13), transparent 34%), radial-gradient(circle at 90% 90%, rgba(118,240,0,.14), transparent 36%), #0b0908; }
.login-card { width: min(410px, 100%); padding: 30px; display: grid; gap: 13px; background: white; border: 1px solid #342d28; border-radius: 18px; box-shadow: 0 30px 90px rgba(0,0,0,.4); }
.login-card img { width: 150px; height: 88px; margin: 0 auto; object-fit: contain; }
.login-card h1 { margin: 0 0 8px; font-size: 25px; text-align: center; }
.login-card input { min-height: 43px; }
.login-card textarea { width: 100%; padding: 8px; color: var(--ink); background: #f7f6f5; border: 1px solid #e0dcd9; border-radius: 8px; resize: vertical; }
.login-card button { min-height: 46px; color: #100700; background: var(--orange); border: 0; border-radius: 9px; font-weight: 900; }
.password-field { position:relative; display:block; width:100%; }
.password-field input { padding-right:46px !important; }
.login-card .password-toggle { position:absolute; top:50%; right:5px; z-index:2; width:36px; height:36px; min-height:36px; padding:8px; transform:translateY(-50%); display:grid; place-items:center; color:#667080; background:transparent; border:0; border-radius:7px; cursor:pointer; }
.login-card .password-toggle:hover { color:#df5b08; background:#fff2e8; }
.password-toggle svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.55; stroke-linecap:round; stroke-linejoin:round; }
.password-toggle:focus-visible { outline:2px solid var(--orange-2); outline-offset:1px; }
.login-card > a { color: var(--muted); font-size: 11px; text-align: center; }
.form-error { margin: 0; padding: 10px; color: #941f2a; background: #fff0f1; border: 1px solid #ffc8cd; border-radius: 8px; font-size: 11px; }

/* Invoice */
.member-banner { margin-bottom: 14px; padding: 12px 16px; display: flex; justify-content: space-between; gap: 12px; color: #ffddc5; background: linear-gradient(110deg,#1a1410,#3b2516); border: 1px solid #c76f33; border-radius: 12px; }
.member-banner span { color: #e9bea0; }
.wholesale-price-badge { position: absolute; left: 8px; bottom: 8px; padding: 4px 7px; color: #170e07; background: var(--orange); border-radius: 6px; font-size: 9px; font-weight: 900; }
.wholesale-value { color: #8b4413; }
.table-sub { margin-top: 4px; display: block; color: var(--muted); font-size: 10px; }
.status-pill.pending { color: #765800; background: #fff2b6; }
.status-pill.confirmed, .status-pill.active, .status-pill.completed { color: #5a3217; background: #f5e4d8; }
.status-pill.cancelled, .status-pill.suspended, .status-pill.rejected { color: #8b2424; background: #ffe0e0; }
.account-order-actions { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.account-order-actions .danger-button { min-height:34px; padding:7px 10px; white-space:nowrap; }
.account-order-actions .secondary-button:disabled { opacity:.55; cursor:not-allowed; }
.account-cancel-help { color:#81766f; font-size:9px; white-space:nowrap; }
.admin-table select { min-width: 110px; padding: 7px; border: 1px solid #d5d0cc; border-radius: 7px; background: white; }
.form-success { padding: 10px 12px; color: #5a3217; background: #f7e8dd; border-radius: 8px; }
.login-links { display: flex; justify-content: space-between; gap: 14px; margin-top: 14px; }
.login-links a { color: #764422; font-weight: 750; }
.register-card { width: min(650px,calc(100% - 24px)); }
.register-note { margin: 0 0 16px; color: var(--muted); }
.account-page { background: var(--surface); }
.account-shell { width: min(1280px,calc(100% - 28px)); margin: auto; padding: 28px 0 60px; }
.member-hero { padding: 24px; display: flex; justify-content: space-between; align-items: center; color: white; background: linear-gradient(120deg,#100b08,#362215); border-radius: 16px; }
.member-hero h1 { margin: 3px 0; }
.member-hero p { margin: 0; color: #c8bfb9; }
.member-tier { padding: 9px 13px; color: #231810; background: #ddd; border-radius: 999px; font-weight: 900; }
.member-tier.wholesale { background: var(--orange); }
.account-grid { margin-top: 18px; display: grid; grid-template-columns: 350px 1fr; gap: 18px; }
.profile-form { display: grid; gap: 13px; }
.profile-form label { display: grid; gap: 5px; font-weight: 750; }
.profile-form input,.profile-form textarea,.profile-form select { width: 100%; padding: 10px; border: 1px solid #d5d0cc; border-radius: 8px; background: white; }
.invoice-order-notice { margin: 16px 0; padding: 13px 16px; color: #654d00; background: #fff4bf; border: 1px solid #e8d36b; border-radius: 9px; }
.invoice-page { padding: 22px; background: #eceae8; }
.invoice-actions { width: min(900px, 100%); margin: 0 auto 12px; display: flex; justify-content: space-between; }
.invoice-actions a, .invoice-actions button { padding: 9px 13px; color: white; background: #201b18; border: 0; border-radius: 8px; font-weight: 750; }
.invoice-actions button { color: #100700; background: var(--orange); }
.invoice-sheet { width: min(900px, 100%); min-height: 1120px; margin: 0 auto; padding: 38px 42px; background: white; box-shadow: 0 12px 40px rgba(0,0,0,.12); }
.invoice-brand { padding-bottom: 23px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--ink); }
.invoice-brand img { width: 180px; height: 115px; object-fit: contain; }
.invoice-brand div { text-align: right; }
.invoice-brand h1 { margin: 0; font-size: 24px; }
.invoice-brand div > b { color: var(--orange-2); font-size: 18px; }
.invoice-brand p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.invoice-customer { margin: 20px 0; padding: 14px 16px; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 15px; background: #f7f6f5; border-radius: 10px; }
.invoice-customer div { display: grid; }
.invoice-customer span { color: var(--muted); font-size: 10px; }
.invoice-table-wrap { overflow-x: auto; }
.invoice-table { width: 100%; border-collapse: collapse; }
.invoice-table th { padding: 10px; color: #706965; background: #f3f1f0; font-size: 10px; text-align: left; }
.invoice-table td { padding: 13px 10px; border-bottom: 1px solid #ebe8e6; }
.invoice-table td small { display: block; color: var(--muted); font-size: 9px; }
.invoice-table .num { text-align: right; white-space: nowrap; }
.invoice-item-product { min-width: 225px; display: flex; align-items: center; gap: 10px; }
.invoice-item-thumb { width: 58px; height: 58px; flex: 0 0 58px; display: grid; place-items: center; overflow: hidden; border: 1px solid #e5e7eb; border-radius: 8px; background: #f7f7f6; color: var(--orange-2); font-size: 10px; font-weight: 800; }
.invoice-item-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.invoice-item-copy { min-width: 0; }
.invoice-item-copy b { display: block; }
.invoice-item-copy small { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .invoice-item-product { min-width: 180px; gap: 7px; }
  .invoice-item-thumb { width: 48px; height: 48px; flex-basis: 48px; }
}
.invoice-summary { width: min(390px, 100%); margin: 20px 0 20px auto; display: grid; gap: 7px; }
.invoice-summary b { color: var(--ink); }
.invoice-summary .invoice-grand { margin-block: 4px; padding-block: 9px; border-block: 1px solid #d7d2ce; font-size: 16px; }
.invoice-summary .invoice-grand b { color: var(--orange-2); font-size: 23px; }
.invoice-note { padding: 13px; background: #f7f6f5; border-radius: 8px; font-size: 11px; }
.invoice-footer { margin-top: 48px; padding-top: 20px; display: grid; justify-items: center; border-top: 1px solid #e5e1df; }
.invoice-footer b { font-size: 17px; }
.invoice-footer span, .invoice-footer small { color: var(--muted); }

@media (max-width: 1350px) {
  .shop-shell { grid-template-columns: 190px minmax(0, 1fr) 330px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1040px) {
  .topbar { grid-template-columns: 220px minmax(220px, 1fr) auto; gap: 12px; }
  .topnav { display: none; }
  .mobile-cart { display: block; justify-self: end; padding: 9px 12px; color: #100700; background: var(--orange); border: 0; border-radius: 9px; font-weight: 900; }
  .mobile-cart b { min-width: 19px; display: inline-block; color: white; background: #201b17; border-radius: 99px; }
  .shop-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .cart-panel { position: fixed; z-index: 100; inset: 78px 0 0 auto; width: min(390px, 100%); border-radius: 0; transform: translateX(105%); transition: transform .24s ease; }
  .cart-panel.open { transform: translateX(0); box-shadow: -20px 20px 55px rgba(0,0,0,.22); }
  .cart-items { max-height: 34vh; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .member-banner,.member-hero { align-items: flex-start; flex-direction: column; }
  .account-grid { grid-template-columns: 1fr; }
  .topbar { min-height: 116px; padding: 8px 12px; grid-template-columns: 1fr auto; grid-template-rows: 48px 44px; }
  .brand img { width: 52px; height: 42px; }
  .brand b { font-size: 14px; }
  .global-search { grid-column: 1 / -1; grid-row: 2; height: 40px; }
  .shop-shell { padding: 14px 10px 45px; display: block; }
  .category-sidebar { position: static; overflow-x: auto; margin-bottom: 14px; padding: 7px; display: flex; border-radius: 12px; scrollbar-width: none; }
  .sidebar-title, .shop-promo { display: none; }
  #categoryList { display: contents; }
  .category-button { flex: 0 0 auto; width: auto; min-height: 38px; padding: 7px 11px; }
  .category-button:first-of-type { margin-right: 3px; }
  .catalog-head { align-items: flex-start; }
  .catalog-controls select { max-width: 154px; }
  .catalog-controls button { display: none; }
  .product-grid { gap: 9px; }
  .product-info { padding: 10px 10px 6px; }
  .product-info h3 { min-height: 39px; margin-top: 2px; font-size: 12px; }
  .product-desc { display: none; }
  .product-buy { padding: 6px 10px 10px; }
  .product-price b { font-size: 17px; }
  .add-button { height: 37px; min-width: 38px; padding: 0 10px; }
  .cart-panel { inset: 116px 0 0 auto; }
  .demo-banner ~ .shop-shell .cart-panel { top: 150px; }
  .admin-page .topbar { min-height: 70px; grid-template-columns: 1fr auto; grid-template-rows: auto; }
  .admin-page .brand { grid-column: 1; }
  .admin-shell { width: min(100% - 20px, 1500px); padding-top: 16px; }
  .admin-title { align-items: flex-start; }
  .admin-title p:not(.eyebrow) { display: none; }
  .admin-title h1 { font-size: 24px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-grid article { min-height: 105px; padding: 13px; }
  .stat-grid .profit { grid-column: 1 / -1; }
  .panel-head { align-items: flex-start; flex-direction: column; }
  .monthly-sales-heading { gap:12px; padding:14px; }
  .monthly-report-controls { width:100%; align-items:end; }
  .monthly-report-controls label { flex:1; }
  .monthly-report-controls input { width:100%; }
  .monthly-report-stats { gap:7px; padding:10px 12px 2px; }
  .monthly-report-stats article { padding:10px; }
  .monthly-report-stats b { font-size:17px; }
  .monthly-report-chart-section,.monthly-report-table-section { padding-inline:12px; }
  .monthly-report-chart { height:118px; }
  .monthly-report-table { min-width:700px; }
  .admin-search { width: 100%; }
  .integration-note { display: grid; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .product-import-tools { grid-template-columns:1fr; }
  .product-import-tools small { grid-column:auto; }
  .inventory-tools { justify-content:stretch; width:100%; }
  .inventory-tools .admin-search { flex:1 1 170px; }
  .category-add-form { align-items:stretch; flex-direction:column; }
  .invoice-page { padding: 0; }
  .invoice-actions { padding: 10px; margin: 0; }
  .invoice-sheet { min-height: 100vh; padding: 22px 16px; }
  .invoice-brand img { width: 120px; height: 75px; }
  .invoice-brand h1 { font-size: 17px; }
  .invoice-customer { grid-template-columns: 1fr 1fr; }
}
.quick-contact-button { position:fixed; z-index:120; right:18px; bottom:18px; padding:13px 18px; border:0; border-radius:999px; color:white; background:#1877f2; box-shadow:0 8px 24px #15243b38; font-weight:800; cursor:pointer; }
.quick-contact-button { display:inline-flex; align-items:center; gap:8px; }
.quick-contact-button svg { width:18px; height:18px; fill:white; flex:none; }
.quick-contact-dialog { width:min(370px,calc(100% - 28px)); padding:28px; border:0; border-radius:18px; color:#252a33; box-shadow:0 20px 70px #0004; text-align:center; }
.quick-contact-dialog::backdrop { background:#11192388; backdrop-filter:blur(2px); }
.quick-contact-close { position:absolute; top:10px; right:12px; width:34px; height:34px; border:0; border-radius:50%; background:#f1f2f5; color:#545b66; font-size:23px; cursor:pointer; }
.quick-contact-icon { display:inline-grid; place-items:center; width:48px; height:48px; border-radius:50%; background:#1877f2; color:white; }
.quick-contact-icon svg { width:25px; height:25px; fill:white; }
.quick-contact-dialog h2 { margin:12px 0 6px; font-size:19px; }
.quick-contact-dialog p { color:#69717e; font-size:13px; line-height:1.6; }
.quick-contact-dialog > a { display:inline-block; margin-top:8px; padding:11px 17px; border-radius:8px; background:#1877f2; color:#fff; font-size:13px; font-weight:800; text-decoration:none; }
@media(max-width:720px) { .quick-contact-button { right:12px; bottom:12px; padding:11px 14px; font-size:12px; } }
.monthly-bestsellers { margin:0 0 22px; padding:17px; border:1px solid #e8e3df; border-radius:14px; background:linear-gradient(135deg,#fff 58%,#fff4eb); }
.monthly-bestsellers-heading { display:flex; align-items:center; justify-content:flex-start; gap:14px; margin-bottom:13px; }
.monthly-bestsellers-heading h2 { margin:0; font-size:19px; }
.monthly-bestseller-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:0 -17px; }
.bestseller-image-card { aspect-ratio:1; margin:0; overflow:hidden; border:1px solid #e6e8ee; border-radius:10px; background:#fff; }
.bestseller-image-card img { display:block; width:100%; height:100%; object-fit:contain; }
.bestseller-empty { grid-column:1/-1; margin:0; padding:17px; border-radius:10px; color:#6e6762; background:#f7f5f3; font-size:12px; }
.inventory-bulk-tools { margin:0 0 12px; padding:11px; display:flex; flex-wrap:wrap; align-items:center; gap:8px; border:1px solid #f3d4c1; border-radius:9px; background:#fff8f3; }
.inventory-bulk-tools[hidden] { display:none; }
.inventory-bulk-tools b { color:#9d4209; font-size:12px; }
.inventory-bulk-tools select { min-height:36px; padding:7px 9px; border:1px solid #e3d9d2; border-radius:7px; background:white; }
.inventory-bulk-tools small { flex-basis:100%; color:var(--muted); font-size:10px; }
.danger-button { min-height:36px; padding:8px 11px; border:1px solid #e4b2aa; border-radius:7px; color:#a33022; background:#fff3f1; font-size:11px; font-weight:800; }
.danger-button:hover { background:#ffe3df; }
.inventory-bulk-tools button:disabled,.inventory-bulk-tools select:disabled { opacity:.55; cursor:not-allowed; }
@media(max-width:1200px) { .monthly-bestseller-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:720px) { .monthly-bestsellers { padding:12px; } .monthly-bestsellers-heading h2 { font-size:16px; } .monthly-bestseller-grid { gap:9px; margin-inline:-12px; } }
@media(min-width:1201px) { .bestseller-image-card { aspect-ratio:1.12; } }
@media (max-width: 420px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-head h1 { font-size: 23px; }
  .catalog-controls select { width: 130px; font-size: 10px; }
}
@media print {
  @page { size: A4; margin: 10mm; }
  body.invoice-page { padding: 0; background: white; }
  .invoice-actions { display: none; }
  .invoice-sheet { width: 100%; min-height: 0; padding: 0; box-shadow: none; }
  body.admin-page > * { visibility:hidden; }
  body.admin-page #monthlySales, body.admin-page #monthlySales * { visibility:visible; }
  body.admin-page #monthlySales { position:absolute; inset:0 auto auto 0; width:100%; margin:0; overflow:visible; border:0; box-shadow:none; }
  body.admin-page #monthlySales .monthly-report-controls, body.admin-page #monthlySales .monthly-report-legend { display:none; }
  body.admin-page #monthlySales .monthly-report-table-wrap { max-height:none; overflow:visible; }
  body.admin-page #monthlySales .monthly-report-table th { position:static; }
  body.admin-page #monthlySales .monthly-report-table { min-width:0; font-size:9px; }
  body.admin-page #monthlySales .monthly-report-items { min-width:0; max-width:none; }
}

.store-footer { margin-top: 24px; color: #353941; background: #fff; border-top: 2px solid var(--orange); }
.store-footer-grid { width: min(1440px, calc(100% - 48px)); margin: 0 auto; padding: 32px 0 28px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(16px, 3vw, 42px); }
.store-footer-column { min-width: 0; }
.store-footer-column h2 { margin: 0 0 13px; color: #252a32; font-size: 12px; font-weight: 850; }
.store-footer-column ul { margin: 0; padding: 0; display: grid; gap: 9px; list-style: none; }
.store-footer-column li { min-width: 0; }
.store-footer-image-wrap { margin: 0 0 14px; }
.store-footer-image-wrap a { display: inline-flex; max-width: 100%; }
.store-footer-image { display: block; width: auto; max-width: min(100%, 190px); max-height: 155px; object-fit: contain; object-position: left center; border: 1px solid #e8e9ec; border-radius: 8px; background: #fff; }
.store-footer-column a, .store-footer-column li > span { color: #737984; font-size: 11px; line-height: 1.55; text-decoration: none; overflow-wrap: anywhere; }
.store-footer-column a:hover, .store-footer-column a:focus-visible { color: #e96300; text-decoration: underline; text-underline-offset: 3px; }
.store-footer-bottom { width: min(1440px, calc(100% - 48px)); min-height: 48px; margin: 0 auto; padding: 12px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid #e8e9ec; color: #858a93; font-size: 10px; }
.store-footer-bottom a { color: #e96300; }
.store-footer-accordion>summary { display:none; }
.store-footer-accordion:not([open])>.store-footer-content { display:block; }
.store-footer-content { min-width:0; }
.footer-editor-grid { padding: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.footer-admin-column { min-width: 0; padding: 14px; border: 1px solid #e8e4e1; border-radius: 11px; background: #fff; }
.footer-column-admin-head { margin-bottom: 13px; display: flex; align-items: center; gap: 9px; }
.footer-column-admin-head > span { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 32px; color: #b84900; background: #fff0e5; border-radius: 9px; font-size: 12px; font-weight: 900; }
.footer-column-admin-head div { display: grid; gap: 2px; }
.footer-column-admin-head b { color: #302b27; font-size: 12px; }
.footer-column-admin-head small { color: #8b837e; font-size: 9px; }
.footer-admin-column > label, .footer-image-editor label, .footer-link-editor-row label { display: grid; gap: 5px; color: #635c58; font-size: 10px; font-weight: 800; }
.footer-admin-column input { width: 100%; min-width: 0; min-height: 36px; padding: 8px 9px; color: var(--ink); background: #fff; border: 1px solid #e0dcd9; border-radius: 7px; font: inherit; font-size: 11px; }
.footer-image-editor { margin-top: 12px; padding: 12px; display: grid; gap: 9px; border: 1px dashed #edb88f; border-radius: 9px; background: #fff9f4; }
.footer-image-editor > b { color: #9e4100; font-size: 11px; }
.footer-image-editor > small { margin-top: -6px; color: #857b74; font-size: 9px; line-height: 1.5; }
.footer-image-preview { min-height: 92px; padding: 8px; display: grid; place-items: center; color: #89827c; border: 1px solid #e9e4df; border-radius: 8px; background: #fff; font-size: 10px; }
.footer-image-preview img { display: block; max-width: 100%; max-height: 150px; object-fit: contain; }
.footer-link-editor-heading { margin-top: 14px; display: flex; align-items: center; gap: 7px; color: #403a35; font-size: 10px; font-weight: 850; }
.footer-link-editor-heading small { color: #8b837e; font-size: 9px; font-weight: 600; }
.footer-link-editor-list { margin: 12px 0 9px; display: grid; gap: 8px; }
.footer-link-editor-row { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.25fr) auto; align-items: end; gap: 7px; }
.footer-link-editor-row .danger-button { min-height: 36px; padding: 7px 9px; }
.footer-add-link { min-height: 34px; padding: 7px 10px; font-size: 10px; }
.footer-editor-actions { padding: 0 16px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.footer-editor-actions small { color: #88817d; font-size: 10px; }
@media(max-width:1000px) { .store-footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media(max-width:720px) { .store-footer-grid { width: calc(100% - 32px); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; padding: 25px 0; } .store-footer-bottom { width: calc(100% - 32px); align-items: flex-start; flex-direction: column; } .footer-editor-grid { grid-template-columns: 1fr; padding: 12px; } .footer-link-editor-row { grid-template-columns: 1fr; } .footer-link-editor-row .danger-button { justify-self: start; } .footer-editor-actions { align-items: flex-start; flex-direction: column; padding: 0 12px 12px; } .footer-disclosure-summary { min-height: 92px; padding: 14px 15px; gap: 12px; } .footer-summary-mark { width: 44px; height: 44px; flex-basis: 44px; border-radius: 12px; } .footer-summary-copy b { font-size: 15px; } .footer-summary-copy .footer-summary-description { display: none; } .footer-summary-count { display: none; } .footer-disclosure-action { gap: 6px; font-size: 9px; } .footer-disclosure-action i { width: 29px; height: 29px; border-radius: 9px; } }
@media(max-width:420px) { .store-footer-grid { grid-template-columns: 1fr; gap: 18px; } }
@media(max-width:720px) {
  .store-footer-grid { width:calc(100% - 28px); grid-template-columns:1fr; gap:0; padding:8px 0 10px; }
  .store-footer-column { border-bottom:1px solid #eceef1; }
  .store-footer-column>summary { min-height:42px; padding:10px 2px; display:flex; align-items:center; justify-content:space-between; gap:12px; color:#30343a; font-size:12px; font-weight:800; cursor:pointer; list-style:none; }
  .store-footer-column>summary::-webkit-details-marker { display:none; }
  .store-footer-column>summary i { width:23px; height:23px; display:grid; place-items:center; color:#9a4a16; background:#fff3e9; border-radius:7px; font-size:15px; font-style:normal; transition:transform .16s ease; }
  .store-footer-column[open]>summary i { transform:rotate(180deg); }
  .store-footer-accordion:not([open])>.store-footer-content { display:none; }
  .store-footer-content { padding:0 2px 12px; }
  .store-footer-content h2 { display:none; }
  .store-footer-bottom { width:calc(100% - 28px); min-height:40px; padding:9px 0; align-items:center; flex-direction:row; gap:8px; font-size:9px; }
  .store-footer { margin-top:15px; }
}
@media(max-width:720px) {
  .admin-panel#inventory > .panel-head { align-items: stretch; flex-direction: column; gap: 13px; padding: 15px; }
  .admin-panel#inventory .inventory-tools, .admin-panel#inventory .admin-search { width: 100%; }
  .inventory-category-area { padding: 12px; }
  .category-manager { margin: 10px 12px 13px; }
}
