:root {
  color-scheme: dark;
  --bg: #17130f;
  --bg-soft: #211a14;
  --panel: #2a2118;
  --panel-2: #32261b;
  --ink: #f8efe0;
  --muted: #ad9d86;
  --gold: #d9b866;
  --gold-light: #f2d692;
  --line: rgba(242, 214, 146, .16);
  --danger: #ef9c8b;
  --ok: #a9d5a0;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at 20% -10%, #3a2817 0, transparent 38%), var(--bg); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { min-height: 100dvh; }
button, input { font: inherit; }
button { cursor: pointer; border: 0; color: inherit; }
.app-shell { width: min(720px, 100%); min-height: 100dvh; margin: 0 auto; padding-bottom: 92px; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 13px; background: rgba(23,19,15,.92); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(242,214,146,.08); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; color: #2a1c0d; background: linear-gradient(145deg, var(--gold-light), var(--gold)); font-weight: 900; font-size: 20px; box-shadow: 0 7px 20px rgba(217,184,102,.2); }
.brand strong { display: block; font-size: 15px; letter-spacing: .01em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.icon-button { width: 38px; height: 38px; border-radius: 50%; background: rgba(242,214,146,.1); color: var(--gold-light); font-size: 21px; }
.screen { padding: 20px 16px 20px; }
.boot, .empty { display: grid; place-items: center; gap: 10px; min-height: 46vh; color: var(--muted); text-align: center; }
.loader { width: 28px; height: 28px; border: 3px solid rgba(242,214,146,.22); border-top-color: var(--gold-light); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero { padding: 20px; border: 1px solid rgba(242,214,146,.22); border-radius: 23px; background: radial-gradient(circle at 95% 0, rgba(242,214,146,.24), transparent 38%), linear-gradient(140deg, #3b2a18, #231a12); box-shadow: 0 18px 45px rgba(0,0,0,.18); }
.hero h1 { margin: 0; font-size: 25px; line-height: 1.15; }
.hero p { margin: 10px 0 0; color: #ddccb0; line-height: 1.5; font-size: 13px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.pill { padding: 6px 10px; border-radius: 999px; color: var(--gold-light); background: rgba(242,214,146,.1); font-size: 11px; font-weight: 700; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 27px 0 12px; }
.section-head h2 { margin: 0; font-size: 18px; }
.section-head button { padding: 5px 0; background: transparent; color: var(--gold-light); font-size: 12px; }
.tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin: 17px 0 14px; }
.tab { padding: 11px 10px; border: 1px solid var(--line); border-radius: 13px; color: var(--muted); background: rgba(255,255,255,.03); font-weight: 700; font-size: 12px; }
.tab.active { color: #2b2114; border-color: transparent; background: linear-gradient(135deg, var(--gold-light), var(--gold)); }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; }
.product-card { padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: rgba(42,33,24,.86); min-height: 155px; display: flex; flex-direction: column; }
.product-card h3 { margin: 0; font-size: 14px; line-height: 1.3; }
.product-card p { min-height: 30px; margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
.price { margin-top: auto; padding-top: 14px; color: var(--gold-light); font-size: 13px; font-weight: 800; }
.counter { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; gap: 7px; margin-top: 10px; }
.counter button { width: 32px; height: 32px; border-radius: 11px; color: var(--gold-light); background: rgba(242,214,146,.12); font-size: 20px; }
.counter span { text-align: center; font-weight: 800; font-size: 13px; }
.primary, .secondary, .danger { width: 100%; padding: 13px 16px; border-radius: 14px; font-weight: 800; font-size: 13px; }
.primary { color: #2a1c0d; background: linear-gradient(135deg, var(--gold-light), var(--gold)); box-shadow: 0 12px 26px rgba(217,184,102,.16); }
.secondary { color: var(--gold-light); background: rgba(242,214,146,.1); border: 1px solid var(--line); }
.danger { color: #ffd0c3; background: rgba(239,156,139,.1); border: 1px solid rgba(239,156,139,.3); }
.button-row { display: flex; gap: 9px; margin-top: 14px; }
.button-row > * { flex: 1; }
.cart-list, .order-list, .admin-list { display: grid; gap: 10px; }
.cart-item, .order-card, .admin-card, .info-card { padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.cart-line, .order-head, .admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cart-line strong, .order-head strong, .admin-head strong { display: block; font-size: 14px; }
.muted { color: var(--muted); font-size: 11px; line-height: 1.45; }
.cart-total { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--gold-light); font-size: 16px; font-weight: 900; }
.order-status { padding: 5px 9px; border-radius: 999px; color: var(--gold-light); background: rgba(242,214,146,.1); white-space: nowrap; font-size: 10px; font-weight: 800; }
.order-status.accepted { color: var(--ok); background: rgba(169,213,160,.1); }
.order-status.rejected { color: var(--danger); background: rgba(239,156,139,.1); }
.order-items { display: grid; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.order-items li { display: flex; justify-content: space-between; gap: 12px; color: #eadfcf; font-size: 12px; }
.order-items li span:last-child { color: var(--gold-light); white-space: nowrap; }
.field { margin-top: 14px; }
.field label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.field input, .field select { width: 100%; padding: 12px 13px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; outline: 0; background: rgba(0,0,0,.16); }
.field input:focus, .field select:focus { border-color: var(--gold); }
.profile-grid { display: grid; gap: 12px; }
.info-card h3 { margin: 0; font-size: 15px; }
.info-card p { margin: 6px 0 0; }
.saved-list { display: grid; gap: 7px; margin-top: 11px; }
.saved-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 11px; border-radius: 11px; background: rgba(255,255,255,.035); color: #efe3cf; font-size: 12px; }
.saved-item.active { color: var(--gold-light); border: 1px solid rgba(242,214,146,.28); }
.saved-item button { padding: 4px 0; background: transparent; color: var(--gold-light); font-size: 11px; }
.admin-card { background: linear-gradient(145deg, rgba(57,42,26,.96), rgba(39,29,20,.96)); }
.admin-card .admin-body { margin-top: 13px; }
.admin-item { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.admin-item:last-child { border-bottom: 0; }
.admin-item small { color: var(--muted); display: block; margin-top: 3px; }
.mini-counter { display: flex; align-items: center; gap: 7px; }
.mini-counter button { width: 28px; height: 28px; border-radius: 9px; color: var(--gold-light); background: rgba(242,214,146,.12); }
.mini-counter b { min-width: 25px; text-align: center; font-size: 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat { padding: 12px 9px; border-radius: 13px; background: rgba(255,255,255,.04); }
.stat b { display: block; color: var(--gold-light); font-size: 17px; }
.stat small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.bottom-nav { position: fixed; z-index: 10; bottom: 0; left: 50%; transform: translateX(-50%); width: min(720px, 100%); display: grid; grid-template-columns: repeat(5, 1fr); padding: 9px 9px calc(9px + env(safe-area-inset-bottom)); background: rgba(29,22,16,.96); border-top: 1px solid rgba(242,214,146,.14); backdrop-filter: blur(20px); }
.nav-item { position: relative; display: grid; justify-items: center; gap: 4px; padding: 2px; color: #877865; background: transparent; font-size: 18px; }
.nav-item small { font-size: 9px; }
.nav-item.active { color: var(--gold-light); }
.badge { position: absolute; top: -4px; right: 22%; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; color: #2a1c0d; background: var(--gold-light); font-size: 9px; text-align: center; line-height: 16px; }
.hidden { display: none !important; }
.search-field { margin: 12px 0 16px; }
.search-field input, .admin-tools input { width: 100%; box-sizing: border-box; }
.stock-note { color: var(--muted, #a79b90); font-size: 12px; margin: 8px 0; }
.product-image { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.product-icon { overflow: hidden; display: block; }
.product-card.disabled { opacity: .58; }
.progress { display: flex; gap: 6px; margin-top: 14px; }
.progress i { height: 4px; flex: 1; border-radius: 4px; background: rgba(255,255,255,.12); }
.progress i.active { background: #e6a45e; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.admin-tools { display: grid; grid-template-columns: 1fr 160px auto auto; gap: 8px; margin: 12px 0 16px; }
.status-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.catalog-admin { display: grid; gap: 10px; margin-bottom: 16px; }
.catalog-row { display: grid; grid-template-columns: 1.4fr repeat(3, .7fr) 1fr auto; align-items: end; gap: 8px; }
.catalog-row small, .catalog-row label { display: block; font-size: 12px; color: var(--muted, #a79b90); }
.catalog-row input { width: 100%; box-sizing: border-box; }
.team-list { display: grid; gap: 10px; margin-bottom: 16px; }
.team-row { display: grid; grid-template-columns: 1fr 180px auto; align-items: center; gap: 10px; padding: 14px; border: 1px solid rgba(242,214,146,.16); border-radius: 14px; background: rgba(255,255,255,.035); }
.team-row small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
@media (max-width: 700px) { .team-row { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .admin-tools, .catalog-row, .field-row { grid-template-columns: 1fr 1fr; } .catalog-row > div { grid-column: 1 / -1; } }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 91px; max-width: calc(100% - 34px); padding: 10px 15px; border-radius: 999px; color: #2a1c0d; background: #f3dfad; opacity: 0; transform: translate(-50%, 14px); pointer-events: none; transition: .2s; font-size: 12px; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.error-box { padding: 20px; border-radius: 18px; color: #ffd2c9; border: 1px solid rgba(239,156,139,.35); background: rgba(239,156,139,.09); text-align: center; }
@media (min-width: 600px) { .screen { padding: 24px 23px 30px; } .product-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }

/* Buyer and seller workspace additions */
.eyebrow { display: block; color: var(--gold); text-transform: uppercase; letter-spacing: .12em; font-size: 9px; font-weight: 900; }
.hero-top, .product-card-top, .seller-hero, .profile-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.role-chip, .selected-label, .verified, .pending-chip { padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.role-chip, .selected-label, .verified { color: var(--ok); background: rgba(169,213,160,.1); }
.pending-chip { color: var(--danger); background: rgba(239,156,139,.1); }
.text-button { padding: 5px 0; color: var(--gold-light); background: transparent; font-size: 12px; }
.section-head h2 { margin-top: 4px; }
.tab small { display: block; margin-top: 3px; color: inherit; opacity: .7; font-size: 9px; font-weight: 500; }
.product-card.selected { border-color: rgba(242,214,146,.48); box-shadow: 0 10px 25px rgba(217,184,102,.09); }
.product-icon { width: 64px; height: 64px; border-radius: 14px; overflow: hidden; display: block; background: rgba(255,255,255,.08); }
.sticky-checkout { position: sticky; bottom: 93px; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px -2px -6px; padding: 10px 11px 10px 15px; border: 1px solid rgba(242,214,146,.28); border-radius: 16px; background: rgba(46,34,21,.95); box-shadow: 0 10px 30px rgba(0,0,0,.25); backdrop-filter: blur(14px); }
.sticky-checkout small, .sticky-checkout strong { display: block; }
.sticky-checkout small { color: var(--muted); font-size: 10px; }
.sticky-checkout strong { margin-top: 2px; color: var(--gold-light); font-size: 16px; }
.sticky-checkout .primary { width: auto; padding: 10px 13px; font-size: 11px; }
.page-heading { margin: 4px 0 20px; }
.page-heading h1, .seller-hero h1, .onboarding-intro h1 { margin: 5px 0 0; font-size: 25px; line-height: 1.1; }
.page-heading p, .seller-hero p, .onboarding-intro p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.total-card, .monthly-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 13px 0; padding: 16px; border: 1px solid rgba(242,214,146,.2); border-radius: 16px; color: var(--gold-light); background: linear-gradient(135deg, rgba(65,45,23,.95), rgba(40,29,19,.95)); }
.total-card strong { font-size: 20px; }
.monthly-card strong { display: block; margin-top: 3px; font-size: 25px; }
.monthly-meta { display: grid; gap: 5px; color: var(--muted); font-size: 10px; text-align: right; }
.checkout-card, .consent-box, .shipment-card { margin-top: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.section-label { display: flex; align-items: center; gap: 10px; }
.section-label strong, .section-label small { display: block; }
.section-label small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.step-number { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 10px; color: #2a1c0d; background: var(--gold-light); font-size: 12px; font-weight: 900; }
.selected-context { margin-top: 13px; padding: 10px 12px; border-radius: 11px; color: var(--muted); background: rgba(255,255,255,.04); font-size: 11px; }
.selected-context strong { color: var(--ink); }
.send-order { margin-top: 16px; }
.send-order:disabled { opacity: .65; cursor: wait; }
.form-hint, .legal-note { color: var(--muted); font-size: 10px; line-height: 1.45; }
.form-error { min-height: 0; margin: 7px 0 0; color: #ffd0c3; font-size: 11px; line-height: 1.4; }
.notice { margin-top: 12px; padding: 10px 12px; border-radius: 11px; font-size: 11px; line-height: 1.4; }
.notice-warning { color: #f2d692; background: rgba(242,214,146,.09); border: 1px solid rgba(242,214,146,.18); }
.empty.compact { min-height: 25vh; }
.empty-icon { margin-bottom: 4px; font-size: 32px; }
.line-total { color: var(--gold-light); font-weight: 800; white-space: nowrap; }
.inline-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.inline-field .secondary { width: auto; padding: 11px 13px; }
.profile-main { align-items: center; flex-wrap: wrap; }
.profile-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: #2a1c0d; background: linear-gradient(135deg, var(--gold-light), var(--gold)); font-size: 20px; font-weight: 900; }
.profile-main > div:nth-child(2) { flex: 1; }
.profile-main h3 { margin: 0; }
.profile-main .verified, .profile-main .pending-chip { margin-left: 52px; }
.ok-text { color: var(--ok); font-size: 12px; }
.seller-entry { display: flex; align-items: center; gap: 11px; width: 100%; padding: 15px; border: 1px solid rgba(242,214,146,.24); border-radius: 17px; color: var(--gold-light); background: rgba(242,214,146,.08); text-align: left; }
.seller-entry > span { font-size: 20px; }
.seller-entry div { flex: 1; }
.seller-entry strong, .seller-entry small { display: block; }
.seller-entry small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.seller-entry b { font-size: 18px; }
.onboarding { max-width: 560px; margin: 0 auto; padding: 5px 3px 20px; }
.onboarding-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 30px; }
.onboarding-brand strong, .onboarding-brand small { display: block; }
.onboarding-brand small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.onboarding-intro { margin-bottom: 20px; }
.onboarding-form { display: grid; gap: 2px; }
.field label em { color: var(--muted); font-style: normal; font-weight: 400; }
.field label span { color: var(--gold-light); }
.consent-box { margin: 12px 0 15px; }
.consent-box > strong { display: block; margin-bottom: 11px; font-size: 13px; }
.check-row { display: flex; align-items: flex-start; gap: 9px; margin: 11px 0; color: #e9ddca; font-size: 11px; line-height: 1.45; }
.check-row input { width: 17px; height: 17px; margin: 0; accent-color: var(--gold); flex: 0 0 auto; }
.check-row button { padding: 0; color: var(--gold-light); background: transparent; text-decoration: underline; font-size: inherit; }
.seller-hero { align-items: flex-start; margin-bottom: 17px; }
.seller-hero p { max-width: 440px; }
.refresh-button { width: 36px; height: 36px; border-radius: 12px; color: var(--gold-light); background: rgba(242,214,146,.1); font-size: 20px; }
.seller-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seller-stat { min-height: 101px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: rgba(42,33,24,.86); }
.seller-stat.accent { border-color: rgba(242,214,146,.38); background: linear-gradient(145deg, rgba(74,52,26,.95), rgba(42,31,19,.95)); }
.seller-stat small, .seller-stat span { display: block; color: var(--muted); font-size: 9px; line-height: 1.3; }
.seller-stat strong { display: block; margin: 8px 0 4px; color: var(--gold-light); font-size: 24px; }
.shipment-card { margin-top: 12px; }
.shipment-list { display: grid; gap: 7px; margin: 15px 0 0; padding: 0; list-style: none; }
.shipment-list li { display: flex; justify-content: space-between; padding-top: 7px; border-top: 1px solid rgba(255,255,255,.06); color: #eadfcf; font-size: 12px; }
.shipment-list li b { color: var(--gold-light); }
.seller-tabs { display: flex; gap: 7px; margin: 22px 0 12px; overflow-x: auto; }
.seller-tab { padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: transparent; white-space: nowrap; font-size: 11px; }
.seller-tab.active { color: #2a1c0d; background: var(--gold-light); border-color: transparent; }
.seller-tab b { margin-left: 5px; }
.admin-context { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; color: var(--muted); font-size: 10px; }
.admin-context span { padding: 5px 7px; border-radius: 8px; background: rgba(255,255,255,.04); }
.external-auth { max-width: 520px; margin: 15vh auto 0; padding: 24px; border: 1px solid rgba(242,214,146,.24); border-radius: 23px; background: linear-gradient(145deg, rgba(57,42,26,.96), rgba(35,26,17,.96)); box-shadow: 0 18px 45px rgba(0,0,0,.2); }
.external-auth h1 { margin: 7px 0 0; font-size: 25px; line-height: 1.1; }
.external-auth > p { margin: 11px 0 0; color: #ddccb0; font-size: 13px; line-height: 1.55; }
.auth-link { display: block; margin-top: 20px; color: #2a1c0d; text-align: center; text-decoration: none; }
