/* Store admin, modelled on the Shopify admin (Polaris). Local to this project. */
:root {
  --bg: #f1f1f1; --surface: #fff; --sidebar: #ebebeb; --topbar: #1a1a1a; --text: #303030; --sub: #616161; --muted: #8a8a8a;
  --line: #e3e3e3; --line-2: #cfcfcf; --primary: #303030; --primary-h: #1a1a1a; --focus: #005bd3; --link: #005bd3;
  --green-bg: #cdfee1; --green: #0c5132; --yellow-bg: #ffef9d; --yellow: #5e4200; --blue-bg: #a4e8f2; --blue: #00444f; --grey-bg: #e3e3e3; --grey: #4a4a4a; --red-bg: #fed3d1; --red: #8e1f0b; --orange-bg: #ffd6a4; --orange: #5f3500;
  --r: 12px; --r-sm: 8px; --sh: 0 1px 0 0 rgba(26, 26, 26, .07), 0 0 0 1px rgba(26, 26, 26, .05) inset;
  --f: 'Inter', -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 13px/20px var(--f); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; } a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
svg { width: 20px; height: 20px; flex: none; fill: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

/* top bar */
.top { position: fixed; inset: 0 0 auto 0; height: 56px; background: var(--topbar); color: #fff; display: grid; grid-template-columns: 240px 1fr 240px; align-items: center; padding-inline: 16px; z-index: 50; gap: 12px; }
.top .logo { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.top .logo i { width: 28px; height: 28px; border-radius: 7px; background: #E9C9A3 url('../assets/logo-brown.png') center/70% no-repeat; display: block; }
.search { position: relative; max-width: 560px; margin-inline: auto; width: 100%; }
.search input { width: 100%; height: 34px; border-radius: 8px; border: 0; background: #303030; color: #fff; padding: 0 12px 0 36px; font: inherit; }
.search input::placeholder { color: #b5b5b5; }
.search input:focus { background: #fff; color: var(--text); outline: 0; } .search input:focus + svg { color: #616161; }
.search svg { position: absolute; left: 10px; top: 8px; width: 18px; height: 18px; color: #b5b5b5; pointer-events: none; }
.top .right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.top .ib { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: none; border: 0; color: #e3e3e3; }
.top .ib:hover { background: #303030; }
.acct { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px; border-radius: 8px; background: none; border: 0; color: #fff; }
.acct:hover { background: #303030; }
.acct b { width: 24px; height: 24px; border-radius: 6px; background: #E9C9A3; color: #5A2510; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.acct span { font-size: 12.5px; font-weight: 550; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* sidebar */
.side { position: fixed; inset: 56px auto 0 0; width: 240px; background: var(--sidebar); padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; overflow: auto; z-index: 40; }
.nav a, .nav .nav-soon { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 8px; border-radius: 8px; color: #303030; font-weight: 450; font-size: 13px; text-decoration: none; }
.nav a:hover { background: rgba(0, 0, 0, .06); text-decoration: none; }
.nav a.on { background: #fff; font-weight: 650; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .06); }
.nav a svg { color: #616161; } .nav a.on svg { color: #303030; }
.nav .n { margin-inline-start: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: #dedede; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }
.nav h6 { margin: 16px 8px 4px; font-size: 12px; font-weight: 550; color: #616161; }
.side .foot { margin-top: auto; padding-top: 8px; }

/* page */
.main { margin: 56px 0 0 240px; padding: 20px 28px 80px; }
.page { max-width: 1040px; margin-inline: auto; }
.page.wide { max-width: 1280px; }
.ph { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; min-height: 32px; }
.ph h1 { font-size: 20px; line-height: 28px; font-weight: 650; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.ph .acts { display: flex; gap: 8px; align-items: center; }
.back { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: none; border: 0; }
.back:hover { background: rgba(0, 0, 0, .06); }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 8px; border: 0; background: linear-gradient(#fff, #fafafa); color: var(--text); font-weight: 550; font-size: 12.5px; box-shadow: 0 -1px 0 0 rgba(0, 0, 0, .17) inset, 0 0 0 1px rgba(0, 0, 0, .08) inset, 0 1px 0 0 rgba(204, 204, 204, .5) inset; }
.btn:hover { background: #f3f3f3; } .btn:active { background: #ebebeb; }
.btn.pri { background: linear-gradient(#303030, #1a1a1a); color: #fff; box-shadow: 0 1px 0 1px rgba(48, 48, 48, 1) inset, 0 0 0 1px rgba(255, 255, 255, .06) inset; }
.btn.pri:hover { background: #1a1a1a; }
.btn.crit { color: #8e1f0b; }
.btn.lg { height: 36px; padding: 0 16px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.plain { background: none; box-shadow: none; padding: 0 8px; } .btn.plain:hover { background: rgba(0, 0, 0, .06); }

.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--sh); margin-bottom: 16px; overflow: hidden; }
.card > .pad, .card .pad { padding: 16px; }
.card h2 { font-size: 13px; font-weight: 650; }
.card .ch { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 0; gap: 8px; }
.card .ch.line { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.muted { color: var(--sub); } .small { font-size: 12px; } .right { text-align: right; } .bold { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px 0 6px; border-radius: 10px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--grey-bg); color: var(--grey); }
.badge.g { background: var(--green-bg); color: var(--green); } .badge.y { background: var(--yellow-bg); color: var(--yellow); } .badge.b { background: var(--blue-bg); color: var(--blue); } .badge.r { background: var(--red-bg); color: var(--red); } .badge.o { background: var(--orange-bg); color: var(--orange); }
.badge svg { width: 12px; height: 12px; }
.badge.plainb { padding: 0 8px; }

/* tabs + toolbar */
.tabs { display: flex; gap: 2px; padding: 6px 8px 0; border-bottom: 1px solid var(--line); overflow: auto; }
.tabs button { height: 32px; padding: 0 10px; border: 0; background: none; border-radius: 8px 8px 0 0; color: var(--sub); font-weight: 550; position: relative; white-space: nowrap; }
.tabs button:hover { background: rgba(0, 0, 0, .04); }
.tabs button.on { color: var(--text); background: none; }
.tabs button.on::after { content: ""; position: absolute; inset: auto 6px -1px 6px; height: 2px; background: var(--text); border-radius: 2px; }
.tools { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.tools .f { position: relative; flex: 1; }
.tools .f input { width: 100%; height: 28px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 8px 0 30px; font: inherit; background: #fff; }
.tools .f input:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: transparent; }
.tools .f svg { position: absolute; left: 8px; top: 5px; width: 18px; height: 18px; color: #616161; }
select.sel, .field select, .field input, .field textarea { font: inherit; }
select.sel { height: 28px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; padding: 0 24px 0 8px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23616161' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; font-weight: 550; }

/* table */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 550; font-size: 12px; color: var(--sub); padding: 8px 12px; background: #f7f7f7; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { cursor: pointer; } tbody tr:hover td { background: #fafafa; }
td.r, th.r { text-align: right; }
.cb { width: 16px; height: 16px; border: 1px solid #8a8a8a; border-radius: 4px; background: #fff; display: inline-block; vertical-align: middle; }
.thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: #f1f1f1; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08) inset; flex: none; }
.thumb.ph2 { display: grid; place-items: center; background: #E9C9A3 url('../assets/logo-brown.png') center/60% no-repeat; }
img.thumb[src*="assets/products/"] { object-fit: contain; background: #f6ecdc; padding: 2px; }
.pcell { display: flex; align-items: center; gap: 12px; font-weight: 550; }
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.empty { text-align: center; padding: 48px 16px; color: var(--sub); }
.empty h3 { color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* forms */
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field label { font-weight: 450; font-size: 13px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #8a8a8a; border-radius: 8px; padding: 6px 12px; min-height: 32px; background: #fff; color: var(--text); }
.field input:hover, .field textarea:hover, .field select:hover { background: #fafafa; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.field textarea { min-height: 92px; resize: vertical; }
.field .hint { color: var(--sub); font-size: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pre { display: flex; } .pre span { display: grid; place-items: center; padding: 0 10px; border: 1px solid #8a8a8a; border-inline-end: 0; border-radius: 8px 0 0 8px; background: #f7f7f7; color: var(--sub); } .pre input { border-radius: 0 8px 8px 0; }
.lang-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.lang-tabs button { height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; font-weight: 550; }
.lang-tabs button.on { background: #303030; color: #fff; border-color: #303030; }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle i { width: 36px; height: 20px; border-radius: 10px; background: #8a8a8a; position: relative; transition: background .2s; flex: none; }
.toggle i::after { content: ""; position: absolute; inset: 2px auto 2px 2px; width: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + i { background: #303030; } .toggle input:checked + i::after { transform: translateX(16px); }
.toggle input:focus-visible + i { outline: 2px solid var(--focus); outline-offset: 2px; }

/* metrics */
.metric { padding: 12px 16px; border-inline-end: 1px solid var(--line); cursor: default; }
.metric:last-child { border-inline-end: 0; }
.metric .l { color: var(--sub); border-bottom: 1px dashed var(--line-2); display: inline-block; font-weight: 450; }
.metric .v { font-size: 20px; line-height: 28px; font-weight: 650; margin-top: 4px; letter-spacing: -.01em; }
.metric .d { font-size: 12px; color: var(--sub); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.d .up { color: #0c5132; } .d .dn { color: #8e1f0b; }
.spark { width: 100%; height: 34px; margin-top: 6px; }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: #1a1a1a; color: #fff; padding: 6px 10px; border-radius: 8px; font-size: 12px; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .1s; z-index: 5; }
.bars .b { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-bottom: 12px; }
.bars .b .t { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: #f1f1f1; overflow: hidden; } .bars .b .t i { display: block; height: 100%; background: #5A2510; border-radius: 4px; }
.bars .b .n { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* setup guide */
.guide .it { display: flex; gap: 12px; padding: 10px 16px; align-items: flex-start; border-top: 1px solid var(--line); }
.guide .ck { width: 20px; height: 20px; border-radius: 50%; border: 2px dashed #8a8a8a; flex: none; margin-top: 1px; display: grid; place-items: center; }
.guide .it.done .ck { background: #303030; border: 0; color: #fff; } .guide .it.done .ck svg { width: 12px; height: 12px; }
.guide .it b { font-weight: 550; } .guide .it.done b { color: var(--sub); text-decoration: line-through; }
.progress { height: 6px; background: #e3e3e3; border-radius: 4px; overflow: hidden; width: 120px; } .progress i { display: block; height: 100%; background: #303030; }

/* timeline */
.tl { position: relative; padding-inline-start: 22px; }
.tl .e { position: relative; padding-bottom: 14px; }
.tl .e::before { content: ""; position: absolute; left: -16px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: #8a8a8a; }
.tl .e::after { content: ""; position: absolute; left: -12.5px; top: 16px; bottom: -6px; width: 1px; background: var(--line-2); }
.tl .e:last-child::after { display: none; }
.tl .e time { color: var(--sub); font-size: 12px; }
.comment { display: flex; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.comment input { flex: 1; height: 32px; border: 1px solid #8a8a8a; border-radius: 8px; padding: 0 12px; font: inherit; }

/* save bar */
.savebar { position: fixed; inset: 0 0 auto 0; height: 56px; z-index: 80; background: #1a1a1a; color: #fff; display: none; align-items: center; justify-content: space-between; padding-inline: 16px 20px; }
.savebar.on { display: flex; }
.savebar b { display: flex; align-items: center; gap: 8px; font-weight: 550; }
.savebar .btn { height: 32px; }

/* modal + toast */
.mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 90; display: none; place-items: center; padding: 16px; }
.mask.on { display: grid; }
.dlg { background: #fff; border-radius: 16px; width: 100%; max-width: 480px; box-shadow: 0 12px 24px rgba(0, 0, 0, .25); overflow: hidden; }
.dlg .h { padding: 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); font-weight: 650; font-size: 14px; }
.dlg .b { padding: 16px; } .dlg .f { padding: 12px 16px; background: #f7f7f7; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: #1a1a1a; color: #fff; padding: 10px 16px; border-radius: 10px; opacity: 0; transition: .25s; z-index: 100; pointer-events: none; font-weight: 500; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.banner { display: flex; gap: 10px; padding: 12px 16px; border-radius: var(--r); background: #ffefd6; color: #5f3500; margin-bottom: 16px; align-items: flex-start; }
.banner.blue { background: #e0f5fa; color: #00444f; }
.banner b { font-weight: 650; }
.notice { font-size: 12px; color: var(--sub); text-align: center; margin-top: 24px; }
.link { color: var(--link); background: none; border: 0; padding: 0; cursor: pointer; } .link:hover { text-decoration: underline; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; }
.kv .t { font-weight: 650; }

.burger { display: none !important; }
@media (max-width: 1000px) {
  .top { grid-template-columns: 1fr auto; } .top .search { display: none; }
  .side { transform: translateX(-100%); transition: transform .25s; } body.menu .side { transform: none; }
  .main { margin-left: 0; padding: 16px 12px 80px; }
  .cols, .grid2 { grid-template-columns: minmax(0, 1fr); } .grid4 { grid-template-columns: 1fr 1fr; } .metric { border-bottom: 1px solid var(--line); }
  .burger { display: grid !important; }
  .card { overflow-x: auto; }
}

.chart .dot{visibility:hidden}.chart.hov .dot{visibility:visible}
.main,.page{min-width:0}

/* online store nav */
.nav .orow { position: relative; display: flex; }
.nav .orow > a:first-child { flex: 1; }
.nav .orow .eye { position: absolute; right: 4px; top: 4px; width: 24px; height: 24px; padding: 0; justify-content: center; gap: 0; }
.nav .orow .eye svg { width: 16px; height: 16px; }
.nav .sub { display: none; padding-inline-start: 28px; } .nav .sub.open { display: block; }
.nav .sub a { height: 28px; font-size: 13px; padding-inline-start: 14px; position: relative; }
.nav .sub a.on { background: rgba(0,0,0,.06); box-shadow: none; }
.login { min-height: 70vh; display: grid; place-items: center; }
.login .card { width: min(380px, 92vw); }
body.signed-out #side, body.signed-out .savebar { display: none; }
