:root {
  color-scheme: light;
  --paper: #f6f5f1;
  --surface: #fffefa;
  --ink: #231e1a;
  --quiet: #666159;
  --line: #e7e2d9;
  --accent: #98442f;
  --accent-dark: #74301f;
  --terracotta: #f4e5df;
  --green: #355a43;
  --blue: #3c5577;
  --round: 16px;
  --shadow: 0 7px 24px #4938270a;
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --display: Georgia, "Times New Roman", serif;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
h1,h2,h3,p { margin: 0; }
h1 { font: 500 clamp(2rem,5vw,3.15rem)/1.04 var(--display); letter-spacing: -.035em; }
h2 { font-size: 1.1rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; }
a { color: inherit; text-decoration: none; }
input,select,textarea,button { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid #ab604a; outline-offset: 3px; }
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 2rem/.95 var(--display); letter-spacing: -.09em; }
.brand-icon { background: var(--accent); color: #fff9f0; border-radius: 11px; display: grid; place-items: center; width: 37px; height: 37px; }
.brand-dot { color: var(--accent); }
.btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border: 1px solid transparent; border-radius: 9px; font-size: .88rem; font-weight: 650; white-space: nowrap; }
.btn .icon { width: 16px; height: 16px; }
.primary { color: white; background: var(--accent); }
.primary:hover:not(:disabled) { background: var(--accent-dark); }
.secondary { border-color: var(--line); background: #efece6; }
.ghost { border-color: var(--line); background: var(--surface); }
.ghost:hover:not(:disabled),.secondary:hover:not(:disabled) { background: #f0e9df; }
.text-btn { border: 0; padding: 5px 3px; color: var(--accent-dark); background: transparent; font-weight: 650; font-size: .87rem; }
.text-btn:hover { text-decoration: underline; }
.danger { color: #a32727; }
.icon-btn { width: 35px; height: 35px; padding: 0; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); flex: none; }
.icon-btn:hover:not(:disabled) { background: var(--terracotta); }
.icon-btn .icon { width: 17px; height: 17px; }
.muted,.quiet { color: var(--quiet); }
.initial,.error-page { padding: 2rem; }
.error-page > * + * { margin-top: 1.2rem; }
.field { display: grid; gap: 5px; font-size: .86rem; font-weight: 650; min-width: 0; }
.field input,.field select,.field textarea,.search-field input { min-width: 0; width: 100%; border: 1px solid #dcd5ca; background: var(--surface); padding: 9px 11px; min-height: 42px; border-radius: 8px; font-weight: 400; }
.field textarea { resize: vertical; }
.field-grid,.check-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
form:not(.filters) { display: grid; gap: 13px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; font-size: .88rem; }
input[type=checkbox],input[type=radio] { accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
fieldset { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
legend { font-weight: 650; padding: 0 5px; }
legend small { color: var(--quiet); font-weight: 400; margin-inline-start: 5px; }
.form-error { font-size: .88rem; color: #a32727; }
.form-error:empty { display: none; }
.form-actions { display: flex; justify-content: end; }
.callout,.instruction { background: #f9eee3; padding: 10px 13px; border-radius: 8px; }
.badge { display: inline-flex; border-radius: 999px; padding: 3px 9px; font-weight: 650; font-size: .75rem; background: #eeeae3; white-space: nowrap; }
.badge.active,.badge.delivered,.badge.ready,.badge.available,.badge.configured { background: #e5eee2; color: #2e583b; }
.badge.received,.badge.trial,.badge.pending,.badge.running,.badge.outdated { background: #f8edda; color: #775111; }
.badge.suspended,.badge.expired,.badge.failed,.badge.unavailable,.badge.unconfigured { background: #f7e2dd; color: #8a3327; }

.landing { width: min(1200px,100%); margin: 0 auto; padding: 0 clamp(20px,5vw,64px) 38px; }
.landing > header { display: flex; justify-content: space-between; align-items: center; min-height: 92px; border-bottom: 1px solid var(--line); }
.landing-grid { min-height: 520px; display: grid; grid-template-columns: 1.07fr 1fr; align-items: center; gap: 5vw; padding-block: 42px; }
.landing-grid h1 { font-size: clamp(3rem,7vw,6.9rem); line-height: .95; }
.landing-grid p { max-width: 37ch; color: var(--quiet); font-size: 1.14rem; margin: 1.4rem 0; }
.landing-art { height: 100%; min-height: 290px; display: grid; place-items: center; border-radius: 32px; background: var(--workspace-gradient); position: relative; overflow: hidden; }
.plate { width: 64%; aspect-ratio: 1; border-radius: 50%; background: var(--surface); padding: 10%; box-shadow: -12px 17px 34px #18304735, inset 0 0 0 8px #e1efef; transform: rotate(-19deg); }
.plate > div { width: 100%; height: 100%; border-radius: 50%; border: 1px solid #b7cfd5; background: radial-gradient(ellipse at 42% 49%,#d3eee7 0 8%,transparent 9%), radial-gradient(ellipse at 61% 53%,var(--accent-dark) 0 10%,transparent 11%), radial-gradient(ellipse at 57% 38%,var(--blue) 0 18%,transparent 19%), var(--surface-subtle); }
.fork,.knife { position: absolute; width: 5px; height: 49%; border-radius: 4px; background: #496d7c; rotate: -15deg; top: 27%; }
.fork { left: 12%; }
.knife { right: 12%; width: 8px; }
.fork::before { content: ""; background: repeating-linear-gradient(90deg,#496d7c 0 2px,transparent 2px 5px); width: 17px; height: 22px; top: -18px; left: -6px; position: absolute; border-radius: 4px; }
.landing-features { border-top: 1px solid var(--line); padding-top: 26px; display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.landing-features .icon { color: var(--accent); }
.landing-features h2 { margin: 7px 0 3px; }
.landing-features p { color: var(--quiet); }

.auth-shell { display: grid; grid-template-columns: minmax(320px,.9fr) minmax(440px,1.1fr); min-height: 100svh; }
.auth-aside { background: linear-gradient(150deg,var(--ink),var(--accent-dark)); color: var(--surface); padding: clamp(24px,5vw,72px); position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-height: 440px; }
.auth-aside .brand-dot { color: #a2e3cc; }
.auth-aside .brand-icon { background: #d3eee7; color: var(--accent-dark); }
.auth-intro { margin-top: clamp(50px,13vh,150px); position:relative; z-index:1; }
.auth-intro > span { font-size: .7rem; letter-spacing: .16em; font-weight: 700; }
.auth-intro h1 { font-size: clamp(3rem,6.2vw,6rem); margin-block: 12px 18px; }
.auth-intro p { font-size: 1.05rem; max-width: 28ch; color: #d3eee7; }
.auth-foot { position:relative; z-index:1; color: #d3eee7; font-size: .84rem; }
.auth-decoration { position: absolute; width: 76%; aspect-ratio: 1; inset-block-end: -28%; inset-inline-end: -14%; border: 1px solid #d3eee755; border-radius: 50%; display: grid; place-items: center; }
.auth-decoration div { position: absolute; width: 82%; aspect-ratio: 1; border: 1px solid #d3eee755; border-radius: 50%; }
.auth-decoration div:nth-child(2) { width: 64%; }
.auth-decoration div:nth-child(3) { width: 46%; }
.auth-main { display: grid; place-items: center; padding: 32px clamp(20px,6vw,80px); }
.auth-content { width: min(100%,460px); }
.auth-back { display: inline-block; margin-bottom: 28px; font-size: .86rem; }
.auth-content h1 { margin-bottom: 10px; }
.auth-content form { margin-block: 24px 16px; }
.auth-content .form-actions .btn { width: 100%; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; font-size: .87rem; }
.auth-links a { color: var(--quiet); }
:is(.auth-shell,.landing) :focus-visible { outline-color: var(--blue); }
.auth-aside :focus-visible { outline-color: #a2e3cc; }
:is(.auth-shell,.landing) .ghost:hover:not(:disabled), .auth-shell .callout { background: var(--surface-subtle); }

.auth-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block-end: 16px; }
.auth-topline .auth-back { margin-block-end: 0; }
.workspace-language { display: inline-flex; }
.workspace-language select { min-block-size: 42px; max-inline-size: 7.5rem; border: 1px solid var(--line); border-radius: 8px; padding-inline: 8px; background: var(--surface); }
:root[lang="fa"] { --font: Tahoma, "Noto Sans Arabic", system-ui, sans-serif; --display: var(--font); }
:root[lang="fa"] :is(h1,h2,.auth-intro > span) { letter-spacing: normal; }
:root[lang="fa"] :is(input[type="email"],input[type="url"],input[name="slug"],input[name="timezone"],input[name="price"]) { direction: ltr; text-align: start; }

.workspace { display: grid; grid-template-columns: 235px minmax(0,1fr); min-height:100vh; }
.sidebar { display: flex; flex-direction: column; gap: 20px; height: 100svh; position: sticky; top: 0; background: var(--workspace-gradient); border-inline-end: 1px solid #a8c9d6; padding: 23px 15px 15px; }
.sidebar-brand { padding-inline: 9px; }
.workspace-name { display: flex; gap: 9px; align-items: center; background: #ffffffa6; box-shadow: inset 0 0 0 1px #85aeb266; padding: 9px; border-radius: 10px; min-width: 0; }
.workspace-name strong,.identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; font-size: .87rem; }
.workspace-name > div,.identity > div { min-width: 0; }
.workspace-name small,.identity small { display: block; font-size: .74rem; color: var(--quiet); }
.workspace-icon,.avatar { flex: none; display: grid; place-items: center; width: 33px; height: 33px; border-radius: 8px; background: #d3eee7; color: var(--accent-dark); }
.avatar { border-radius: 50%; font-weight: 700; }
.side-nav { display: grid; align-content: start; gap: 4px; overflow-y: auto; }
.side-nav a,.public-link { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid transparent; border-radius: 9px; color: #183b4e; font-size: .86rem; font-weight: 560; }
.side-nav .icon,.public-link .icon { width: 17px; height: 17px; }
.side-nav a:hover,.public-link:hover { background: #ffffffa6; }
.side-nav a[aria-current=page] { background: #fff; border-color: #7daabc; border-inline-start: 3px solid var(--accent); padding-inline-start: 9px; color: #0c534b; }
.sidebar .brand-dot { color: #246fa5; }
.sidebar .identity { border-color: #94bacb; }
.sidebar .identity button { background: #ffffffa6; border-color: #91b6c8; }
.side-nav a b { border-radius: 9px; padding: 0 6px; background: var(--accent); color: white; margin-inline-start: auto; font-size: .72rem; }
.side-bottom { margin-top: auto; }
.identity { display: flex; gap: 9px; align-items: center; border-top: 1px solid var(--line); padding: 13px 3px 0; margin-top: 7px; }
.identity button { margin-inline-start: auto; }
.topbar { min-height: 65px; padding: 10px clamp(16px,4vw,44px); border-bottom: 1px solid var(--line); background: var(--surface); display: flex; justify-content: space-between; gap: 14px; align-items: center; font-size: .88rem; color: var(--quiet); }
.topbar strong { color: var(--ink); }
.topbar i { padding-inline: 5px; font-style: normal; }
.top-actions,.head-actions,.row-actions,.pager { display:flex; align-items:center; flex-wrap: wrap; gap: 8px; }
.page-content { max-width: 1510px; margin: 0 auto; padding: 32px clamp(16px,4vw,44px) 50px; }
.page-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 14px; margin-bottom: 21px; }
.page-head p { color: var(--quiet); margin-top: 8px; }
body:has(:is(.workspace,.landing,.auth-shell)) {
  --paper: #f7f4eb;
  --surface: #fff;
  --ink: #183047;
  --quiet: #4c6070;
  --line: #cdd8df;
  --accent: #087857;
  --accent-dark: #085944;
  --green: #168263;
  --blue: #246fa5;
  --surface-subtle: #f0f6fa;
  --workspace-gradient: linear-gradient(160deg,#edf5fa,#c0efdc 54%,#badcf6);
  --shadow: 0 2px 3px #1830470b, 0 8px 22px #18304709;
  background: var(--paper);
  color: var(--ink);
}
.workspace :is(th,.secondary,.empty-icon) { background: var(--surface-subtle); }
:is(.workspace,.auth-shell) .field :is(input, select, textarea) { border-color: var(--line); }
.workspace :focus-visible { outline-color: var(--blue); }
.workspace-main { min-width: 0; }
body:has(.workspace.platform) {
  --brand-soft: #E3C9B9;
  --brand-muted: #C38469;
  --brand-secondary: #B7785E;
  --divider: #D5D0CA;
  --text-muted: #98938A;
  --success-strong: #398061;
  --warning: #D4A451;
  --warning-strong: #BE9341;
  --error: #B44B40;
  --inactive: #C7C2B9;
  --disabled: #B8B4AC;
  --chart-1: var(--accent);
  --chart-2: var(--green);
  --chart-3: var(--warning);
  --chart-4: var(--blue);
  --chart-5: var(--brand-secondary);
  --chart-6: #9A9E72;
  --chart-7: #C79A74;
  --chart-8: #8C7897;
  --chart-9: var(--inactive);
}
.platform tr + tr > td { border-color: var(--divider); }
.platform button:disabled { border-color: var(--disabled); }
.platform .badge { background: var(--surface-subtle); color: var(--ink); }
.platform .badge:is(.active,.delivered,.ready,.available,.configured,.ok,.running,.healthy) {
  background: color-mix(in srgb, var(--green) 18%, var(--surface));
  border: 1px solid var(--success-strong);
}
.platform .badge:is(.received,.trial,.pending,.outdated,.medium,.needs-attention) {
  background: color-mix(in srgb, var(--warning) 25%, var(--surface));
  border: 1px solid var(--warning-strong);
}
.platform .badge:is(.suspended,.expired,.failed,.unavailable,.unconfigured,.offline,.high,.at-risk) {
  background: color-mix(in srgb, var(--error) 14%, var(--surface));
  border: 1px solid var(--error);
}
.platform .bar-list[data-series] > :nth-child(9n+1) { --bar: var(--chart-1); }
.platform .bar-list[data-series] > :nth-child(9n+2) { --bar: var(--chart-2); }
.platform .bar-list[data-series] > :nth-child(9n+3) { --bar: var(--chart-3); }
.platform .bar-list[data-series] > :nth-child(9n+4) { --bar: var(--chart-4); }
.platform .bar-list[data-series] > :nth-child(9n+5) { --bar: var(--chart-5); }
.platform .bar-list[data-series] > :nth-child(9n+6) { --bar: var(--chart-6); }
.platform .bar-list[data-series] > :nth-child(9n+7) { --bar: var(--chart-7); }
.platform .bar-list[data-series] > :nth-child(9n+8) { --bar: var(--chart-8); }
.platform .bar-list[data-series] > :nth-child(9n+9) { --bar: var(--chart-9); }
.platform .bar-list [data-stage="detected"] { --bar: var(--accent); }
.platform .bar-list [data-stage="qualified"] { --bar: var(--brand-secondary); }
.platform .bar-list [data-stage="contacted"] { --bar: var(--chart-7); }
.platform .bar-list [data-stage="negotiation"] { --bar: var(--chart-6); }
.platform .bar-list [data-stage="successful"] { --bar: var(--green); }
.platform .bar-list [data-stage="lost"], .platform .bar-list [data-stage="expired"] { --bar: var(--error); }
.platform .bar-list [data-stage="active"] { --bar: var(--green); }
.platform .bar-list [data-stage="trial"] { --bar: var(--warning); }
.platform .bar-list :is([data-stage="inactive"],[data-stage="cancelled"]) { --bar: var(--inactive); }
.platform progress::-webkit-progress-value { background: var(--bar, var(--accent)); }
.platform progress::-moz-progress-bar { background: var(--bar, var(--accent)); }
.platform progress::-webkit-progress-bar { background: var(--surface-subtle); }
.platform { font-variant-numeric: tabular-nums; }
.support-banner { margin: 16px clamp(16px,4vw,44px) 0; padding: 10px; border-radius: 8px; background: #fbebce; }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 13px; }
.stat,.card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--round); box-shadow: var(--shadow); min-width: 0; }
.stat { padding: 15px; display: grid; gap: 4px; align-content: start; border-block-start: 3px solid var(--green); }
.stat:has(.stat-icon.blue) { border-block-start-color: var(--blue); }
.stat:has(.stat-icon.amber) { border-block-start-color: #e7a336; }
.stat-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 9px; background: #e7eee3; color: var(--green); margin-bottom: 4px; }
.stat-icon.amber { background: #f7ebd9; color: #7a521d; }
.stat-icon.blue { background: #e9edf6; color: var(--blue); }
.stat span { color: var(--quiet); font-size: .82rem; }
.stat strong { font: 500 1.85rem/1.12 var(--display); overflow-wrap: anywhere; }
.compact .stat-icon { display: none; }
.chart-grid,.table-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; margin-top: 16px; }
.chart { padding: 17px; }
.bar-list { display: grid; gap: 10px; margin-top: 13px; max-height: 350px; overflow: auto; }
.bar-row { display:grid; grid-template-columns: minmax(70px,1fr) minmax(38px,1fr) minmax(22px,auto); gap: 9px; align-items: center; font-size: .83rem; }
.bar-row span { overflow-wrap: anywhere; }
progress { appearance:none; width:100%; height:.6rem; }
progress::-webkit-progress-bar { background:#eeeae2; border-radius: 20px; }
progress::-webkit-progress-value { background:var(--accent); border-radius: 20px; }
progress::-moz-progress-bar { background:var(--accent); border-radius: 20px; }
.empty { min-height: 142px; display:grid; gap: 5px; justify-items:center; align-content:center; padding:16px; text-align:center; }
.empty-icon { display:grid; place-items:center; width:42px;height:42px; border-radius:13px;background:#f1ece3;color:var(--quiet); margin-bottom:3px; }
.empty p,.empty-line { color: var(--quiet); font-size: .87rem; }
.empty-line { padding: 12px 0; }
.retry-section { display: block; margin: 0 auto 15px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 14px; }
.filters .field { flex: 1 1 125px; max-width: 280px; }
.report-filters { padding: 0 0 16px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; text-align: start; width:100%; font-size: .86rem; }
th { text-align: start; background: #f5f2ec; font-size: .76rem; color: var(--quiet); white-space: nowrap; }
th,td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td small { display: block; color: var(--quiet); }
.pager { padding: 10px; justify-content: end; }
.card.editor { max-width: 800px; padding: 20px; }
.editor h2:not(:first-child) { margin-top: 8px; }
.section-card { padding-top: 14px; margin-bottom: 12px; }
.section-card > h2,.section-card > p { margin: 0 14px 12px; }
.catalog-list,.catalog-products { display:grid; gap: 12px; }
.catalog-category { padding: 14px; }
.catalog-category header,.table-card-head,.option-heading { display: flex; justify-content: space-between; gap: 8px; align-items:center; flex-wrap: wrap; }
.group-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.drag-handle { color: var(--quiet); cursor: grab; }
.dragging { opacity: .45; }
.order-arrow { width: 27px; height: 27px; }
.catalog-products { margin-top: 10px; gap: 0; }
.catalog-product { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding-block: 10px; border-top: 1px solid var(--line); }
.thumbnail { width: 49px; height: 49px; object-fit:cover; border-radius: 9px; flex: none; }
.thumbnail.blank { display: grid; place-items: center; background: #f1ede5; color: var(--quiet); }
.product-copy { flex: 1 0 130px; min-width: 0; }
.product-copy small { display:block; color: var(--quiet); overflow-wrap: anywhere; }
.group-config,.option-line { display:grid; align-items: end; gap: 8px; grid-template-columns: minmax(90px,2fr) minmax(65px,1fr) minmax(55px,.6fr) auto; }
.option-line { margin-block: 7px; }
.option-line .check { align-self: center; }
.config-group + .config-group { margin-top: 10px; }
.translation-field small { color: var(--quiet); }
.table-card { padding: 15px; }
.table-card h2 { margin-block: 8px 2px; }
.table-card p { color: var(--quiet); margin-bottom: 10px; }
.qr-modal { display:grid; justify-items: start; gap: 8px; }
.qr-modal img { justify-self:center; }
.qr-modal label { width: 100%; }
.service-status { color: var(--quiet); }

dialog { border: 1px solid var(--line); border-radius: 18px; padding: 19px; max-width: min(540px,calc(100vw - 24px)); width: 100%; max-height: calc(100dvh - 28px); overflow-y: auto; background: var(--surface); color: var(--ink); box-shadow: 0 22px 72px #2c1e1a55; }
dialog.wide { max-width: min(750px,calc(100vw - 24px)); }
dialog::backdrop { background: #26191174; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 14px; }
.modal-head h2 { font: 500 1.75rem/1.05 var(--display); overflow-wrap: anywhere; }
.modal-head ~ p { margin-bottom: 12px; }
.notices { position: fixed; z-index: 10; inset-inline-end: 16px; bottom: 16px; display: grid; gap: 5px; }
.notice { border-radius: 10px; background: #2f4633; color: white; padding: 10px 15px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.notice.error { background: #8e3527; }
.receipt,.management-dialog { display: grid; gap: 12px; }
.receipt article { display:flex; justify-content:space-between; align-items:start; gap:12px; border-top:1px solid var(--line); padding-block: 9px; }
.receipt article p { color:var(--quiet); font-size:.87rem; overflow-wrap:anywhere; }
.receipt-number { font:500 2.5rem/1 var(--display); color:var(--accent); }
.total { display:flex; justify-content:space-between; border-top:1px solid var(--line); padding-block:11px 0; gap:10px; }
.restaurant-meta { color:var(--quiet); }
.restaurant-meta strong { color: var(--ink); }

.customer-page,.customer-dialog {
  --menu-paper: #faf4ea;
  --menu-surface: #fffdf8;
  --menu-ink: #30232a;
  --menu-muted: #64555b;
  --menu-rule: #e8d8ca;
  --menu-dark: #311b28;
  --menu-wine: #632d44;
  --menu-wine-dark: #4b1f33;
  --cart-option-active: #fff3e7;
  --menu-serif: Baskerville, "Palatino Linotype", Palatino, Georgia, serif;
  color: var(--menu-ink);
}
.customer-page { min-height: 100svh; background: var(--menu-paper); }
.customer-width { width: min(100%, 1192px); padding-inline: clamp(18px, 4vw, 42px); margin-inline: auto; }
.customer-top { border-bottom: 1px solid var(--menu-wine-dark); background: var(--menu-wine); color: #fff8ee; }
.customer-top-content,.customer-top-actions,.restaurant-identity {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 17px);
}
.customer-top-content { justify-content: space-between; min-height: 64px; padding-block: 9px; }
.customer-top-actions { flex: 0 0 auto; align-items: center; flex-wrap: wrap; justify-content: flex-end; max-inline-size: 55%; }
.restaurant-identity { min-inline-size: 0; font: 500 clamp(1.02rem, 2.2vw, 1.45rem)/1.12 var(--menu-serif); }
.restaurant-name { display: grid; justify-items: start; gap: 5px; overflow-wrap: anywhere; }
.restaurant-logo { inline-size: 34px; block-size: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.restaurant-logo.placeholder { display: grid; place-items: center; background: #eae3d3; color: var(--menu-dark); }
.menu-sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.public-language { position: relative; }
.public-language summary {
  display: flex;
  align-items: center;
  gap: 5px;
  min-block-size: 34px;
  max-inline-size: 8.5rem;
  padding-inline: 8px;
  border: 1px solid #fff4e270;
  border-radius: 999px;
  background: #fff4e211;
  font-size: .85rem;
  cursor: pointer;
  list-style: none;
}
.public-language summary::-webkit-details-marker { display: none; }
.public-language summary bdi { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.language-globe { display: inline-flex; flex: none; }
.language-globe .icon { width: 15px; height: 15px; }
.language-options {
  position: absolute;
  z-index: 5;
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 0;
  inline-size: max-content;
  min-inline-size: 100%;
  max-inline-size: min(230px, calc(100vw - 36px));
  max-block-size: 50dvh;
  overflow: auto;
  padding: 4px;
  border: 1px solid #fff4e270;
  border-radius: 12px;
  background: var(--menu-wine);
  color: #fff8ee;
  box-shadow: 0 6px 22px #311b2840;
}
.language-options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  inline-size: 100%;
  min-block-size: 38px;
  padding: 5px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: start;
}
.language-options button:is(:hover, [aria-current]) { background: #fff4e224; }
.language-options button bdi { overflow-wrap: anywhere; }
.language-options button .icon { width: 15px; height: 15px; }
.customer-top :focus-visible { outline-color: #f7d8ac; }
.table-indicator { display: inline-flex; gap: 5px; align-items: center; max-inline-size: 100%; font-size: .79rem; font-weight: 650; color: #f1d9cc; }
.table-indicator .icon { width: 15px; height: 15px; }
.table-indicator bdi { min-inline-size: 0; overflow-wrap: anywhere; }

.menu-body { padding-block: 12px calc(5.5rem + env(safe-area-inset-bottom)); }
.menu-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--menu-dark);
  color: #fff8e9;
  border-radius: 16px;
}
.menu-intro { display: grid; align-content: center; justify-items: start; padding: clamp(22px, 6vw, 34px); }
.menu-hero h1 {
  font: 500 clamp(2.75rem, 12vw, 4.65rem)/.96 var(--menu-serif);
  letter-spacing: -.055em;
  max-inline-size: 16ch;
  overflow-wrap: anywhere;
}
.menu-location {
  margin-block-end: 12px;
  color: #e5bf8d;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .19em;
  text-transform: uppercase;
}
.menu-intro-description { margin-block-start: 14px; max-inline-size: 42ch; color: #f2e7d4; white-space: pre-line; overflow-wrap: anywhere; }
.menu-address { margin-block-start: 10px; color: #dacbb5; font-size: .84rem; overflow-wrap: anywhere; }
.customer-page-with-cover { position: relative; }
.customer-page-with-cover .customer-top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  padding-block-start: env(safe-area-inset-top);
  border: 0;
  background: none;
}
.customer-page-with-cover .restaurant-identity {
  text-shadow: 0 1px 5px #1b101b, 0 1px 12px #1b101b;
}
.customer-page-with-cover .public-language summary {
  background: color-mix(in srgb, var(--menu-wine) 72%, transparent);
}
.menu-body.menu-body-with-cover { padding-block-start: 0; }
.menu-hero.menu-has-cover {
  grid-template-columns: minmax(0, 1fr);
  min-block-size: 100svh;
  border-radius: 0;
}
.menu-has-cover .menu-intro {
  align-content: center;
  justify-items: center;
  padding: calc(108px + max(env(safe-area-inset-top), env(safe-area-inset-bottom))) clamp(20px, 5vw, 72px);
  text-align: center;
  text-shadow: 0 2px 12px #1b101b;
}
.menu-scroll {
  position: absolute;
  inset-block-end: max(24px, calc(env(safe-area-inset-bottom) + 12px));
  inset-inline: 0;
  margin-inline: auto;
  inline-size: max-content;
  max-inline-size: calc(100% - 32px);
  min-block-size: 44px;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 6px 16px;
  color: inherit;
  background: #25161eaa;
  border: 1px solid #fff8e9b3;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 650;
}
.menu-scroll:hover { background: #25161e; }
.menu-scroll:focus-visible { outline-color: #fff8e9; }
@media (prefers-reduced-motion: no-preference) {
  .menu-scroll .icon { animation: menu-scroll-down 1.8s ease-in-out infinite; }
}
@keyframes menu-scroll-down {
  0%, 62%, 100% { transform: translateY(0); }
  31% { transform: translateY(5px); }
}
.menu-cover {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--menu-dark);
}
.menu-cover-image { position: absolute; inset: 0; display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.menu-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #25161e20, #25161ea6 46%, #25161eb3 100%); }
.menu-emblem {
  display: grid;
  place-items: center;
  position: absolute;
  inset-inline-end: -40px;
  inset-block-end: -44px;
  z-index: -1;
  inline-size: 176px;
  aspect-ratio: 1;
  opacity: .31;
  overflow: hidden;
  pointer-events: none;
}
.menu-emblem::before,.menu-emblem::after {
  content: "";
  position: absolute;
  aspect-ratio: 1;
  inline-size: min(84%, 390px);
  border: 1px solid #ebc99140;
  border-radius: 50%;
  pointer-events: none;
}
.menu-emblem::after { inline-size: min(77%, 352px); }
.menu-emblem > span { color: #edcc9f; font: 500 clamp(5.5rem, 13vw, 11rem)/1 var(--menu-serif); }
.menu-emblem-logo { inline-size: clamp(90px, 16vw, 180px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; }

@font-face {
  font-family: Allura;
  src: url("./fonts/Allura-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Mesa Menu Arabic";
  src: url("./fonts/arefruqaa-menu.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Mesa Menu Cyrillic";
  src: url("./fonts/caveat-menu.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Mesa Menu Simplified";
  src: url("./fonts/mashanzheng-menu.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Mesa Menu Traditional";
  src: url("./fonts/lxgwwenkaitc-menu.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Mesa Menu Japanese";
  src: url("./fonts/yomogi-menu.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Mesa Menu Korean";
  src: url("./fonts/nanumpenscript-menu.woff2") format("woff2");
  font-display: swap;
}
.menu-title {
  --menu-heading-font: Allura;
  text-align: center;
  margin-block: 30px 11px;
  font: 400 clamp(3.35rem, 6vw, 5rem)/1.04 var(--menu-heading-font), var(--menu-serif);
  scroll-margin-block-start: 16px;
}
.menu-title:is(:lang(ar), :lang(fa)) {
  --menu-heading-font: "Mesa Menu Arabic";
  line-height: 1.22;
}
.menu-title:lang(ru) { --menu-heading-font: "Mesa Menu Cyrillic"; }
.menu-title:lang(zh) { --menu-heading-font: "Mesa Menu Simplified"; }
.menu-title:is(:lang(zh-TW), :lang(zh-HK), :lang(zh-MO)) { --menu-heading-font: "Mesa Menu Traditional"; }
.menu-title:lang(ja) { --menu-heading-font: "Mesa Menu Japanese"; }
.menu-title:lang(ko) { --menu-heading-font: "Mesa Menu Korean"; }
.menu-title:is(:lang(zh), :lang(ja), :lang(ko)) { font-size: clamp(2.7rem, 5vw, 4.2rem); }
.menu-tools {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  padding-block: 7px 4px;
  background: var(--menu-paper);
  border-bottom: 1px solid var(--menu-rule);
}
.menu-search {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  min-inline-size: 0;
  border: 1px solid #d8cdbb;
  border-radius: 999px;
  padding-inline-start: 13px;
  color: var(--menu-muted);
  background: var(--menu-surface);
}
.menu-search:focus-within { outline: 2px solid var(--menu-wine); outline-offset: 1px; }
.menu-search .icon { width: 18px; height: 18px; }
.menu-search input {
  inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 44px;
  border: 0;
  padding: 8px 10px;
  background: transparent;
  outline: 0;
  font-size: 1.067rem;
}
.menu-search input::placeholder { color: var(--menu-muted); }
.category-tabs { display: flex; flex: 1; min-inline-size: 0; gap: 6px; overflow-x: auto; padding: 4px; scrollbar-width: thin; }
.menu-category {
  flex: 0 0 auto;
  max-inline-size: min(54vw, 24rem);
  min-block-size: 44px;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--menu-muted);
  background: transparent;
  font-size: .87rem;
  font-weight: 640;
  overflow-wrap: anywhere;
}
.menu-category:hover { color: var(--menu-ink); background: #eee7d9; }
.menu-category .icon { width: 16px; height: 16px; margin-inline-end: 5px; }
.menu-category.selected { color: var(--menu-wine-dark); border-color: #dcc3b4; background: #f0dfd7; }

#menu-products { scroll-margin-block-start: 119px; }
.menu-section { margin-block: 22px 34px; }
.menu-section h3 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-block-end: 12px;
  font: 500 clamp(1.7rem, 3vw, 2.6rem)/1.06 var(--menu-serif);
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.menu-section h3 .icon { width: .82em; height: .82em; color: #835938; }
.menu-section h3::after { content: ""; flex: 1; border-bottom: 1px solid var(--menu-rule); }
.dish-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.dish {
  position: relative;
  display: flex;
  flex-direction: row;
  min-inline-size: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--menu-rule);
  border-radius: 13px;
  background: var(--menu-surface);
  color: var(--menu-ink);
  text-align: start;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.dish:focus-within { outline: 2px solid var(--menu-wine); outline-offset: 2px; }
.dish:hover { border-color: #b99a73; box-shadow: 0 5px 16px #352a1e13; }
.dish-photo { display: grid; place-items: center; position: relative; flex: 0 0 29%; max-inline-size: 142px; align-self: stretch; background: #eee3d7; color: #835938; }
.dish-photo > .icon,.product-placeholder > .icon { width: 32px; height: 32px; }
.dish-image { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.dish-content { display: flex; flex: 1 1 auto; flex-direction: column; gap: 3px; min-inline-size: 0; padding: 8px 10px; block-size: 136px; overflow-wrap: anywhere; }
.dish-content:has(> .dietary-tags) { block-size: auto; min-block-size: 136px; }
.dish-title { margin: 0; flex: none; font: 500 clamp(1.19rem, 2.4vw, 1.55rem)/1.12 var(--menu-serif); }
.dish-view { display: block; padding: 0; border: 0; background: transparent; text-align: start; }
.dish-view::after { content: ""; position: absolute; inset: 0; }
.dish-view:focus-visible { outline: none; }
.dish-view span,.dish-description { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.dish-view span { overflow-wrap: anywhere; }
.dish-description {
  flex: none;
  color: var(--menu-muted);
  font-size: .87rem;
  line-height: 1.28;
}
.dish-bottom { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 4px; margin-block-start: auto; }
.dish-price-info { min-inline-size: 0; line-height: 1.25; }
.dish-price { color: var(--menu-wine); font-weight: 700; font-variant-numeric: tabular-nums; }
.dish-price small { font-size: .75rem; font-weight: 600; }
.dish-unavailable { color: var(--menu-muted); font-size: .75rem; }
.dish-unavailable { color: #7a3a2f; font-weight: 650; }
.dish-add {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-block-size: 44px;
  max-inline-size: 58%;
  padding: 4px 9px;
  border: 0;
  border-radius: 999px;
  color: #fff8ee;
  background: var(--menu-wine);
  font-size: .82rem;
  font-weight: 650;
  line-height: 1.18;
  overflow-wrap: anywhere;
}
.card-purchase { position: relative; z-index: 1; flex: none; }
.card-purchase > .dish-add { max-inline-size: 100%; direction: ltr; min-block-size: 34px; }
.dish-add:hover { background: var(--menu-wine-dark); }
.dish-add .icon { width: 15px; height: 15px; }
.menu-empty { display: grid; justify-items: center; padding-block: 8px 26px; }
.menu-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 18px; margin-block-start: 28px; padding-block-start: 16px; border-top: 1px solid var(--menu-rule); color: var(--menu-muted); overflow-wrap: anywhere; }
.menu-footer .text-btn { min-block-size: 44px; }

.cart-bar {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
  inset-inline: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  inset-block-end: max(15px, env(safe-area-inset-bottom));
  z-index: 3;
  pointer-events: none;
}
@media (max-width: 599px) {
  .cart-bar { inset-inline-start: calc(max(16px, env(safe-area-inset-left), env(safe-area-inset-right)) + 54px); }
  .cart-bar .menu-cart-button.has-items { gap: 6px; padding-inline: 10px; }
  .cart-bar .menu-cart-button.has-items > span { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cart-bar .menu-cart-button.has-items > :is(svg, b, bdi) { flex-shrink: 0; }
}
.cart-bar > button { pointer-events: auto; }
.back-to-menu { display: grid; flex: none; place-items: center; inline-size: 44px; block-size: 44px; padding: 0; border: 1px solid var(--menu-rule); border-radius: 50%; background: var(--menu-surface); color: var(--menu-wine); box-shadow: 0 4px 16px #39202c23; }
.menu-cart-button {
  display: flex;
  align-items: center;
  gap: 10px;
  inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 54px;
  padding: 10px 15px;
  border: 1px solid #a1735e;
  border-radius: 999px;
  background: var(--menu-wine);
  color: #fff8ee;
  box-shadow: 0 6px 26px #3c211f45;
  font-weight: 650;
}
.menu-cart-button:hover { background: var(--menu-wine-dark); }
.menu-cart-button:not(.has-items) {
  inline-size: auto;
  min-block-size: 46px;
  min-inline-size: 0;
  border-color: var(--menu-rule);
  background: var(--menu-surface);
  color: var(--menu-wine);
  box-shadow: 0 4px 16px #39202c23;
}
.menu-cart-button:not(.has-items):hover { background: var(--menu-paper); }
.menu-cart-button b { display: grid; place-items: center; min-inline-size: 24px; min-block-size: 24px; padding-inline: 4px; border-radius: 999px; background: #fff4e229; font-size: .8rem; }
.cart-button-price { margin-inline-start: auto; font-size: .9rem; font-variant-numeric: tabular-nums; }

.customer-dialog { --accent: var(--menu-wine); --accent-dark: var(--menu-wine-dark); --surface: var(--menu-surface); --line: var(--menu-rule); background: var(--menu-surface); padding: 18px 18px max(20px, env(safe-area-inset-bottom)); }
.customer-dialog::backdrop { background: #26241ccb; }
.customer-dialog .modal-head h2 { font: 500 clamp(1.8rem, 5vw, 2.45rem)/1.05 var(--menu-serif); }
.customer-dialog .modal-head > button { inline-size: 44px; block-size: 44px; }
.customer-dialog .primary { min-block-size: 46px; }
.customer-dialog .field input,.customer-dialog .field select,.customer-dialog .field textarea { font-size: 1.067rem; }
.customer-dialog .form-actions .primary,.cart-browse { inline-size: 100%; }
.product-media { position: relative; margin-block-end: 13px; }
.product-hero { inline-size: 100%; max-block-size: 240px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; background: #eee3d7; }
.product-placeholder { display: grid; place-items: center; background: #eee3d7; color: #835938; }
.product-media-labels { position: absolute; inset: auto 9px 9px; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.prep-time { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: var(--menu-dark); color: #fff8ee; font-size: .8rem; font-weight: 650; }
.prep-time .icon { width: 15px; height: 15px; }
.dietary-tags { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0; list-style: none; }
.dish-description + .dietary-tags { margin-block-start: clamp(8px, 1.2vw, 12px); }
.dietary-tags li { padding: 2px 6px; border: 1px solid var(--menu-rule); border-radius: 999px; background: var(--menu-paper); color: var(--menu-wine-dark); font-size: .73rem; font-weight: 650; line-height: 1.3; }
.product-media-labels > .dietary-tags { flex: 1 1 150px; }
.item-dialog-content > .dietary-tags { margin-block-end: 12px; }
.dish-tags { display: flex; flex-wrap: wrap; gap: 5px; padding: 0; margin: 0 0 12px; list-style: none; }
.dish-tags li { padding: 3px 9px; border: 1px solid var(--menu-rule); border-radius: 999px; background: var(--menu-paper); color: var(--menu-wine-dark); font-size: .8rem; overflow-wrap: anywhere; }
.product-description { color: var(--menu-muted); overflow-wrap: anywhere; }
.dish-meta { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 7px; font-size: .9rem; overflow-wrap: anywhere; }
.dish-ingredients,.dish-allergen-note { max-inline-size: 100%; padding: 8px 11px; border-radius: 12px; background: #f4ede0; }
.dish-allergen-note { background: #fae9a7; color: #53390f; }
.dish-meta small { display: block; margin-block-start: 4px; }
.choice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; min-block-size: 44px; padding-block: 4px; }
.choice span { overflow-wrap: anywhere; }
.dish-purchase { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.dish-purchase > .dish-add { z-index: auto; padding-inline: 16px; font-size: .92rem; }
.dish-purchase > bdi { color: var(--menu-wine-dark); font-weight: 700; }
.dish-instructions { padding: 0 11px; border: 1px solid var(--menu-rule); border-radius: 12px; }
.dish-instructions summary { padding-block: 10px; cursor: pointer; font-weight: 650; }
.dish-instructions summary small { margin-inline-start: 4px; color: var(--menu-muted); font-weight: 400; }
.dish-instructions .field { margin-block-end: 10px; }
#cart-form { display: flex; flex-direction: column; min-block-size: 0; }
.cart-lines { display: grid; grid-auto-rows: max-content; min-block-size: 0; gap: 7px; overflow-y: auto; overscroll-behavior: contain; }
.cart-options,.cart-checkout { display: grid; flex: none; gap: 13px; }
@media (max-height: 500px) {
  .cart-options { max-block-size: 30dvh; overflow-y: auto; }
}
.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--menu-rule);
  border-radius: 12px;
}
.cart-thumbnail { display: grid; place-items: center; position: relative; aspect-ratio: 1; background: #eee3d7; color: #835938; border-radius: 8px; overflow: hidden; }
.cart-thumbnail-image { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.cart-line-summary { display: grid; grid-template-columns: 53px minmax(0, 1fr); align-items: start; gap: 8px; min-inline-size: 0; }
button.cart-line-summary { align-self: stretch; padding: 0; border: 0; background: transparent; text-align: start; }
button.cart-line-summary:hover strong { text-decoration: underline; }
.cart-line-copy { overflow-wrap: anywhere; }
.cart-line-note { display: block; color: var(--menu-muted); font-size: .78rem; }
.cart-line-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 6px; color: var(--menu-wine-dark); font-weight: 700; }
.cart-line-price small { color: var(--menu-muted); font-weight: 400; }
.cart-stepper { display: flex; align-items: center; gap: 4px; font-size: .85rem; font-weight: 650; }
.cart-stepper > :is(bdi, output) { min-inline-size: 2ch; text-align: center; }
.cart-step {
  display: grid;
  place-items: center;
  inline-size: 32px;
  block-size: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff8ee;
  background: var(--menu-wine);
}
.cart-step:not(.cart-step-decrease):hover:not(:disabled) { background: var(--menu-wine-dark); }
.cart-step-decrease { border: 1px solid var(--menu-rule); color: var(--menu-wine-dark); background: var(--cart-option-active); }
.cart-step-decrease:hover { border-color: var(--menu-wine); }
.cart-step .icon { width: 16px; height: 16px; }
.cart-kind { padding: 0; border: 0; }
.cart-kind legend { padding: 0; margin-block-end: 4px; font-size: .86rem; }
.cart-kind-options { display: flex; gap: 6px; }
.cart-kind-option { flex: 1 1 0; min-inline-size: 0; position: relative; cursor: pointer; }
.cart-kind-option input { position: absolute; inset-inline-start: 0; inset-block-start: 0; opacity: 0; }
.cart-kind-option span { display: flex; align-items: center; justify-content: center; gap: 5px; min-block-size: 36px; padding: 4px 7px; border: 1px solid var(--menu-rule); border-radius: 8px; background: #f0e5e0; color: var(--menu-wine-dark); font-size: .85rem; }
.cart-kind-option input:checked + span { background: var(--cart-option-active); border-color: var(--menu-wine); font-weight: 650; }
.cart-kind-option input:focus-visible + span { outline: 2px solid var(--menu-wine); outline-offset: 2px; }
.cart-kind-option .icon,.cart-notes .icon { width: 16px; height: 16px; }
.cart-notes summary { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-block: 7px; list-style: none; font-size: .86rem; }
.cart-notes summary::-webkit-details-marker { display: none; }
.cart-notes[open] summary .icon { transform: rotate(45deg); }
.cart-notes textarea { min-block-size: 50px; }

.guest-fields { display: grid; gap: 13px; }
dialog.customer-dialog {
  inset-block: auto 0;
  margin: 0 auto;
  inline-size: 100%;
  max-inline-size: none;
  max-block-size: 88dvh;
  border-radius: 22px 22px 0 0;
}
.customer-dialog .modal-head { position: sticky; inset-block-start: -18px; z-index: 1; background: var(--menu-surface); padding-block: 7px; }
dialog:is(.item-dialog, .cart-dialog)[open] { display: flex; flex-direction: column; overflow: hidden; }
:is(.item-dialog, .cart-dialog) .modal-head { position: static; flex: none; }
.item-dialog-content { min-block-size: 0; overflow-y: auto; overscroll-behavior: contain; }
.item-cart-bar { display: flex; flex: none; justify-content: end; margin-block-start: 12px; }

@media (min-width: 600px) {
  .customer-top-content { min-height: 70px; }
  .public-language summary { max-inline-size: 10rem; }
  .restaurant-logo { inline-size: 40px; block-size: 40px; }
  .menu-body { padding-block-start: 30px; }
  .menu-hero { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); min-block-size: 315px; border-radius: 18px; }
  .menu-intro { padding: clamp(24px, 5vw, 65px); }
  .menu-hero h1 { font-size: clamp(2.8rem, 6.25vw, 5.55rem); }
  .menu-emblem { position: relative; inset: auto; z-index: auto; inline-size: auto; aspect-ratio: auto; opacity: 1; }
  .menu-title { margin-block: clamp(32px, 5vw, 55px) 13px; }
  .menu-tools { flex-direction: row; align-items: center; gap: 12px; padding-block: 9px; }
  .menu-search { flex-basis: min(29%, 270px); }
  #menu-products { scroll-margin-block-start: 78px; }
  .dish-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.9vw, 22px); }
  .dish { flex-direction: column; }
  .dish-photo { flex: 0 0 auto; inline-size: 100%; max-inline-size: none; block-size: clamp(113px, 17vw, 154px); }
  .dish-content { flex: 0 0 auto; padding: 9px 13px; block-size: 139px; }
  .cart-bar { inset-inline: auto max(16px, calc((100vw - 1108px) / 2)); }
  .menu-cart-button { inline-size: auto; min-inline-size: 185px; }
  dialog.customer-dialog {
    inset-block: 0;
    margin: auto;
    max-inline-size: min(550px, calc(100vw - 28px));
    max-block-size: calc(100dvh - 28px);
    border-radius: 18px;
    padding: 22px;
  }
  .customer-dialog .modal-head { inset-block-start: -22px; }
}
.menu-chat-trigger {
  position: fixed;
  z-index: 3;
  inset-inline-start: max(16px, env(safe-area-inset-left), env(safe-area-inset-right), calc((100vw - 1108px) / 2));
  inset-block-end: max(15px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  inline-size: 46px;
  block-size: 46px;
  padding: 0;
  border: 1px solid var(--menu-rule);
  border-radius: 50%;
  background: var(--menu-surface);
  color: var(--menu-wine);
  box-shadow: 0 4px 16px #39202c23;
}
.menu-chat-trigger:hover { background: var(--menu-paper); }
dialog.menu-chat-dialog {
  position: fixed;
  text-align: start;
  inset-block: auto var(--chat-viewport-bottom, 0px);
  block-size: min(33rem, calc(var(--chat-viewport-height, 100dvh) - 12px));
  max-block-size: none;
  overflow: hidden;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
}
dialog.menu-chat-dialog[open] { display: flex; flex-direction: column; }
.menu-chat-dialog::backdrop { background: #26191174; }
.menu-chat-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: none; }
.menu-chat-header h2 { margin: 0; font-size: 1.1rem; }
.menu-chat-header button { inline-size: 44px; block-size: 44px; flex: none; }
.menu-chat-thread {
  flex: 1 1 auto;
  min-block-size: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px 4px;
}
.menu-chat-message {
  flex: none;
  align-self: flex-start;
  max-inline-size: 86%;
  margin: 0;
  padding: 8px 11px;
  border-radius: 13px;
  background: var(--cart-option-active);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.menu-chat-message.guest { align-self: flex-end; background: var(--menu-wine); color: #fff8ee; }
.menu-chat-status, .menu-chat-privacy { margin: 0; color: var(--menu-muted); font-size: .79rem; }
.menu-chat-status:not(:empty) { padding: 2px 0 6px; }
.menu-chat-privacy { margin-block-start: 7px; }
form.menu-chat-form { display: flex; gap: 7px; margin: 0; }
.menu-chat-form input {
  flex: 1;
  min-inline-size: 0;
  text-align: start;
  border: 1px solid var(--menu-rule);
  border-radius: 9px;
  background: var(--menu-surface);
  padding: 8px 10px;
  font-size: 16px;
}
.menu-chat-form button { flex: none; }
@media (min-width: 600px) {
  dialog.menu-chat-dialog {
    inset-inline: max(16px, calc((100vw - 1108px) / 2)) auto;
    inset-block-end: calc(var(--chat-viewport-bottom, 0px) + 18px);
    margin: 0;
    max-inline-size: 390px;
    block-size: min(33rem, calc(var(--chat-viewport-height, 100dvh) - 36px));
  }
}
.menu-body-with-cover .menu-title { margin-block-start: 24px; }
@media (min-width: 1000px) {
  .dish-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .dish { transition: none; }
}

@media (max-width: 1000px) {
  .workspace { grid-template-columns: 185px minmax(0,1fr); }
  .sidebar { padding-inline:8px; }
  .stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .landing-grid { grid-template-columns:1fr; gap:24px; }
  .landing-art { min-height:280px; max-height:420px; }
  .plate { width:min(58%,250px); padding:5%; }
  .auth-shell,.workspace { display:block; }
  .auth-aside { min-height:0; padding:16px 20px; }
  .auth-intro,.auth-foot,.auth-decoration { display:none; }
  .auth-main { padding-top:28px; }
  .sidebar { position:static; min-height:0; height:auto; display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:8px; padding:8px; border-inline-end:0; border-bottom:1px solid var(--line); align-items:center; }
  .brand { font-size:1.58rem; }
  .brand-icon { width:30px; height:30px; }
  .sidebar-brand { padding:0; }
  .workspace-name { background:none; box-shadow:none; padding:0; }
  .workspace-icon,.identity strong,.identity small,.identity .avatar,.public-link { display:none; }
  .identity { border:none; margin:0; padding:0; }
  .side-nav { grid-column:1/-1; grid-row:2; display:flex; overflow-x:auto; padding-block:4px; }
  .side-nav a { white-space:nowrap; }
  .topbar { min-height:48px; }
  .page-content { padding-top:21px; }
  .chart-grid { grid-template-columns:1fr; }
}
@media (max-width: 520px) {
  .landing-features,.table-card-grid { grid-template-columns:1fr; }
  .landing-grid { padding-block:26px; }
  .field-grid,.check-grid { grid-template-columns:1fr; }
  .group-config { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .option-line { grid-template-columns:minmax(75px,1fr) minmax(55px,.65fr) auto auto; }
  .head-actions { width:100%; }
  .catalog-product .row-actions { width:100%; }
}
.language-flag { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 1rem; }
.visit-page { position: relative; isolation: isolate; display: grid; place-items: center; padding: 22px; background: var(--menu-dark); }
.visit-background { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; z-index: -2; }
.visit-page::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #26162080; }
.visit-panel { width: min(100%, 430px); padding: clamp(18px, 5vw, 32px); border-radius: 20px; background: color-mix(in srgb, var(--menu-surface) 88%, transparent); box-shadow: 0 12px 40px #1c10165c; --accent: var(--menu-wine); --accent-dark: var(--menu-wine-dark); }
.visit-heading { display: grid; justify-items: center; gap: 6px; margin-block-end: 20px; text-align: center; }
.visit-heading h1 { font-family: var(--menu-serif); }
.visit-heading > p { color: var(--menu-muted); overflow-wrap: anywhere; }
.visit-heading .visit-table { display: inline-flex; align-items: center; gap: 5px; max-inline-size: 100%; padding: 3px 9px; border-radius: 999px; background: #f0dfda; color: var(--menu-wine-dark); font-size: .79rem; }
.visit-table .icon { width: 14px; height: 14px; }
.visit-picker { position: relative; }
.visit-picker summary { display: grid; gap: 4px; cursor: pointer; list-style: none; font-size: .86rem; font-weight: 650; }
.visit-picker summary::-webkit-details-marker { display:none; }
.visit-picker [data-selection] { display: block; min-block-size: 44px; padding: 9px 11px; border: 1px solid var(--menu-rule); border-radius: 8px; background: var(--menu-paper); font-size: .95rem; font-weight: 400; }
.visit-picker[open] [data-selection] { border-radius: 8px 8px 0 0; border-color: var(--menu-wine); }
.visit-options { position: absolute; z-index: 4; inset-inline: 0; padding: 6px; border: 1px solid var(--menu-wine); border-block-start: 0; border-radius: 0 0 8px 8px; background: var(--menu-surface); box-shadow: 0 8px 20px #311b2826; }
.visit-option-list { display: grid; gap: 2px; max-block-size: min(180px, 28dvh); overflow-y: auto; overscroll-behavior: contain; }
.visit-option-list button { min-block-size: 42px; padding: 4px 8px; border: 0; border-radius: 6px; background: transparent; text-align: start; }
.visit-option-list button:is(:hover, [aria-pressed=true]) { background: #f0dfda; }
.visit-options .field { margin-block-end: 4px; }
.visit-options input { font-size: 16px; }
.visit-privacy { font-size: .82rem; color: var(--menu-muted); }
.visit-privacy summary { cursor: pointer; color: var(--menu-wine); }
.visit-privacy p { margin-block-start: 5px; }
.visit-panel .form-actions .btn { width: 100%; }
.receipt-actions { display: grid; gap: 8px; }

@media print {
  body > #app, .notices, .modal-head button, dialog .btn { display:none; }
  dialog { position:static; margin:0 auto; box-shadow:none; border:none; }
  dialog.receipt-dialog[open] { width: 100%; max-width: none; height: auto; max-height: none; overflow: visible; padding: 0; background: white; }
  dialog.receipt-dialog::backdrop { display: none; }
  .receipt-dialog .modal-head { position: static; background: white; }
  .receipt-actions { display: none; }
  .receipt article,.receipt .total { break-inside: avoid; }
}

.service .badge { justify-self: start; }
.service small { color: var(--quiet); font-size: .78rem; }
.badge.ok,.badge.running { background: #e5eee2; color: #2e583b; }
.badge.offline { background: #f7e2dd; color: #8a3327; }
.monitor-events { margin-top: 16px; }
.stream-status { font-size: .88rem; }

.hero-preview { display: block; inline-size: 100%; max-block-size: 200px; object-fit: contain; border-radius: 9px; background: var(--ink); }
.category-icon-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.category-icon-preview { inline-size: 42px; block-size: 42px; }

.dish-action-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.dish-action-row > .callout { margin-block: 0; }
.dish-history-trigger {
  display: grid;
  place-items: center;
  inline-size: 46px;
  block-size: 46px;
  border: 1px solid var(--menu-wine);
  border-radius: 50%;
  background: var(--menu-paper);
  color: var(--menu-wine);
  box-shadow: 0 2px 6px #39202c24;
  cursor: pointer;
}
.dish-history-trigger:is(:hover, :focus-visible) { background: var(--menu-wine); color: #fff8ee; }
.dish-history-trigger:focus-visible { outline: 2px solid var(--menu-wine); outline-offset: 3px; }
.dish-history-trigger .icon { width: 23px; height: 23px; }
.dish-book-page { fill: var(--menu-paper); transform-origin: 12px center; }
.dish-history-trigger:is(:hover, :focus-visible) .dish-book-page { fill: var(--menu-wine); }
@media (prefers-reduced-motion: no-preference) {
  .dish-book-page { animation: dish-book-turn 1.8s ease-in-out infinite; }
  @keyframes dish-book-turn {
    0% { opacity: 1; transform: perspective(35px) rotateY(0); }
    24% { opacity: 1; transform: perspective(35px) rotateY(-155deg); }
    30%, 100% { opacity: 0; transform: perspective(35px) rotateY(-180deg); }
  }
}
.dish-history-dialog { max-width: min(590px, calc(100vw - 24px)); padding: clamp(18px, 5vw, 36px); }
.dish-history-dialog .modal-head { align-items: flex-start; padding-block-end: 14px; border-block-end: 1px solid var(--menu-rule); }
.dish-history-prose { font: 400 clamp(1.05rem, 3vw, 1.24rem)/1.7 var(--menu-serif); }
.dish-history-prose p { margin-block: .85em; white-space: pre-line; }
.item-history-preview ul { padding-inline-start: 1.25rem; }
.item-history-preview { padding-block: 12px; margin-block: 12px; border-block: 1px solid var(--line); }
.item-history-fields { display: grid; gap: 12px; }
.cart-history { margin-block-end: 14px; padding-block-end: 12px; border-block-end: 1px solid var(--menu-rule); }
.cart-history ul { list-style: none; margin-block-end: 0; padding: 0; display: grid; gap: 5px; }
.cart-history button { width: 100%; justify-content: space-between; min-height: 42px; }

.platform .topbar > .field { display: none; }
.platform-block { padding: clamp(16px,2.4vw,32px); margin-block: 0 16px; }
.platform-block-head, .platform-links, .analytics-totals, .platform-service-list > div,
.platform-service-list dd, .platform-access { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.platform-block-head, .platform-service-list > div, .platform-access { justify-content: space-between; }
.platform-block-head span, .analytics-totals, .platform-service-list small { color: var(--quiet); }
.overview-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; margin: 20px 0 0; }
.overview-metrics > div { border-inline-start: 2px solid var(--line); padding-inline-start: 12px; }
.overview-metrics dt { color: var(--quiet); font-size: .9rem; }
.overview-metrics dd, .activity-figure strong { font: 500 2.5rem/1.2 var(--display); margin: 4px 0 0; }
.activity-figure { margin: 20px 0 8px; }
.platform-links { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 8px; }
.platform-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--accent-dark); }
.platform-links a:hover { text-decoration: underline; }
.analytics-totals { margin-bottom: 16px; }
.analytics-totals strong { color: var(--ink); }
.platform-services { max-width: 800px; margin-top: 16px; }
.platform-services p, .platform-access, .platform-location { padding-block-start: 12px; }
.platform-service-list { margin: 8px 0 0; }
.platform-service-list > div { padding: 8px 0; border-top: 1px solid var(--line); }
.platform-service-list dd { margin: 0; }
.platform .monitor-events { margin-top: 16px; }
.platform #audit-data td { overflow-wrap: anywhere; }
.platform #restaurant-list td:nth-child(5), .platform #restaurant-list th:nth-child(5) { text-align: end; }
.platform-access, .platform-location { border-top: 1px solid var(--line); }
.platform-location > summary { cursor: pointer; padding: 8px 0; font-weight: 600; }
@media (max-width: 760px) {
  .platform .side-nav, .platform .topbar > span { display: none; }
  .platform .topbar > .field { display: flex; align-items: center; flex-wrap: wrap; flex-direction: row; gap: 8px; margin: 0; }
  .platform .topbar select { width: auto; min-height: 44px; }
  .platform .workspace-name { background: transparent; }
  .overview-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

.sales-metrics {display:grid;grid-template-columns:repeat(4,1fr);margin:16px 0;padding:8px}
.sales-metrics button {display:grid;gap:4px;text-align:start;padding:12px;background:none;border:0;color:var(--ink);cursor:pointer}
.sales-metrics button:hover {background:var(--paper)}
.sales-metrics strong {font-size:1.5rem;font-variant-numeric:tabular-nums}
.sales-active {padding:0 16px;color:var(--quiet)}
#sales-center tr[data-lead] {cursor:pointer}
#sales-center td {overflow-wrap:anywhere}
.badge.high {background:#f8e6e2;color:#873830}
.badge.medium {background:#f8edcf;color:#735114}
dialog.sales-drawer {margin:0 0 0 auto;width:min(440px,100%);height:100dvh;max-height:100dvh;max-width:100%;border-radius:0;padding:24px}
.sales-detail {display:grid;gap:20px;overflow-wrap:anywhere}
.sales-detail p {margin:8px 0}
.sales-detail h3 {margin:0}
@media (max-width:640px) {.sales-metrics {grid-template-columns:repeat(2,1fr)}}
#sales-run {padding:0}
.sales-mode-line {display:flex;align-items:center;gap:12px}
#sales-center .page-head {margin-bottom:8px}
.sales-more {position:relative}
.sales-more > div {position:absolute;z-index:2;inset-inline-end:0;top:100%;display:grid;gap:12px;width:232px;padding:16px;background:var(--surface);border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow)}
@media (max-width:640px) {.sales-more[open] {flex-basis:100%}.sales-more > div {position:static;width:auto;box-shadow:none}}
.sales-result-count {padding:8px 16px;color:var(--quiet);font-variant-numeric:tabular-nums}
.sales-group summary {cursor:pointer;color:var(--accent);font-weight:600;padding:6px 0}
.sales-group .text-btn {display:block;text-align:start}

.sidebar-toggle { display: none; }
@media (min-width: 761px) {
  .sidebar-toggle { display: inline-grid; flex: none; }
  .topbar > span { margin-inline-end: auto; }
  .workspace.sidebar-collapsed { grid-template-columns: 68px minmax(0,1fr); }
  .sidebar-collapsed .sidebar { padding-inline: 8px; }
  .sidebar-collapsed .sidebar-brand,
  .sidebar-collapsed .workspace-name,
  .sidebar-collapsed .side-nav a,
  .sidebar-collapsed .public-link,
  .sidebar-collapsed .identity { justify-content: center; padding-inline: 0; }
  .sidebar-collapsed .sidebar-brand { display: flex; }
  .sidebar-collapsed .brand > span:last-child,
  .sidebar-collapsed .workspace-name > div,
  .sidebar-collapsed .side-nav a > span,
  .sidebar-collapsed .public-link > span,
  .sidebar-collapsed .identity > span,
  .sidebar-collapsed .identity > div { display: none; }
  .sidebar-collapsed .identity button { margin-inline-start: 0; }
  .sidebar-collapsed .side-nav a { position: relative; min-block-size: 40px; }
  .sidebar-collapsed .side-nav a b:not([hidden]) {
    position: absolute; inset-block-start: 0; inset-inline-end: 2px;
    inline-size: 8px; block-size: 8px; padding: 0; overflow: hidden; color: transparent;
  }
}

.bi-tabs, .bi-dates { display: flex; flex-wrap: wrap; gap: .45rem; margin-block-end: 1rem; }
.bi-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,9rem),1fr));
  align-items: end;
  gap: .75rem;
  padding: clamp(.85rem,2vw,1.35rem);
}
.bi-filters label { margin: 0; min-width: 0; }
.bi-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,11rem),1fr));
  gap: .75rem;
  margin-block: 0 1rem;
}
.bi-metric {
  display: grid;
  align-content: start;
  gap: .35rem;
  padding: 1rem;
  color: var(--ink);
  text-decoration: none;
  border-block-start: 3px solid var(--accent);
}
.bi-metric > strong { font-size: clamp(1.35rem,2.4vw,2.15rem); font-variant-numeric: tabular-nums; }
.bi-metric > small, .bi-dates { color: var(--quiet); font-size: .85rem; }
.bi-metric[href]:hover { background: var(--terracotta); }
.bi-trend { display: block; width: 100%; height: auto; max-height: 12rem; color: var(--accent); }
.bi-dates { justify-content: space-between; }
.bi-series-table { max-height: 16rem; overflow: auto; margin-block: .5rem; }
#bi-results > .chart { margin-block-end: 1rem; }
#bi-period, #restaurant-summary { margin-block: .75rem; }
#restaurant-summary { padding-inline: 1.35rem; }

.bi-advanced-filters { grid-column: 1 / -1; }
.bi-advanced-filters > .bi-filters { padding-inline: 0; }
.bi-chart-value { color: var(--quiet); font-variant-numeric: tabular-nums; min-height: 1.5em; margin: .25rem 0; }

.bi-table-controls { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0 1.35rem 1rem; }

.overview-metrics .bi-profile-value { font: inherit; font-weight: 650; }

.platform .bi-tabs a[aria-current="page"] { border-color: var(--brand-soft); }
.platform .bi-trend { border-block-end: 1px solid var(--text-muted); }
.platform .badge:is(.inactive,.disabled) { border: 1px solid var(--inactive); }
.platform .bi-advanced-filters[open] > summary { text-decoration: underline; text-decoration-color: var(--brand-muted); }

body:has(.workspace.platform) {
  --overview-order-fill: #29ad8a55;
  --overview-order-clear: #29ad8a08;
}
.overview-hero {
  align-items: center;
  min-height: 152px;
  padding: clamp(24px, 3.2vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--round);
  background: linear-gradient(110deg, #e2effa, #fff 52%, #d6f2e7);
  box-shadow: var(--shadow);
}
.overview-hero h1 { font-size: clamp(2.15rem,4vw,3.55rem); line-height: 1.09; }
.overview-hero p { max-inline-size: 56ch; }
.overview-hero .btn.secondary { background: #f4fbff; }
.platform .bi-metric[data-metric-tone]:not([data-metric-tone=""]) {
  border-block-start: 1px solid var(--line);
  padding: clamp(13px,1.3vw,20px);
  border-radius: 16px;
  background: linear-gradient(145deg,var(--card-tint,#edf6fb),var(--surface) 72%);
}
.platform .bi-metric[data-metric-tone="monitoring"] { --card-tint:#dff4e9; --card-icon:#17664d; }
.platform .bi-metric[data-metric-tone="bag"] { --card-tint:#e1f1fc; --card-icon:#246196; }
.platform .bi-metric[data-metric-tone="staff"] { --card-tint:#fff2d6; --card-icon:#765010; }
.bi-metric-label { display: flex; align-items: center; gap: .55rem; }
.bi-metric-label i { display: grid; place-items: center; inline-size: 2rem; block-size: 2rem; flex: none; background: var(--surface); color: var(--card-icon,var(--accent-dark)); border: 1px solid var(--line); border-radius: 9px; }
.bi-metric-label .icon { width: 16px; height: 16px; }
.bi-metric-label .bi-metric-arrow { margin-inline-start: auto; border: 0; background: transparent; }
[dir=rtl] :is(.overview-chart-link,.bi-metric-arrow) .icon { transform: scaleX(-1); }
.overview-chart-layout { display: grid; grid-template-columns: minmax(0,1.85fr) minmax(0,1fr); gap: 16px; margin-block-end: 16px; }
.overview-chart { padding: clamp(14px,1.65vw,24px); min-width: 0; border-radius: 18px; }
.overview-chart-head { display: flex; align-items: start; justify-content: space-between; gap: 8px 18px; flex-wrap: wrap; }
.overview-chart-head h2 { font-size: clamp(1.13rem,1.5vw,1.45rem); }
.overview-chart-head p { color: var(--quiet); font-size: .83rem; margin-block-start: .2rem; }
.overview-chart-link { display: inline-flex; gap: .35rem; align-items: center; color: var(--accent-dark); font-size: .82rem; font-weight: 650; }
.overview-chart-link .icon { width: 14px; height: 14px; }
.overview-chart-legend { display: flex; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; margin-block: 1rem .55rem; font-size: .81rem; color: var(--quiet); }
.overview-chart-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.overview-chart-legend [data-key]:not([data-key="granularity"])::before { content:""; inline-size:.95rem; block-size:0; border-block-start: 3px solid var(--accent); }
.overview-chart-legend [data-key="comparison"]::before { border-block-start: 2px dashed var(--green) !important; }
.overview-chart-legend [data-key="granularity"] { margin-inline-start:auto; }
.overview-order-canvas { width: 100%; height: clamp(185px,21vw,280px); display: block; }
.overview-chart-readout { color: var(--quiet); min-block-size: 1.4em; font-size: .8rem; }
.overview-data { margin-block-start: .4rem; color: var(--quiet); font-size: .84rem; }
.overview-data summary, .overview-secondary summary { cursor: pointer; }
.overview-subscriptions { --ring-active:var(--green); --ring-trial:var(--warning); --ring-expired:var(--accent); --ring-cancelled:#a69f95; }
.overview-ring { position: relative; aspect-ratio: 1; inline-size: min(100%, 12.35rem); margin: .55rem auto; }
.overview-ring canvas { width: 100%; height: 100%; }
.overview-ring > div { position: absolute; inset: 0; display: grid; place-content: center; text-align:center; pointer-events:none; }
.overview-ring strong { font-size: clamp(1.45rem,2.4vw,2.2rem); line-height:1.04; }
.overview-ring span { color:var(--quiet); font-size:.72rem; }
.overview-ring-legend { margin: 0; font-size:.84rem; }
.overview-ring-legend > div, .overview-ring-legend :is(dt,dd) { display:flex; align-items:center; gap:.45rem; }
.overview-ring-legend > div { justify-content:space-between; border-block-start:1px solid var(--line); padding-block:.35rem; }
.overview-ring-legend dd { margin:0; font-weight:650; }
.overview-ring-legend small { display:inline-block; min-inline-size:2.6rem; text-align:end; color:var(--quiet); font-weight:400; }
.overview-ring-legend i { width:.68rem; height:.68rem; border-radius:50%; background:var(--dot); }
[data-ring-key="active"] { --dot:var(--ring-active); }
[data-ring-key="trial"] { --dot:var(--ring-trial); }
[data-ring-key="expired"] { --dot:var(--ring-expired); }
[data-ring-key="cancelled"] { --dot:var(--ring-cancelled); }
.overview-heat { grid-column:1/-1; }
.overview-heat-scroll { overflow:auto; margin-block:.8rem; }
.overview-heat-table { min-width: 630px; width:100%; table-layout:fixed; border-collapse:separate; border-spacing: 3px; direction:ltr; }
.overview-heat-table tr th { border:0; background:transparent; color:var(--quiet); font-size:.76rem; padding:.15rem; }
.overview-heat-table th:first-child { width:4.1rem; }
.overview-heat-table th:not(:first-child) { text-align:center; }
.overview-heat-table td { border:1px solid transparent; border-radius:4px; padding:0; height:clamp(.65rem,1.3vw,1.3rem); background:var(--heat-value); }
.overview-heat-table td:hover { border-color:var(--ink); }
.overview-heat-table [data-intensity="0"] { --heat-value:#eeeae4; }
.overview-heat-table [data-intensity="1"] { --heat-value:#e7cfc2; }
.overview-heat-table [data-intensity="2"] { --heat-value:#d7ac97; }
.overview-heat-table [data-intensity="3"] { --heat-value:#c38469; }
.overview-heat-table [data-intensity="4"] { --heat-value:#a95d43; }
.overview-heat-table [data-intensity="5"] { --heat-value:#813b29; }
.overview-heat-footer, .overview-heat-legend { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; }
.overview-heat-footer { justify-content:space-between; color:var(--quiet); font-size:.79rem; }
.overview-heat-legend i { width:5.5rem; height:.55rem; border-radius:5px; background:linear-gradient(90deg,#eeeae4,#e7cfc2,#d7ac97,#c38469,#a95d43,#813b29); }
.overview-secondary { padding: .8rem 1rem; margin-block-end: 1rem; }
.overview-secondary .bi-metrics { margin-block: .8rem 0; }
@media (max-width: 1050px) {
  .overview-chart-layout { grid-template-columns: minmax(0,1fr); }
  .overview-ring { width: 10.5rem; }
}
.overview-heat-scroll { position: relative; min-inline-size: 0; max-inline-size: 100%; }
.overview-hero + #bi-filters > .bi-advanced-filters:not([open]) { grid-column: 1 / -2; align-self: center; }
@media (min-width: 760px) {
  .bi-metric[data-metric-tone]:not([data-metric-tone=""]) .bi-metric-label { min-block-size: 2.85rem; }
}
