@font-face {
  font-family: "DM Sans";
  src: url("/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/barlow.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #081019;
  --nav: #0c141e;
  --surface: #101b27;
  --raised: #162431;
  --ink: #f3f7fb;
  --muted: #a3b4c6;
  --accent: #64d9f4;
  --on-accent: #082330;
  --line: #293847;
  --green: #8de7b6;
  --amber: #ffd39a;
  --blue: #a9ceff;
  --radius: 19px;
}

* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 "DM Sans", system-ui, sans-serif; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1 { font-size: clamp(2.1rem, 4.1vw, 3.6rem); line-height: 1.04; letter-spacing: -.065em; }
h2 { font-size: 1.2rem; line-height: 1.2; letter-spacing: -.025em; }
h3 { font-size: 1rem; line-height: 1.28; letter-spacing: -.02em; }
small, .muted { color: var(--muted); }
a { color: var(--accent); text-underline-offset: .25em; }
a:hover { color: #a3ebfc; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.skip { position: absolute; z-index: 5; top: -7rem; padding: .75rem 1rem; background: var(--accent); color: var(--on-accent); }
.skip:focus { top: .35rem; left: .35rem; }

button, input, select, textarea { font: inherit; }
button {
  min-height: 44px;
  padding: .68rem .95rem;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  cursor: pointer;
}
button:hover:not(:disabled) { filter: brightness(1.12); }
button:disabled { opacity: .58; cursor: wait; }
button.secondary { background: var(--raised); color: var(--ink); border-color: var(--line); }
button.back-link { background: transparent; border-color: var(--line); color: var(--muted); }
input:not([type="radio"]), select, textarea {
  min-height: 43px;
  min-width: 0;
  width: 100%;
  padding: .62rem .74rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b1520;
  color: var(--ink);
}
textarea { resize: vertical; }
label { display: grid; gap: .35rem; color: var(--muted); font-weight: 650; font-size: .81rem; min-width: 0; }
label.check { display: flex; align-items: center; gap: .5rem; min-height: 38px; }
label.check input { min-height: auto; width: auto; accent-color: var(--accent); }
fieldset { margin: 0; padding: 0; min-width: 0; border: 0; }
details summary { cursor: pointer; }
details[open] > summary { margin-bottom: .85rem; }

.top { background: #0a121b; border-bottom: 1px solid #22313f; }
.top-inner { min-height: 70px; max-width: 1280px; margin: auto; padding: 0 clamp(1rem, 4vw, 2.65rem); display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.top img, .workspace-brand img { display: block; width: 121px; height: auto; }
.header-actions { display: flex; align-items: center; gap: .8rem; }
.header-actions a { font-size: .82rem; font-weight: 700; text-decoration: none; }
#context { padding: .32rem .7rem; border: 1px solid var(--line); border-radius: 30px; color: var(--muted); font-size: .78rem; font-weight: 750; }
#context:empty { display: none; }
.shell { max-width: 1280px; margin: auto; padding: 1.4rem clamp(1rem, 4vw, 2.65rem) 3rem; }
.stack { display: grid; gap: 1rem; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.between { justify-content: space-between; }
.split { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit,minmax(min(100%,285px),1fr)); }
.panel { min-width: 0; padding: clamp(1rem, 2vw, 1.45rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.badge { display: inline-flex; align-items: center; border-radius: 30px; padding: .26rem .63rem; background: #233140; color: #e2ebf5; font-size: .74rem; font-weight: 770; }
.status-queued { background: #392c20; color: var(--amber); }
.status-preparing { background: #192f4a; color: var(--blue); }
.status-ready, .status-delivered { background: #17372f; color: var(--green); }
.note { padding: .64rem .75rem; background: #382b1f; border-radius: 9px; color: var(--amber); overflow-wrap: anywhere; }
.demo-mark { display: flex; align-items: center; gap: .48rem; color: var(--muted); font-size: .76rem; font-weight: 650; }
.demo-mark span, .auto-update::before { content: ""; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--amber); }
.empty-state { border: 1px dashed var(--line); border-radius: 12px; padding: 1.15rem .75rem; color: var(--muted); text-align: center; font-size: .86rem; }
.error-panel { max-width: 720px; margin: 4rem auto; }
.error-panel h1 { font-size: clamp(1.8rem, 5vw, 3.1rem); }
#feedback { position: fixed; z-index: 5; bottom: max(1.25rem, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 2rem); background: #e9f9ff; color: #0d2734; padding: .75rem 1rem; border-radius: 12px; font-weight: 700; box-shadow: 0 12px 45px #0009; }
.scroll { overflow-x: auto; scrollbar-width: thin; }
table { border-collapse: collapse; width: 100%; min-width: 460px; font-size: .89rem; }
th, td { text-align: left; padding: .72rem .66rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .78rem; font-weight: 740; background: #0c1621; }
td:first-child { font-weight: 700; }
td:last-child { white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--raised); }

.icon { position: relative; display: inline-block; width: 16px; height: 16px; flex: 0 0 16px; }
.icon::before, .icon::after { position: absolute; content: ""; }
.icon-floor::before { inset: 3px 1px; border: 1.5px solid currentColor; border-radius: 4px; }
.icon-floor::after { inset: 0 5px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.icon-chart::before { left: 1px; bottom: 1px; width: 2px; height: 6px; background: currentColor; border-radius: 1px; }
.icon-chart::after { left: 6px; bottom: 1px; width: 7px; height: 14px; border-right: 2px solid currentColor; background: linear-gradient(0deg,currentColor 9px,transparent 9px) left/2px 100% no-repeat; border-radius: 1px; }
.icon-kitchen::before { width: 13px; height: 7px; border: 1.5px solid currentColor; border-radius: 10px 10px 0 0; left: 1px; top: 4px; }
.icon-kitchen::after { inset: 13px 0 1px; border-radius: 2px; background: currentColor; }
.icon-bar::before { top: 1px; left: 2px; width: 10px; height: 6px; border: 1.5px solid currentColor; border-radius: 2px 2px 7px 7px; }
.icon-bar::after { top: 9px; left: 4px; width: 8px; height: 5px; border-bottom: 1.5px solid currentColor; background: linear-gradient(90deg,transparent 42%,currentColor 42% 60%,transparent 60%); }
.icon-settings::before, .icon-filter::before { inset: 3px 0 auto; height: 1.5px; background: currentColor; box-shadow: 0 4px currentColor, 0 8px currentColor; }
.icon-settings::after, .icon-filter::after { top: 1px; left: 4px; width: 2px; height: 5px; background: currentColor; box-shadow: 6px 4px currentColor, 1px 8px currentColor; }
.icon-copy::before { inset: 4px 1px 0 5px; border: 1.5px solid currentColor; border-radius: 3px; }
.icon-copy::after { inset: 1px 5px 4px 2px; border: solid currentColor; border-width: 1.5px 0 0 1.5px; border-radius: 3px; }
.icon-receipt::before { inset: 0 2px; border: 1.5px solid currentColor; border-radius: 3px; }
.icon-receipt::after { left: 5px; right: 5px; top: 5px; height: 1.5px; background: currentColor; box-shadow: 0 4px currentColor; }
.icon-return::before { inset: 4px 1px 1px 3px; border: 1.5px solid currentColor; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.icon-return::after { left: 1px; top: 2px; width: 5px; height: 5px; border: solid currentColor; border-width: 1.5px 0 0 1.5px; transform: rotate(-45deg); }
.icon-time::before { inset: 0; border: 1.5px solid currentColor; border-radius: 50%; }
.icon-time::after { inset: 4px 4px 7px 7px; border: solid currentColor; border-width: 0 0 1.5px 1.5px; }
.icon-external { width: 12px; height: 12px; flex-basis: 12px; vertical-align: -.08em; }
.icon-external::before { inset: 2px 1px auto auto; width: 6px; height: 6px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; }
.icon-external::after { top: 6px; left: 0; width: 12px; height: 1.5px; transform: rotate(-45deg); background: currentColor; }

body[data-view="login"] { background: radial-gradient(ellipse at 73% 5%, #102534, transparent 65%), var(--bg); }
.login-layout { display: grid; grid-template-columns: 1.15fr 1fr; margin: clamp(1.4rem, 4vh, 3rem) auto 0; max-width: 1030px; min-height: 555px; overflow: hidden; border: 1px solid var(--line); border-radius: 27px; background: var(--surface); box-shadow: 0 30px 85px #0005; }
.login-visual { position: relative; isolation: isolate; display: flex; align-items: flex-end; padding: clamp(1.45rem, 4vw, 3.2rem); background: linear-gradient(0deg, #080f19f5, #0a132321 65%), url("/capa.webp") 12% center/cover; }
.login-visual::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #06101a24, transparent 60%); }
.login-visual p { color: #d0e6ed; font-size: .83rem; font-weight: 750; }
.login-visual p span { color: var(--accent); }
.login-visual strong { display: block; font: 700 clamp(2.35rem, 4.5vw, 4.3rem)/.98 "Barlow Condensed","DM Sans",sans-serif; margin-top: .48rem; }
.login-card { align-content: center; padding: clamp(1.4rem, 5vw, 3.4rem); gap: 1.9rem; }
.login-card h1 span { color: var(--accent); }
.login-card form { gap: 1.25rem; }
.login-card form > button, #copy-pix, #demo-pay { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.role-picker legend { color: var(--muted); font-size: .81rem; font-weight: 650; margin-bottom: .42rem; }
.role-picker > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .47rem; }
.role-picker label { position: relative; cursor: pointer; }
.role-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.role-picker label > span { display: flex; align-items: center; gap: .55rem; min-height: 45px; padding: .57rem .66rem; background: #0b1520; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.role-picker .icon { color: var(--muted); }
.role-picker input:checked + span { border-color: #49b3cc; background: #123444; color: #c0f3ff; }
.role-picker input:checked + span .icon { color: var(--accent); }
.role-picker input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.checkout-wrap { max-width: 970px; margin: .85rem auto; }
.payment-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 225px; padding: clamp(1.2rem, 4vw, 2.3rem); margin-bottom: .85rem; border: 1px solid #2f5061; border-radius: 25px; background: linear-gradient(90deg,#0c1d2a 1%,#0b2635dc 46%,#0c2937a3), url("/ponte.jpg") center 52%/cover; }
.payment-heading h1 { margin-top: .64rem; }
.order-reference { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; color: #d4e7ee; font-size: .83rem; font-weight: 720; }
.order-reference span + span::before { content: "·"; padding-right: .55rem; color: var(--accent); }
.payment-caption { margin-top: .65rem; color: #c0d4df; }
.payment-icon { width: clamp(48px, 8vw, 75px); aspect-ratio: 1; flex-shrink: 0; display: grid; place-items: center; border: 1px solid #5398aa; background: #11394bc9; color: var(--accent); border-radius: 21px; font-size: clamp(1.55rem,4vw,2.65rem); }
.payment-icon.confirmed { background: #17443e; border-color: #377e65; color: var(--green); }
.checkout-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); align-items: start; gap: .85rem; }
.order-total > div { display: grid; gap: .18rem; }
.order-total strong { display: block; font-size: clamp(1.9rem,4vw,2.8rem); line-height: 1.08; font-variant-numeric: tabular-nums; letter-spacing: -.062em; }
.order-total small { font-weight: 680; }
.task-line, .summary-line { padding-top: .85rem; border-top: 1px solid var(--line); }
.summary-line { display: flex; align-items: flex-start; gap: .65rem; }
.summary-line strong { display: block; overflow-wrap: anywhere; }
.summary-line small { display: block; }
.line-qty { min-width: 34px; flex: 0 0 auto; padding: .2rem .4rem; text-align: center; border-radius: 8px; background: #153448; color: #a3e7f7; font-size: .8rem; font-weight: 850; }
.menu-return { width: fit-content; font-size: .86rem; font-weight: 700; }
.pix-instructions { display: flex; align-items: center; gap: .85rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.pix-instructions > div { flex: 1; min-width: 0; gap: .6rem; }
.pix-instructions h2 { font-size: 1rem; }
#pix-code { font-size: .78rem; }
.pay-image { display: block; width: min(34%, 146px); padding: 7px; border-radius: 12px; background: #fff; }
.auto-update { display: flex; align-items: center; gap: .5rem; }
.auto-update::before { background: var(--accent); }

body[data-view="workspace"] > .top { display: none; }
body[data-view="workspace"] .shell { max-width: none; padding: 0; }
.workspace { display: grid; grid-template-columns: 218px minmax(0,1fr); min-height: 100vh; }
.workspace-nav { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 1.65rem; padding: 1.45rem 1rem 1.1rem; background: var(--nav); border-right: 1px solid var(--line); }
.workspace-brand { display: block; width: fit-content; margin: .22rem .5rem 0; }
.workspace-brand img { width: 130px; }
.workspace-nav nav { display: grid; gap: .36rem; }
.workspace-tab, .workspace-role { position: relative; display: flex; align-items: center; gap: .7rem; padding: .7rem .75rem; width: 100%; min-height: 44px; background: transparent; color: var(--muted); font-size: .89rem; font-weight: 730; text-align: left; border: 1px solid transparent; border-radius: 11px; }
.workspace-tab.selected, .workspace-role { background: #142936; border-color: #244453; color: #c5f3ff; }
.workspace-tab.selected .icon, .workspace-role .icon { color: var(--accent); }
.workspace-nav-bottom { display: grid; gap: .55rem; margin-top: auto; }
.workspace-nav-bottom button { display: flex; align-items: center; justify-content: space-between; text-align: left; padding-inline: .75rem; }
.role-name { margin-left: .75rem; color: var(--muted); font-size: .79rem; font-weight: 700; }
.workspace-main { width: min(100%,1510px); min-width: 0; margin: 0 auto; padding: clamp(1.35rem,4vw,3.15rem) clamp(1rem,3.1vw,3rem) 4rem; }
.workspace-heading { margin-bottom: 1.55rem; align-items: end; }
.workspace-heading .demo-mark { padding-bottom: .28rem; }
.workspace-date { margin-bottom: .35rem; color: var(--muted); font-size: .81rem; font-weight: 700; }
.workspace-date::first-letter { text-transform: uppercase; }
.operation-intro { min-height: 34px; }
.operation-intro .badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; margin-right: .38rem; background: currentColor; }

.station-board { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; gap: .82rem; }
.station-column { min-width: 0; min-height: 185px; padding: .8rem; border: 1px solid var(--line); border-radius: 17px; background: #0d1722; --stage: var(--amber); }
.station-column[data-stage="preparing"] { --stage: var(--blue); }
.station-column[data-stage="ready"] { --stage: var(--green); }
.station-heading { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .15rem .15rem .65rem; }
.station-heading h3 { display: flex; align-items: center; gap: .5rem; }
.station-heading h3 span { width: 7px; height: 7px; border-radius: 50%; background: var(--stage); }
.ticket { display: grid; align-content: start; gap: .75rem; padding: .86rem; border-radius: 13px; background: #142231; }
.ticket-head h3 { font-size: 1.42rem; overflow-wrap: anywhere; }
.ticket-head small { display: block; }
.ticket-time { text-align: right; font-variant-numeric: tabular-nums; }
.ticket-time strong { display: block; }
.ticket-lines { display: grid; gap: .5rem; padding: .68rem 0; border-block: 1px solid var(--line); }
.ticket-lines p { display: flex; align-items: flex-start; gap: .5rem; font-size: .91rem; overflow-wrap: anywhere; }
.ticket-actions { display: grid; gap: .4rem; }
.ticket-actions button { min-height: 42px; padding: .43rem .62rem; font-size: .79rem; }
.station-column .ticket-actions .row > button { width: 100%; }
.ticket-grid { align-items: start; grid-template-columns: repeat(3,minmax(0,1fr)); }

.table-map { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: .68rem; }
.table-tile { padding: .78rem; min-width: 0; min-height: 102px; border: 1px solid var(--line); border-radius: 12px; background: #0d1722; }
.table-tile-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); margin-bottom: .62rem; }
.table-tile-top > span:last-child { width: 7px; height: 7px; border-radius: 50%; background: #6d8395; }
.table-tile strong { display: block; font-size: .96rem; overflow-wrap: anywhere; }
.table-tile p { color: var(--muted); font-size: .77rem; }
.table-tile.occupied { border-color: #357580; background: #12313b; }
.table-tile.occupied .table-tile-top, .table-tile.occupied p { color: #a1e9f9; }
.table-tile.occupied .table-tile-top > span:last-child { background: var(--accent); }
.call-row { border: 1px solid #60462e; border-radius: 11px; background: #33281f; color: var(--amber); padding: .55rem .65rem; }

.section-tabs { display: flex; gap: .42rem; flex-wrap: wrap; }
.section-tabs button { min-height: 42px; font-size: .84rem; }
.section-tabs button.selected { background: #193746; border-color: #326274; color: #c4f3ff; }
.sales-control { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; background: radial-gradient(ellipse at 95% 5%, #173242 0, transparent 70%), var(--surface); }
.sales-info p, .catalog-admin > div p { color: var(--muted); font-size: .87rem; }
.sales-info p { margin-top: .35rem; }
.sales-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.sales-actions a { font-size: .8rem; font-weight: 750; }
#admin-search { max-width: 100%; }
.catalog-admin #admin-items { gap: .42rem; }
.catalog-entry { background: #0d1722; border-radius: 11px; padding: .68rem .75rem; }
.catalog-entry summary { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(72px,auto) 13px; align-items: center; gap: .7rem; list-style: none; min-height: 34px; }
.catalog-entry summary::-webkit-details-marker { display: none; }
.catalog-entry summary .badge { justify-self: start; }
.entry-name { font-weight: 750; overflow-wrap: anywhere; }
.entry-price { font-size: .83rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.catalog-entry .chevron { justify-self: end; display: block; width: 7px; height: 7px; margin-right: 3px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.catalog-entry[open] .chevron { transform: rotate(225deg); }
.new-item { border-color: #2d5b68; background: #122d3b; color: #b7f0ff; }
.new-item summary { grid-template-columns: minmax(0,1fr) 13px; }
.edit-form { display: grid; gap: .75rem; }
.edit-form button { justify-self: start; }
.table-admin .split { grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); }
.table-admin .edit-form { background: #0d1722; }
.table-admin .edit-form a { font-size: .83rem; font-weight: 730; }
.inline-control { display: grid; gap: .65rem; grid-template-columns: repeat(auto-fit,minmax(min(100%,145px),1fr)); }

.filters-panel { padding: .85rem 1rem; }
.filters-panel form { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: .65rem; }
.filters-panel .inline-control { grid-template-columns: repeat(2,minmax(122px,1fr)) repeat(4,minmax(0,1fr)); }
.filters-panel button { display: flex; align-items: center; justify-content: center; gap: .45rem; background: var(--raised); color: var(--ink); border-color: #365469; font-size: .82rem; }
.kpis { display: grid; grid-template-columns: 1.3fr repeat(4,minmax(0,1fr)); gap: .65rem; }
.kpi { min-height: 111px; display: grid; align-content: space-between; gap: .66rem; padding: .9rem; }
.kpi .row { flex-wrap: nowrap; align-items: start; }
.kpi .icon { color: var(--muted); margin-top: .12rem; }
.kpi strong { font-size: clamp(1.23rem,2.55vw,2rem); letter-spacing: -.057em; line-height: 1.06; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi small { font-weight: 730; }
.kpi-primary { background: radial-gradient(ellipse at top right,#21566c,#133044 64%); border-color: #367487; }
.kpi-primary :is(.icon,strong) { color: #a0ebff; }
.kpi-primary small { color: #d3f4fc; }
.dashboard-split { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(0,1fr); gap: 1rem; }
.chart-panel, .source-panel { align-content: start; }
.chart-panel canvas { display: block; width: 100%; height: 205px; }
.chart-legend { display: inline-flex; align-items: center; gap: .36rem; color: var(--muted); font-size: .74rem; font-weight: 700; }
.chart-legend::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.chart-panel details { color: var(--muted); font-size: .78rem; }
.hour-values { display: grid; gap: .35rem; }
.hour-values > div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: .2rem; }
.empty-chart { min-height: 155px; display: grid; place-items: center; }
.source-panel > .stack { gap: 1.25rem; }
.source-row { display: grid; gap: .42rem; padding: .68rem .72rem; border: 1px solid var(--line); border-radius: 12px; background: #0c1722; }
.source-row .row { gap: .25rem .5rem; }
.source-title { font-weight: 700; }
.source-row strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.source-row small { font-size: .75rem; }
meter { display: block; width: 100%; height: 11px; accent-color: var(--accent); }
meter::-webkit-meter-bar { background: #243443; border: 0; border-radius: 20px; }
meter::-webkit-meter-optimum-value { background: #60d4ee; border-radius: 20px; }
meter.source-nfc::-webkit-meter-optimum-value { background: #8de7b6; }
meter::-moz-meter-bar { background: #60d4ee; border-radius: 20px; }
meter.source-nfc::-moz-meter-bar { background: #8de7b6; }
.funnel { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .6rem; }
.funnel > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem .45rem; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 11px; background: #0d1722; }
.funnel strong { font-size: 1.45rem; line-height: 1.08; letter-spacing: -.04em; }
.funnel span { font-size: .82rem; color: var(--muted); }

@media (max-width: 1130px) {
  .workspace { grid-template-columns: 174px minmax(0,1fr); }
  .workspace-main { padding-inline: 1.25rem; }
  .filters-panel .inline-control { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .table-map { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 870px) {
  .kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dashboard-split { grid-template-columns: minmax(0,1fr); }
  .source-panel > .stack { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
  .ticket-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .station-board { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 690px) {
  .top-inner { min-height: 58px; }
  .top img { width: 101px; }
  .shell { padding-inline: .8rem; }
  .login-layout { grid-template-columns: minmax(0,1fr); min-height: 0; margin-top: 0; }
  .login-visual { min-height: 174px; padding: 1.15rem; background-position: center 56%; }
  .login-card { padding: 1.35rem; gap: 1.15rem; }
  .login-card h1 br { display: none; }
  .login-card h1 { font-size: clamp(2rem,8vw,2.8rem); }
  .checkout-wrap { margin-top: 0; }
  .payment-heading { min-height: 155px; border-radius: 18px; }
  .payment-icon { border-radius: 13px; }
  .checkout-grid { grid-template-columns: minmax(0,1fr); }
  .workspace { display: block; }
  .workspace-nav { height: auto; z-index: 3; flex-direction: row; align-items: center; flex-wrap: wrap; gap: .4rem .6rem; padding: .58rem .78rem; border: solid var(--line); border-width: 0 0 1px; }
  .workspace-brand { margin: 0; }
  .workspace-brand img { width: 97px; }
  .workspace-nav nav { order: 3; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; }
  .workspace-tab, .workspace-role { font-size: .78rem; min-height: 42px; gap: .4rem; justify-content: center; padding: .4rem .3rem; }
  .workspace-role { width: auto; min-height: 35px; padding-inline: .5rem; }
  .workspace-nav-bottom { margin: 0 0 0 auto; }
  .workspace-nav-bottom button { min-height: 37px; padding: .35rem .6rem; gap: .4rem; font-size: .78rem; }
  .role-name { display: none; }
  .workspace-main { padding: 1.2rem .8rem 2rem; }
  .workspace-heading { margin-bottom: 1rem; }
  .table-map { grid-template-columns: repeat(3,minmax(0,1fr)); gap: .45rem; }
  .table-tile { padding: .65rem .55rem; }
  .filters-panel form { grid-template-columns: minmax(0,1fr); }
  .filters-panel .inline-control { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 460px) {
  .payment-heading h1 { font-size: clamp(1.85rem,8.5vw,2.7rem); }
  .kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .kpi-primary { grid-column: 1/-1; }
  .kpi { min-height: 92px; }
  .station-board, .ticket-grid { grid-template-columns: minmax(0,1fr); }
  .station-column { min-height: 0; }
  .table-map { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalog-entry summary { gap: .4rem; grid-template-columns: minmax(0,1fr) auto 12px; }
  .catalog-entry summary .badge { grid-column: 1; grid-row: 2; }
  .catalog-entry summary .chevron { grid-column: 3; grid-row: 1; }
  .new-item summary { grid-template-columns: minmax(0,1fr) 12px; }
  .new-item summary .chevron { grid-column: 2; }
}
@media (max-width: 350px) {
  .workspace-tab .icon { display: none; }
  .source-panel > .stack { grid-template-columns: minmax(0,1fr); }
  .order-reference { gap: .32rem; }
}
