/* SINZAD Basic — brand tokens from the SINZAD color guide */
:root {
  --deep: #0C4A52;      /* أخضر داكن — primary / identity */
  --teal: #2F85A9;      /* أخضر مزرق — interactive */
  --mint: #7EDBC8;      /* أخضر فاتح — confirmation / accents */
  --ink: #12262C;       /* رمادي غامق — text & headings */
  --slate: #64748B;     /* رمادي متوسط — secondary text */
  --line: #E5EAF0;      /* رمادي فاتح — surfaces & dividers */
  --white: #FFFFFF;
  --amber: #D99B2D;     /* non-critical alerts */
  --red: #D24B4B;       /* errors only */

  --bg: #F5F8FA;
  --mint-bg: #EAF7F4;
  --amber-bg: #FFF6E3;
  --red-bg: #FCEDED;
  --blue-bg: #E8F3F8;
  --line-strong: #D3DCE4;
  --grad: linear-gradient(135deg, #0C4A52, #2F85A9);
  --grad-accent: linear-gradient(135deg, #2F85A9, #7EDBC8);

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --shadow: 0 1px 2px rgba(18, 38, 44, .05), 0 1px 3px rgba(18, 38, 44, .06);
  --shadow-lg: 0 12px 32px rgba(18, 38, 44, .16);
  --font: 'IBM Plex Sans Arabic', system-ui, 'Segoe UI', Tahoma, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.6 var(--font); }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--deep); }
h1, h2, h3 { margin: 0; line-height: 1.3; font-weight: 600; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 8px; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: .01em; }
.muted { color: var(--slate); }
.d-block { display: block; }
.grow { flex: 1; }
.center { text-align: center; }
.err { color: var(--red); }
.warn { color: #9A6A12; display: flex; gap: 6px; align-items: center; margin: 8px 0 0; font-size: 13px; }
.sm { font-size: 12px; }
.hint { display: flex; gap: 6px; align-items: center; color: var(--slate); font-size: 12.5px; margin: 12px 0; }
.link { color: var(--teal); background: none; border: 0; padding: 0; display: inline-flex; gap: 4px; align-items: center; font-size: 13px; }

.ic { width: 18px; height: 18px; flex: none; }
.ic.sm { width: 14px; height: 14px; }
.ic.ok { color: #1F8A70; }
.ic.bad { color: var(--red); }

/* ---------- demo bar (role switcher — display tool only) ---------- */
.demobar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 16px; background: var(--amber-bg); border-bottom: 1.5px dashed var(--amber); font-size: 12px; position: relative; z-index: 30; }
.demobar .lbl { color: #7A5410; }
.demobar a, .demobar button { border: 1px solid rgba(217, 155, 45, .5); background: #fff; border-radius: 999px; padding: 2px 10px; color: var(--ink); font-size: 12px; display: inline-flex; gap: 4px; align-items: center; }
.demobar .on { background: var(--deep); border-color: var(--deep); color: #fff; }
.demobar .sep { width: 1px; height: 16px; background: rgba(217, 155, 45, .5); margin: 0 4px; }
.demobar .ic { width: 14px; height: 14px; }

/* ---------- buttons, chips, badges ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid transparent; border-radius: var(--r-sm); padding: 8px 14px; font-weight: 500; font-size: 13.5px; line-height: 1.2; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; text-decoration: none; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--deep); color: #fff; }
.btn.primary:hover { background: #0A3D44; color: #fff; }
.btn.outline { border-color: var(--deep); color: var(--deep); background: #fff; }
.btn.outline:hover { background: var(--mint-bg); }
.btn.ghost { background: transparent; color: var(--deep); border-color: var(--line-strong); }
.btn.ghost:hover { background: #fff; }
.btn.light { background: #fff; color: var(--deep); }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger-outline { border-color: var(--red); color: var(--red); background: #fff; }
.btn.danger-outline:hover { background: var(--red-bg); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn.danger { border: 0; background: none; color: var(--slate); width: 28px; height: 28px; }
.icon-btn.danger:hover { color: var(--red); background: var(--red-bg); }
.dot-count { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; display: grid; place-items: center; font-weight: 600; }

.chip { display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 3px 12px; font-size: 12.5px; background: #fff; color: var(--ink); }
.chip.on { border-color: var(--deep); background: var(--mint-bg); color: var(--deep); }
.chip.removable:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }

.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.tone-amber { background: var(--amber-bg); color: #8A5D0F; border-color: #F1D49C; }
.tone-teal { background: var(--mint-bg); color: var(--deep); border-color: #BFE9DF; }
.tone-mint { background: #E3F6EF; color: #17705A; border-color: #BCE8D7; }
.tone-blue { background: var(--blue-bg); color: #1D6688; border-color: #C3DFEC; }
.tone-red { background: var(--red-bg); color: #A33232; border-color: #F2C4C4; }
.tone-gray { background: #EEF2F6; color: var(--slate); border-color: var(--line); }

/* ---------- inputs ---------- */
.input { width: 100%; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); padding: 8px 10px; background: #fff; }
.input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(47, 133, 169, .15); }
.input[disabled] { background: #F4F6F9; color: #94A3B8; }
.field { display: grid; gap: 4px; margin-bottom: 12px; font-size: 13px; }
.field > span { font-weight: 500; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.err-msg { color: var(--red); font-size: 13px; margin: 0 0 8px; }
.select-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--slate); }
.select-inline select { border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); padding: 5px 8px; background: #fff; color: var(--ink); }
.check { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; cursor: pointer; }
.check input { accent-color: var(--deep); width: 16px; height: 16px; margin: 0; }
.switch { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 34px; height: 18px; border-radius: 9px; background: var(--line-strong); position: relative; transition: background .15s; }
.switch .track::after { content: ''; position: absolute; top: 2px; inset-inline-start: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; }
.switch input:checked + .track { background: var(--deep); }
.switch input:checked + .track::after { inset-inline-start: 18px; }
.switch input:focus-visible + .track { outline: 2px solid var(--teal); outline-offset: 2px; }
.radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--slate); display: inline-block; flex: none; position: relative; }
.radio.on { border-color: var(--deep); }
.radio.on::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--deep); }
.radio-inline { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: 12px; }

/* ---------- layout ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.page { padding: 20px 0 40px; }
.content .page { padding: 20px 24px 40px; }
.page.narrow, .wrap.narrow { max-width: 720px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.sec-head.pad { padding: 14px 16px 0; }
.pad { padding: 14px 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card.dashed { border: 1.5px dashed var(--line-strong); box-shadow: none; }
.card.inset { box-shadow: none; background: #FAFBFC; padding: 12px; display: grid; gap: 6px; margin: 12px 0; }
.card h3 { margin-bottom: 10px; }
.stack { display: grid; gap: 14px; align-content: start; }
.stack.sm { gap: 8px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.crumbs { font-size: 12.5px; color: var(--slate); margin-bottom: 12px; }
.crumbs a { color: var(--slate); }
.crumbs a:hover { color: var(--teal); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13.5px; }
.kv > span { color: var(--slate); }

.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: var(--deep); }
.logo img { height: 28px; width: auto; }
.logo.sm { font-size: 15px; } .logo.sm img { height: 22px; }
.logo.light { color: #fff; }

/* ---------- popover (notifications) ---------- */
.pop-wrap { position: relative; }
.popover { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: 300px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); z-index: 40; overflow: hidden; }
.pop-head { padding: 10px 14px; font-weight: 600; border-bottom: 1px solid var(--line); }
.pop-item { display: grid; gap: 2px; padding: 9px 14px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 13px; }
.pop-item small { color: var(--slate); }
.pop-item.unread { background: var(--mint-bg); }
.pop-item:hover { background: #F7FAFB; }
.pop-empty { padding: 16px; color: var(--slate); text-align: center; }

/* ================= CLINIC PORTAL ================= */
.c-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.c-row { display: flex; align-items: center; gap: 16px; height: 62px; }
.c-tools { display: flex; align-items: center; gap: 8px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; color: var(--ink); background: #fff; max-width: 260px; }
.chip-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--deep); color: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13px; }
.cart-btn:hover { color: #fff; background: #0A3D44; }
.cart-btn b { background: var(--mint); color: var(--deep); border-radius: 999px; min-width: 20px; height: 20px; display: grid; place-items: center; font-size: 12px; padding: 0 5px; }
.c-navbar { border-top: 1px solid var(--line); }
.c-nav { display: flex; gap: 22px; height: 44px; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.c-nav a { display: flex; align-items: center; color: var(--ink); font-size: 14px; border-bottom: 2.5px solid transparent; white-space: nowrap; }
.c-nav a:hover { color: var(--teal); }
.c-nav a.on { color: var(--teal); border-bottom-color: var(--mint); font-weight: 600; }
.head-search { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 0 14px; height: 40px; background: #F9FBFC; color: var(--slate); }
.head-search:focus-within { border-color: var(--teal); background: #fff; }
.head-search input { border: 0; outline: 0; background: none; flex: 1; height: 100%; min-width: 0; color: var(--ink); }
.c-main { min-height: 60vh; }
.c-footer { border-top: 1px solid var(--line); background: #fff; padding: 18px 0; font-size: 13px; }
.c-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.c-footer a { color: var(--slate); }
.bottom-nav { display: none; }

/* hero (1a) */
.hero { background: radial-gradient(circle at 15% 20%, rgba(126, 219, 200, .35), transparent 45%), linear-gradient(180deg, #EAF7F4, #F5FBFA); border-bottom: 1px solid var(--line); }
.hero-in { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 44px 20px 36px; }
.hero h1 { font-size: 32px; color: var(--deep); }
.hero p { color: var(--slate); max-width: 560px; margin: 0; }
.search.big { display: flex; width: min(680px, 100%); background: #fff; border: 2px solid var(--deep); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-lg); margin-top: 6px; }
.search.big select { border: 0; border-inline-end: 1px solid var(--line); padding: 0 12px; background: #fff; max-width: 150px; }
.search.big input { flex: 1; border: 0; padding: 14px; outline: 0; min-width: 0; }
.search.big .btn { border-radius: 0; padding: 0 22px; }
.search:not(.big):not(.head-search) { display: flex; flex: 1; border: 2px solid var(--deep); border-radius: var(--r); overflow: hidden; background: #fff; }
.search:not(.big):not(.head-search) input { flex: 1; border: 0; padding: 10px 12px; outline: 0; min-width: 0; }
.search:not(.big):not(.head-search) .btn { border-radius: 0; }
.popular { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; font-size: 12.5px; color: var(--slate); }

.cat-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; margin-bottom: 26px; }
.cat-grid.big { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cat-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 6px; display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--ink); font-size: 13px; box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.cat-tile:hover { border-color: var(--mint); transform: translateY(-2px); color: var(--deep); }
.cat-grid.big .cat-tile { padding: 22px 10px; }
.cat-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--mint-bg); color: var(--deep); }
.cat-ic .ic { width: 24px; height: 24px; }
.cat-ic.sm { width: 28px; height: 28px; border-radius: 8px; } .cat-ic.sm .ic { width: 16px; height: 16px; }
.cat-endo, .cat-surgical { background: var(--blue-bg) !important; color: #1D6688 !important; }
.cat-ortho, .cat-equipment { background: #EEF0FA !important; color: #4A5594 !important; }
.cat-sterilization, .cat-consumables { background: #E3F6EF !important; color: #17705A !important; }
.cat-impression { background: #FFF3E0 !important; color: #8A5D0F !important; }

.sec-head h2 { font-size: 18px; }
.p-grid { display: grid; gap: 14px; margin-bottom: 24px; }
.p-grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.p-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pcard { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: grid; gap: 6px; align-content: start; box-shadow: var(--shadow); color: var(--ink); transition: border-color .12s, box-shadow .12s; }
.pcard:hover { border-color: var(--mint); box-shadow: 0 6px 18px rgba(12, 74, 82, .08); }
.pc-link { display: grid; gap: 4px; color: var(--ink); }
.pc-link:hover { color: var(--deep); }
.pc-name { font-size: 14px; font-weight: 600; line-height: 1.35; }
.pc-meta { min-height: 18px; }
.pc-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.pc-price { font-weight: 700; color: var(--deep); font-size: 15px; }
.fav { position: absolute; top: 18px; inset-inline-end: 18px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: var(--slate); display: grid; place-items: center; box-shadow: var(--shadow); }
.fav.on, .fav-lg.on { color: var(--red); }
.fav.on .ic, .fav-lg.on .ic { fill: currentColor; }
.pcard.row { grid-template-columns: 72px 1fr; gap: 10px; align-items: center; }
.pcard.row .pc-body { display: grid; gap: 1px; }
.pcard.row .pc-name { font-size: 13px; }
.pcard.row .pc-price { font-size: 13.5px; }

.thumb { position: relative; height: 130px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(145deg, #F1F7F9, #E3EEF2); color: rgba(12, 74, 82, .45); overflow: hidden; }
.thumb .ic { width: 46px; height: 46px; stroke-width: 1.3; }
.thumb::before { content: ''; position: absolute; width: 140%; height: 70%; bottom: -30%; inset-inline-start: -20%; background: radial-gradient(ellipse, rgba(126, 219, 200, .35), transparent 70%); }
.thumb-sku { position: absolute; bottom: 6px; inset-inline-end: 8px; font: 10px var(--mono); color: rgba(12, 74, 82, .5); direction: ltr; }
.thumb.sm { height: 72px; } .thumb.sm .ic { width: 30px; height: 30px; } .thumb.sm .thumb-sku { display: none; }
.thumb.xs { height: 48px; width: 48px; border-radius: 6px; flex: none; } .thumb.xs .ic { width: 22px; height: 22px; } .thumb.xs .thumb-sku { display: none; }
.thumb.xl { height: 340px; } .thumb.xl .ic { width: 110px; height: 110px; stroke-width: 1; }
.thumb.cat-endo, .thumb.cat-surgical { background: linear-gradient(145deg, #EEF6FA, #DCEBF3) !important; }
.thumb.cat-ortho, .thumb.cat-equipment { background: linear-gradient(145deg, #F2F3FB, #E2E5F4) !important; }
.thumb.cat-sterilization, .thumb.cat-consumables { background: linear-gradient(145deg, #EEF9F4, #DDF1E8) !important; }
.thumb.cat-impression { background: linear-gradient(145deg, #FFF8EE, #F8EBD6) !important; }

.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.trust > div { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.trust .ic { width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: var(--mint-bg); color: var(--deep); }
.trust small { color: var(--slate); display: block; }

/* 1b catalog */
.catalog { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.cat-side { display: grid; gap: 4px; padding: 12px; position: sticky; top: 124px; }
.cat-side a { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--r-sm); color: var(--ink); font-size: 13.5px; }
.cat-side a:hover { background: var(--mint-bg); color: var(--deep); }
.catalog-main { display: grid; gap: 14px; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--grad); color: #fff; border-radius: var(--r-lg); padding: 24px 28px; overflow: hidden; position: relative; }
.banner small { color: var(--mint); }
.banner h2 { font-size: 22px; margin: 4px 0; }
.banner p { color: rgba(255, 255, 255, .85); }
.banner-ic { width: 110px !important; height: 110px !important; color: rgba(126, 219, 200, .5); stroke-width: 1 !important; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.p-grid.rows { margin-bottom: 8px; }

/* 1c dashboard */
.dash-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 16px; }
.dash-head > div:first-child { min-width: 240px; }
.kpis { display: grid; gap: 12px; margin-bottom: 16px; }
.kpis.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 2px; color: var(--ink); box-shadow: var(--shadow); border-inline-start: 3px solid var(--mint); }
.kpi:hover { border-color: var(--mint); color: var(--ink); }
.kpi small { color: var(--slate); font-size: 12.5px; }
.kpi b { font-size: 24px; color: var(--deep); font-weight: 700; line-height: 1.2; }
.dash-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; margin-bottom: 14px; }
.dash-grid.rev { grid-template-columns: 1fr 1.4fr; }
.list { display: grid; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.list-row:first-child { border-top: 0; }
.note-row { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); color: var(--ink); font-size: 13px; }
.note-row:first-of-type { border-top: 0; }

/* 1d search */
.search-layout { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: start; }
.filter-side { position: sticky; top: 124px; max-height: calc(100vh - 140px); overflow: auto; }
.filters fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 10px 0; }
.filters legend { font-weight: 600; font-size: 13px; padding: 0 0 4px; float: right; width: 100%; }
.filters legend + * { clear: both; }
.range { display: flex; align-items: center; gap: 6px; }
.range input { width: 100%; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); padding: 5px 8px; }
.opt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.opt-chip { display: inline-flex; cursor: pointer; }
.opt-chip input { position: absolute; opacity: 0; pointer-events: none; }
.opt-chip span { border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); padding: 4px 12px; font-size: 13px; background: #fff; color: var(--ink); }
.opt-chip input:checked + span, .opt-chip.on span { border-color: var(--deep); background: var(--mint-bg); color: var(--deep); font-weight: 600; }
.opt-chip input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.opt-chip.disabled span { border-style: dashed; color: #A0AEC0; text-decoration: line-through; }
.only-sheet, .show-sm { display: none; }
.results-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.results-head h1 { font-size: 18px; margin-inline-end: 6px; }
.pager { display: flex; gap: 6px; justify-content: center; }
.pager a { min-width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; color: var(--ink); }
.pager a.on { background: var(--deep); border-color: var(--deep); color: #fff; }
.pcard.skel { min-height: 240px; }
.sk { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #EDF1F5 25%, #F7F9FB 50%, #EDF1F5 75%); background-size: 200% 100%; animation: shimmer 1.1s infinite linear; }
.sk-img { height: 120px; margin-bottom: 6px; }
.sk.w60 { width: 60%; } .sk.w40 { width: 40%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { display: grid; justify-items: center; gap: 8px; padding: 40px 20px; text-align: center; color: var(--slate); }
.empty > .ic { width: 40px; height: 40px; color: var(--mint); }
.empty b { color: var(--ink); font-size: 16px; }

/* 1e product */
.pdp { display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px; margin-bottom: 24px; }
.gallery { display: grid; gap: 10px; align-content: start; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.thumbs > span { border: 1.5px solid var(--line); border-radius: 8px; padding: 3px; }
.thumbs > span.on { border: 2px solid var(--deep); }
.thumbs .thumb.xs { width: 100%; height: 56px; }
.pdp-info { display: grid; gap: 12px; align-content: start; }
.pdp-info h1 { font-size: 26px; }
.en { color: var(--slate); text-align: right; margin-top: -8px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--slate); font-size: 13px; }
.opt-row { display: grid; gap: 6px; }
.opt-row b { font-size: 13px; }
.buy-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.buy-row .btn.grow { flex: 1 1 260px; padding: 11px 14px; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; overflow: hidden; }
.stepper button { border: 0; background: none; width: 34px; height: 40px; display: grid; place-items: center; color: var(--deep); }
.stepper button:hover { background: var(--mint-bg); }
.stepper input, .stepper span { width: 46px; text-align: center; border: 0; border-inline: 1px solid var(--line); height: 40px; line-height: 40px; outline: 0; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper.sm button { width: 28px; height: 30px; } .stepper.sm span { width: 34px; height: 30px; line-height: 30px; }
.stepper .ic { width: 14px; height: 14px; }
.fav-lg { width: 42px; height: 42px; }
.sum-line { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; background: #F7FAFB; border-radius: var(--r-sm); padding: 8px 12px; }
.offers { margin-bottom: 8px; }
.offers .sec-head { flex-wrap: wrap; }
.offers h2 small { font-weight: 400; font-size: 14px; }
.offers-table tr[data-act] { cursor: pointer; }
.offers-table tr[data-act]:hover td { background: #F7FBFA; }
.offers-table tr.on td { background: var(--mint-bg); }
.offers-table tr.disabled td { color: #A0AEC0; background: #FAFBFC; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 13.5px; }
.specs dt { color: var(--slate); }
.specs dd { margin: 0; }

/* tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; }
.table th { text-align: start; font-weight: 600; color: var(--slate); background: #F6F8FA; padding: 10px 12px; font-size: 12.5px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td .mono, .table td b { white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.actions { text-align: end; white-space: nowrap; }
.table td.actions .btn + .btn { margin-inline-start: 6px; }
.card > .table-wrap { border: 1px solid var(--line); border-radius: var(--r-sm); }
.card.flush > .table-wrap, .card.flush .table-wrap { border: 0; border-radius: 0; }
.qty-input { width: 100px; padding: 5px 8px; }
.form-foot { display: flex; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); background: #FAFBFC; }

/* alerts */
.alert { display: flex; align-items: center; gap: 10px; border-radius: var(--r-sm); padding: 10px 14px; font-size: 13.5px; margin-bottom: 14px; border: 1.5px solid var(--line-strong); background: #fff; }
.alert.amber { border-color: var(--amber); background: var(--amber-bg); }
.alert.red { border-color: #EBB3B3; background: var(--red-bg); color: #8E2B2B; }
.alert.mint { border-color: var(--mint); background: var(--mint-bg); color: var(--deep); }
.alert.sm { padding: 6px 10px; font-size: 12.5px; margin: 8px 0; }

/* 1f cart */
.cart-layout { display: grid; grid-template-columns: 1fr 280px; gap: 16px; align-items: start; }
.group { padding: 0; overflow: hidden; }
.group-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; background: var(--mint-bg); border-bottom: 1px solid #CDEBE3; }
.group-head small { display: inline-flex; gap: 4px; align-items: center; }
.cart-line { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.cart-line a { color: var(--ink); }
.cart-line .line-total { min-width: 80px; text-align: end; }
.cart-line s { color: var(--slate); }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 0; margin: 0; padding: 12px 16px; font-size: 13.5px; }
.totals dd { margin: 0; text-align: end; font-variant-numeric: tabular-nums; padding-inline-start: 12px; white-space: nowrap; }
.totals .total { font-weight: 700; font-size: 15px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.card > .totals { padding: 12px 0 0; }
.card.group > .totals { padding: 12px 16px; }
.group-foot { padding: 0 16px 16px; display: grid; gap: 6px; }
.how { position: sticky; top: 124px; display: grid; gap: 8px; font-size: 13.5px; border-style: dashed; }
.how p { display: flex; gap: 6px; }
.how .ic { color: #1F8A70; margin-top: 4px; }
.how-total { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; }

/* 1g checkout */
.co-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-bottom: 16px; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; align-items: center; gap: 6px; border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 3px 12px 3px 4px; font-size: 13px; color: var(--slate); background: #fff; }
.steps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--line); font-size: 12px; }
.steps li.on { border-color: var(--deep); color: var(--deep); font-weight: 600; }
.steps li.on span { background: var(--deep); color: #fff; }
.steps li.done { border-color: var(--mint); color: var(--deep); }
.steps li.done span { background: var(--mint); color: var(--deep); }
.co-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.co-main { display: grid; gap: 12px; }
.co-sum { position: sticky; top: 124px; display: grid; gap: 8px; }
.co-sum .totals { padding: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice { display: grid; gap: 4px; justify-items: start; text-align: start; border: 1.5px solid var(--line-strong); border-radius: var(--r); padding: 12px; background: #fff; }
.choice.on { border: 2px solid var(--deep); background: var(--mint-bg); }
.choice small { color: var(--slate); }
.choice.add { place-items: center; border-style: dashed; color: var(--teal); }
.choice.row { display: flex; align-items: center; gap: 10px; width: 100%; }
.choice.row input[type=radio] { accent-color: var(--deep); }
.choice.row .input { flex: 1; padding: 4px 8px; }
.review-addr { display: flex; align-items: center; gap: 12px; background: #F7FAFB; border-radius: var(--r-sm); padding: 10px 12px; }
.sim-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: var(--amber-bg); border: 1.5px dashed var(--amber); border-radius: var(--r-sm); padding: 8px 12px; font-size: 13px; }
.sim-box b { display: inline-flex; align-items: center; gap: 4px; }
.result { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 26px 16px; border-radius: var(--r); }
.result.ok { border: 1.5px solid var(--mint); background: var(--mint-bg); }
.result.fail { border: 1.5px solid var(--red); background: var(--red-bg); }
.result b { font-size: 17px; }
.result p { color: var(--slate); max-width: 440px; }
.r-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 700; }
.result.ok .r-ic { background: var(--mint); color: var(--deep); }
.result.fail .r-ic { border: 2px solid var(--red); color: var(--red); }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* orders */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs a { padding: 8px 12px; color: var(--slate); border-bottom: 2.5px solid transparent; margin-bottom: -1px; font-size: 13.5px; }
.tabs a small { background: #EEF2F6; border-radius: 999px; padding: 0 7px; font-size: 11.5px; }
.tabs a.on { color: var(--deep); border-bottom-color: var(--deep); font-weight: 600; }
.tabs a.on small { background: var(--mint-bg); }
.tabs.inline { border: 0; margin: 0; }
.tabs.inline a { border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 4px 12px; margin: 0; background: #fff; }
.tabs.inline a.on { border: 2px solid var(--deep); background: var(--mint-bg); }
.order-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.order-head h1 { font-size: 20px; }
.progress { display: flex; list-style: none; padding: 0; margin: 0 0 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 10px; overflow-x: auto; }
.progress li { flex: 1; display: grid; justify-items: center; gap: 6px; font-size: 12.5px; color: var(--slate); position: relative; min-width: 80px; text-align: center; }
.progress li::before { content: ''; position: absolute; top: 11px; inset-inline-start: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.progress li:last-child::before { display: none; }
.progress li span { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--line-strong); display: grid; place-items: center; z-index: 1; color: #fff; }
.progress li.done::before { background: var(--mint); }
.progress li.done span { background: var(--mint); border-color: var(--mint); color: var(--deep); }
.progress li.on { color: var(--deep); font-weight: 600; }
.progress li.on span { background: var(--deep); border-color: var(--deep); }
.detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; align-items: start; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 13px; }
.timeline li { display: flex; gap: 10px; position: relative; }
.timeline .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--deep); margin-top: 6px; flex: none; box-shadow: 0 0 0 3px var(--mint-bg); }
.timeline li:not(:last-child)::after { content: ''; position: absolute; top: 18px; bottom: -12px; inset-inline-start: 4.5px; width: 1px; background: var(--line); }

.lists-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 24px; }
.lists-grid .btn.block { margin-top: 10px; }
.sup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.sup-card { display: flex; gap: 12px; align-items: center; }
.sup-av { width: 48px; height: 48px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 20px; font-weight: 700; flex: none; }
.sup-side { display: grid; justify-items: center; gap: 2px; text-align: center; }
.sup-side b { font-size: 20px; color: var(--deep); }

/* ================= SUPPLIER & ADMIN SHELL ================= */
.app-shell { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 37px); }
.side { display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-brand { display: grid; gap: 2px; padding: 0 6px 14px; }
.side-brand small { font-size: 12px; }
.side nav { display: grid; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 14px; position: relative; }
.side .count { margin-inline-start: auto; background: var(--amber); color: #fff; border-radius: 999px; min-width: 20px; height: 20px; display: grid; place-items: center; font-size: 11.5px; padding: 0 6px; }
.side.dark { background: linear-gradient(180deg, #0C4A52, #0A3E45); color: #fff; }
.side.dark .side-brand small { color: var(--mint); }
.side.dark nav a { color: rgba(255, 255, 255, .82); }
.side.dark nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side.dark nav a.on { background: #fff; color: var(--deep); font-weight: 600; }
.side-help { margin-top: auto; display: flex; gap: 8px; align-items: center; padding: 10px; border-radius: 8px; color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .06); font-size: 13px; }
.side.light { background: #fff; border-inline-end: 1px solid var(--line); }
.side.light .side-brand small { color: var(--slate); }
.side.light .group { font-size: 11.5px; color: var(--slate); padding: 12px 10px 4px; font-weight: 600; letter-spacing: .02em; }
.side.light nav a { color: var(--ink); padding: 7px 10px; font-size: 13.5px; }
.side.light nav a:hover { background: #F4F7F9; }
.side.light nav a.on { background: var(--mint-bg); color: var(--deep); font-weight: 600; }
.side.light nav a.on::before { content: ''; position: absolute; inset-inline-start: -12px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: var(--deep); }
/* 1j: icon-only sidebar */
.app-shell.compact { grid-template-columns: 68px 1fr; }
.app-shell.compact .side { padding: 14px 10px; align-items: center; }
.app-shell.compact .side-brand { padding: 0 0 12px; justify-items: center; }
.app-shell.compact .side-brand small, .app-shell.compact .logo span, .app-shell.compact nav a span, .app-shell.compact .side-help span { display: none; }
.app-shell.compact nav a { justify-content: center; padding: 10px; }
.app-shell.compact .side .count { position: absolute; top: 0; inset-inline-end: -2px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
.shell-main, .side { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 0 24px; height: 62px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 15; }
.top-search { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 0 14px; height: 38px; width: min(380px, 50%); color: var(--slate); background: #F9FBFC; }
.top-search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; width: 100%; height: 100%; }
.top-search:focus-within { border-color: var(--teal); background: #fff; }
.who { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.who small { display: block; color: var(--slate); font-size: 11.5px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--grad-accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.role-switch { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--teal); color: var(--teal); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px; }
.role-switch select { border: 0; background: none; color: var(--teal); font-weight: 600; outline: 0; }

/* 1i action panel */
.action-panel { border: 2px solid var(--amber); background: var(--amber-bg); border-radius: var(--r); padding: 14px; margin-bottom: 16px; }
.action-panel h3 { display: flex; align-items: center; gap: 6px; color: #7A5410; }
.action-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #F1E2C3; border-radius: var(--r-sm); padding: 9px 12px; margin-top: 6px; font-size: 13.5px; }
.action-row .mono { min-width: 76px; }
.action-row b { min-width: 76px; text-align: end; }

/* 1j board */
.board { display: grid; grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.col { background: #EEF3F6; border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 320px; transition: background .12s, border-color .12s; }
.col header { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; }
.count-pill { background: #fff; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 8px; font-size: 12px; }
.col footer { margin-top: auto; text-align: center; font-size: 12px; }
.col.can-drop { border: 2px dashed var(--mint); background: #F0FAF7; }
.col.over.can-drop { background: var(--mint-bg); }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: grid; gap: 4px; font-size: 13px; cursor: grab; box-shadow: var(--shadow); }
.kcard.dragging { opacity: .5; }
.kcard .btn { margin-top: 4px; }
.seg { display: inline-flex; border: 1.5px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: #fff; }
.seg a { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; color: var(--slate); font-size: 13px; }
.seg a.on { background: var(--mint-bg); color: var(--deep); font-weight: 600; }

/* 1k */
.state-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; margin-bottom: 14px; font-size: 12.5px; }
.state-chain span { border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 2px 10px; color: var(--slate); }
.state-chain span.done { border-color: var(--mint); color: var(--deep); background: var(--mint-bg); }
.state-chain span.on { border-color: var(--deep); background: var(--deep); color: #fff; font-weight: 600; }
.state-chain i { color: #A0AEC0; font-style: normal; }
.state-chain small { margin-inline-start: 6px; }

/* admin 1l */
.queue-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink); margin-bottom: 6px; font-size: 13.5px; }
.queue-row:hover { border-color: var(--mint); background: #F8FCFB; }
.queue-row b.amber { color: var(--amber); font-size: 16px; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid line { stroke: var(--line); }
.chart .grid text, .chart .ax { fill: var(--slate); font-size: 11px; font-family: var(--font); }
.chart .line { fill: none; stroke: var(--teal); stroke-width: 2.5; stroke-linejoin: round; }
.chart .area { fill: rgba(47, 133, 169, .1); }
.chart circle { fill: #fff; stroke: var(--teal); stroke-width: 2; }

/* admin 1m inbox */
.inbox { display: grid; grid-template-columns: 290px 1fr; min-height: 440px; }
.inbox-list { border-inline-end: 1px solid var(--line); padding: 10px; display: grid; gap: 6px; align-content: start; background: #FAFBFC; }
.inbox-list a { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink); background: #fff; font-size: 13.5px; }
.inbox-list a.on { border: 2px solid var(--deep); background: var(--mint-bg); }
.inbox-detail { padding: 18px 20px; }
.review { display: grid; gap: 4px; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.kv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kv-box { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; display: grid; gap: 2px; font-size: 13.5px; }
.doc { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.decide { border: 1.5px dashed var(--line-strong); border-radius: var(--r); padding: 12px; margin: 4px 0 8px; }
.decide .field { margin-bottom: 4px; }

/* admin 1n lanes */
.lanes { display: grid; grid-template-columns: 96px repeat(7, minmax(110px, 1fr)); gap: 8px; overflow-x: auto; margin-bottom: 12px; padding: 10px 8px 4px; }
.lane-h { background: var(--deep); color: #fff; border-radius: var(--r-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 600; font-size: 14px; }
.lane-h:hover { color: var(--mint); }
.step { position: relative; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); padding: 10px 6px; font-size: 12.5px; text-align: center; display: grid; place-items: center; min-height: 64px; background: #fff; color: var(--ink); }
.step:hover { border-color: var(--teal); color: var(--deep); }
.step.empty { border: 1px dashed var(--line); background: transparent; }
.step .count { position: absolute; top: -8px; inset-inline-end: -6px; background: var(--amber); color: #fff; border-radius: 999px; min-width: 20px; height: 20px; font-size: 11.5px; display: grid; place-items: center; padding: 0 5px; }

/* ---------- modal / sheet / toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(18, 38, 44, .45); display: grid; place-items: center; padding: 20px; z-index: 100; animation: fade .15s; }
.modal { width: min(480px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.modal.wide { width: min(640px, 100%); }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 16px 18px; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: #FAFBFC; }
.overlay.as-sheet { place-items: end center; padding: 0; }
.as-sheet .modal { width: 100%; max-width: 520px; border-radius: 18px 18px 0 0; max-height: 85vh; animation: up .2s; }
.grabber { width: 40px; height: 4px; border-radius: 2px; background: #CBD5E1; margin: 8px auto 0; }
.as-sheet .only-sheet { display: flex; margin-top: 12px; position: sticky; bottom: 0; }
.as-sheet .filters .sec-head h3 { display: none; }
fieldset.docs { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; margin: 0 0 8px; }
fieldset.docs legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); } }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 200; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; border-radius: 999px; padding: 9px 16px; font-size: 13.5px; box-shadow: var(--shadow-lg); animation: up .2s; transition: opacity .3s; }
.toast.tone-ok .ic { color: var(--mint); }
.toast.tone-err { background: #7E2424; }
.toast.out { opacity: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .kpis.g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app-shell, .app-shell.compact { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; align-items: center; padding: 8px 12px; overflow-x: auto; gap: 8px; }
  .side-brand { padding: 0; display: flex; }
  .side-brand small, .side-help, .side.light .group { display: none; }
  .side nav { display: flex; gap: 4px; }
  .side nav a { white-space: nowrap; padding: 6px 10px; }
  .app-shell.compact nav a span { display: inline; }
  .side.light nav a.on::before { display: none; }
  .topbar { padding: 0 16px; }
  .content .page { padding: 16px; }
  .p-grid.g4, .p-grid.g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-layout, .catalog, .cart-layout, .co-layout, .detail-grid, .dash-grid, .dash-grid.rev, .pdp, .two-col, .inbox { grid-template-columns: 1fr; }
  .filter-side, .cat-side { display: none; }
  .show-sm { display: inline-flex; }
  .how, .co-sum, .cat-side { position: static; }
  .inbox-list { border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .thumb.xl { height: 240px; }
  .kpis.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .wrap { padding: 0 14px; }
  .c-row { height: auto; flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .head-search { order: 3; flex-basis: 100%; max-width: none; }
  .c-navbar, .hide-sm, .c-footer { display: none; }
  .cart-btn span { display: none; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); z-index: 25; padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 8px 0; font-size: 11px; color: var(--slate); }
  .bottom-nav a.on { color: var(--teal); }
  .c-main { padding-bottom: 70px; }
  .hero-in { padding: 26px 14px; }
  .hero h1 { font-size: 24px; }
  .search.big select { display: none; }
  .search.big .btn span { display: none; }
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .cat-tile { font-size: 11.5px; padding: 10px 4px; }
  .cat-ic { width: 38px; height: 38px; }
  .cat-grid.big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust { grid-template-columns: 1fr; }
  .p-grid { gap: 10px; }
  .pcard { padding: 8px; }
  .thumb { height: 96px; }
  .pcard .btn { font-size: 12px; padding: 6px; }
  .pc-foot { flex-wrap: wrap; }
  .kpis.g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi b { font-size: 20px; }
  .choice-grid, .form-grid, .kv-grid { grid-template-columns: 1fr; }
  .banner { padding: 18px; } .banner-ic { display: none; }
  .top-search { width: auto; flex: 1; min-width: 0; }
  .topbar { gap: 8px; padding: 0 12px; }
  .topbar > .grow { display: none; }
  .who div, .role-switch span { display: none; }
  .board { grid-template-columns: repeat(5, 78vw); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .lanes { grid-template-columns: 80px repeat(7, 120px); }
  .cart-line { flex-wrap: wrap; }
  .action-row { flex-wrap: wrap; }
  .action-row .grow { flex-basis: calc(100% - 90px); }
  .action-row .btn { margin-inline-start: auto; }
  .cart-line .grow { flex-basis: calc(100% - 100px); }
  /* tables become cards */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--line); padding: 8px 12px; }
  .table td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: end; }
  .table td[data-label]::before { content: attr(data-label); color: var(--slate); font-size: 12px; text-align: start; }
  .table td[data-label=""]::before { display: none; }
  .table td.actions { justify-content: flex-start; padding-top: 6px; }
  .offers-table td:first-child { display: none; }
  .demobar { font-size: 11px; padding: 6px 10px; }
  .demobar .lbl:not(:first-child), .demobar .flowlink { display: none; }
  #toasts { bottom: 80px; width: calc(100% - 28px); }
  .toast { border-radius: var(--r); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
