/* Caixa: Paella Mineira Solidária. Tokens e componentes. */

@font-face {
  font-family: "Public Sans";
  src: url(assets/fonts/PublicSans.ttf) format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* identidade visual: paleta oficial do logo da 7ª Paella */
  --cor-primaria: #902539;
  --cor-primaria-hover: #721B2E;
  --cor-acento: #E87717;
  --cor-acento-hover: #F58B2A;
  --cor-fundo: #FFF7EA;
  --cor-fundo-secundario: #F5E9DB;
  --cor-superficie: #FFFCF7;
  --cor-superficie-elevada: #FFFFFF;
  --cor-texto: #351C24;
  --cor-texto-secundario: #715D62;
  --cor-texto-claro: #FFFFFF;
  --cor-borda: #DECBBA;
  --cor-foco: #902539;
  --cor-erro: #B42335;
  --cor-sucesso: #286A4C;
  --sombra-suave: 0 8px 26px rgba(53, 28, 36, 0.08);

  /* nomes usados pelos componentes */
  --wine: var(--cor-primaria);
  --wine-deep: var(--cor-primaria-hover);
  --accent: var(--cor-acento);
  --on-accent: var(--cor-texto);
  --ground: var(--cor-fundo);
  --surface: var(--cor-superficie);
  --elevated: var(--cor-superficie-elevada);
  --raised: var(--cor-fundo-secundario);
  --raised-2: color-mix(in srgb, var(--cor-fundo-secundario) 70%, var(--cor-borda));
  --line: var(--cor-borda);
  --line-strong: color-mix(in srgb, var(--cor-borda) 60%, var(--cor-texto-secundario));
  --text: var(--cor-texto);
  --muted: var(--cor-texto-secundario);
  --ok: var(--cor-sucesso);
  --danger: var(--cor-erro);
  --warn: #9A5107;
  --focus: var(--cor-foco);

  --font: "Public Sans", "Segoe UI", system-ui, sans-serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r: 8px; --r-lg: 12px;
  --target: 48px;
  --shadow: var(--sombra-suave);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font: 400 17px/1.5 var(--font);
  display: flex; flex-direction: column; overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--text); }
input { caret-color: var(--wine); }
::placeholder { color: #85676C; opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--wine); }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: 8px; top: -64px; background: var(--accent); color: var(--on-accent); padding: 12px 16px; border-radius: var(--r); z-index: 100; font-weight: 700; }
.skip:focus { top: 8px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

svg.i { width: 24px; height: 24px; flex: none; color: inherit; --duo: 0; }
kbd { font: 600 12px/1 var(--font); padding: 4px 6px; border-radius: 4px; border: 1px solid currentColor; opacity: .75; white-space: nowrap; margin-left: 6px; }

/* cabeçalho */
.topbar { display: flex; align-items: center; gap: var(--s5); padding: 0 var(--s5); min-height: 78px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--sombra-suave); flex: none; position: relative; z-index: 2; }
.brand { display: flex; align-items: center; gap: var(--s3); min-width: 0; flex: none; }
.brand .logo-full { height: 60px; width: auto; display: block; }
.host-seal { width: 48px; height: 48px; border-radius: 50%; display: block; flex: none; box-shadow: 0 2px 8px rgba(53, 28, 36, .16); }
.bw { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.bt { font-weight: 700; letter-spacing: -.01em; font-size: 22px; white-space: nowrap; }
.be { font-size: 15px; color: var(--muted); }
.tabs { display: flex; gap: var(--s1); flex: 1; min-width: 0; align-self: stretch; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; display: inline-flex; align-items: center; gap: var(--s2); padding: 0 var(--s4);
  background: transparent; border: 0; color: var(--muted); font-weight: 600; white-space: nowrap;
  transition: background-color .12s var(--ease), color .12s var(--ease);
}
.tab:focus-visible { outline-offset: -5px; }
.tab:hover { background: var(--raised); color: var(--text); }
.tab[aria-current="page"] { color: var(--wine); font-weight: 700; }
.tab[aria-current="page"] svg.i { --duo: .3; }
.tab[aria-current="page"]::after { content: ""; position: absolute; left: var(--s3); right: var(--s3); bottom: 0; height: 3px; background: var(--accent); border-radius: 3px 3px 0 0; }
.topbar-end { display: flex; align-items: center; gap: var(--s4); flex: none; }
.status { display: inline-flex; align-items: center; gap: var(--s2); font-size: 16px; color: var(--muted); }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.status.warn { color: var(--danger); font-weight: 700; }
.status.warn::before { background: var(--danger); }
.who { display: flex; align-items: center; gap: var(--s2); }
.who .nm { font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

main { flex: 1; min-height: 0; padding: var(--s5); overflow: auto; width: 100%; max-width: 1560px; margin: 0 auto; }
main:focus { outline: none; }
main.bare { padding: 0; max-width: none; }

/* botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--target); padding: 0 var(--s4); border-radius: var(--r);
  background: var(--elevated); color: var(--text); border: 1px solid var(--line-strong); font-weight: 600; line-height: 1.2; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(53, 28, 36, .06);
  transition: background-color .12s var(--ease), border-color .12s var(--ease), transform .12s var(--ease), box-shadow .12s var(--ease);
}
.btn { text-decoration: none; }
.btn:hover:not(:disabled) { background: var(--raised); border-color: var(--wine); transform: translateY(-1px); box-shadow: var(--sombra-suave); }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
.btn:disabled { background: transparent; color: var(--muted); border: 1px dashed var(--line-strong); opacity: .8; box-shadow: none; }
.btn.primary { background: var(--wine); color: var(--cor-texto-claro); border-color: transparent; font-weight: 700; }
.btn.primary:hover:not(:disabled) { background: var(--wine-deep); border-color: transparent; }
.btn.primary:disabled { background: var(--raised-2); color: var(--muted); border: 1px dashed var(--line-strong); }
.btn.ghost { background: transparent; border-color: var(--line-strong); box-shadow: none; }
.btn.ghost:hover:not(:disabled) { background: var(--raised); }
.slip-head .btn { min-height: 48px; }
.btn.danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); box-shadow: none; }
.btn.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 8%, transparent); border-color: var(--danger); }
.btn.icon { width: var(--target); padding: 0; }
.btn.sm { min-height: 48px; padding: 0 var(--s3); font-size: 16px; }
.btn.go { min-height: 60px; width: 100%; font-size: 20px; font-weight: 700; }
.btn.go svg.i { width: 28px; height: 28px; }

/* campos */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-weight: 600; font-size: 16px; }
.input {
  min-height: 52px; width: 100%; padding: 0 var(--s3); background: var(--elevated); color: var(--text);
  border: 1px solid var(--cor-borda); border-radius: var(--r); transition: border-color .12s var(--ease);
}
.input:hover { border-color: var(--line-strong); }
.input:focus-visible { border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 0; }
.input.big { font-size: 26px; font-weight: 700; min-height: 56px; font-variant-numeric: tabular-nums; }
select.input { appearance: auto; }
.err { color: var(--danger); font-size: 16px; font-weight: 700; }
.err:empty { display: none; }
.sub { color: var(--muted); font-size: 16px; }

/* caixa */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: var(--s5); height: 100%; min-height: 0; }
.catalog { display: flex; flex-direction: column; gap: var(--s3); min-height: 0; }
.search { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s4); background: var(--elevated); border: 1px solid var(--cor-borda); border-radius: var(--r); transition: border-color .12s var(--ease); }
.search:focus-within { border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 0; }
.search svg.i { color: var(--muted); }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; font-size: 20px; min-height: 60px; }
.hint { color: var(--muted); font-size: 16px; min-height: 22px; }
.grid { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); grid-auto-rows: max-content; gap: var(--s3); padding: 6px; align-content: start; }
.tile {
  min-height: 112px;
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: var(--s3); text-align: left; padding: var(--s2) var(--s2) var(--s4);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: background-color .12s var(--ease), border-color .12s var(--ease), transform .12s var(--ease);
}
.tile:hover { background: var(--elevated); border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--sombra-suave); }
.tile:active { transform: scale(.985); }
.tile.hit { border-color: var(--wine); outline: 1px solid var(--wine); }
.tile.sel { border-color: var(--wine); background: var(--elevated); }
.tile .info { display: flex; flex-direction: column; justify-content: space-between; gap: var(--s3); flex: 1; min-width: 0; }
.media { display: grid; place-items: center; overflow: hidden; background: var(--raised-2); border-radius: var(--r); flex: none; }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media svg.i { --duo: .35; width: 44px; height: 44px; }
.tile .media { width: 100%; height: 108px; }
.tile .info { padding: 0 var(--s2); }
.tile .name { padding-right: 0; }
.tile .count { top: var(--s3); right: var(--s3); box-shadow: 0 2px 8px rgba(53, 28, 36, .11); }
.photo-pick { display: flex; align-items: center; gap: var(--s4); }
.photo-pick .media { width: 96px; height: 96px; }
.photo-actions { display: flex; flex-direction: column; gap: var(--s2); align-items: flex-start; }
.tile .name { font-size: 20px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; padding-right: 44px; text-wrap: balance; }
.tile .name .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: var(--s2); vertical-align: 1px; }
.tile .price { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.tile .left { font-size: 15px; font-weight: 600; white-space: nowrap; }
.tile .left.low { color: var(--warn); }
.tile.out { opacity: .55; }
.tile:disabled:hover { transform: none; background: var(--surface); border-color: var(--line); box-shadow: none; }
.stepper button:disabled { opacity: .4; }
.tile .count { position: absolute; right: var(--s3); top: var(--s3); min-width: 34px; height: 34px; padding: 0 var(--s2); border-radius: 17px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 18px; line-height: 34px; text-align: center; font-variant-numeric: tabular-nums; animation: pop .16s var(--ease); }
@keyframes pop { from { transform: scale(.7); } }

.empty { margin: auto; max-width: 340px; text-align: center; padding: var(--s6) var(--s4); }
.empty strong { display: block; font-size: 20px; font-weight: 700; }
.empty p { color: var(--muted); margin-top: var(--s1); }
.empty .btn { margin-top: var(--s4); }
.grid .empty { grid-column: 1 / -1; }

/* pedido (canhoto) */
.slip { position: relative; display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: var(--s5) 0 var(--s4); }
.slip::before, .slip::after { content: ""; position: absolute; left: 0; right: 0; height: 8px; background: radial-gradient(circle at 8px 0, var(--ground) 5px, transparent 5.5px) 0 0 / 16px 8px repeat-x; pointer-events: none; }
.slip::before { top: 0; }
.slip::after { bottom: 0; transform: scaleY(-1); }
.slip-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: 0 var(--s5) var(--s3); }
.slip-head h2 { font-weight: 700; letter-spacing: -.01em; font-size: 26px; line-height: 1.1; }
.slip-head small { color: var(--muted); font-size: 16px; display: block; }
.lines { flex: 1; min-height: 150px; overflow: auto; padding: 0 var(--s5); display: flex; flex-direction: column; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--s2) var(--s3); padding: var(--s3) 0; border-top: 1px dashed var(--line-strong); }
.line .ln { grid-area: 1 / 1; }
.line .ls { grid-area: 1 / 2; }
.line .stepper { grid-area: 2 / 1 / 3 / 3; justify-self: start; }
.line:first-child { border-top: 0; }
.line .ln { font-weight: 700; overflow-wrap: anywhere; line-height: 1.25; }
.line .unit { color: var(--muted); font-size: 15px; font-weight: 400; display: block; }
.line .ls { min-width: 88px; text-align: right; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stepper { display: inline-flex; align-items: center; }
.stepper button { width: 48px; height: 48px; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line-strong); transition: background-color .12s var(--ease); }
.stepper button:first-child { border-radius: var(--r) 0 0 var(--r); }
.stepper button:last-child { border-radius: 0 var(--r) var(--r) 0; }
.stepper button:hover { background: var(--raised-2); }
.stepper output { min-width: 48px; height: 48px; display: grid; place-items: center; font-weight: 800; font-size: 19px; border-block: 1px solid var(--line-strong); background: var(--elevated); font-variant-numeric: tabular-nums; }
.slip-foot { padding: var(--s3) var(--s5) 0; display: flex; flex-direction: column; gap: 10px; }
.total { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); padding-top: var(--s3); border-top: 2px solid var(--line-strong); }
.total span { font-weight: 600; color: var(--muted); }
.total strong { color: var(--wine); font-size: clamp(40px, 3.6vw, 50px); font-weight: 700; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); }
.seg button { min-height: 62px; padding: 6px 2px; border-radius: var(--r); background: transparent; border: 1px solid var(--line-strong); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 15px; font-weight: 600; transition: background-color .12s var(--ease), border-color .12s var(--ease); }
.seg button:hover { background: var(--raised); }
.seg button[aria-pressed="true"] { background: var(--raised); border: 2px solid var(--wine); font-weight: 700; }
.seg button[aria-pressed="true"] svg.i { --duo: .3; }
.cash { display: flex; flex-direction: column; gap: var(--s2); }
.cash .field { flex-direction: row; align-items: center; gap: var(--s3); }
.cash .field > label { flex: none; }
.quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s2); }
.quick .btn { padding: 0 var(--s1); min-height: 48px; }
.change { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: 8px var(--s4); border-radius: var(--r); background: var(--elevated); border: 1px solid var(--line); }
.change span { font-weight: 600; color: var(--muted); }
.change strong { font-size: 28px; font-weight: 700; line-height: 1.1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.change.ok { border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.change.ok strong { color: var(--ok); }
.change.low { border-color: color-mix(in srgb, var(--danger) 60%, transparent); }
.change.low strong { color: var(--danger); }

/* páginas */
.page { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--s5); }
.page.narrow { max-width: 760px; }
.page.compact { max-width: 980px; }
.page.settings { max-width: 1040px; }
.settings-grid { grid-template-columns: 1fr 1fr; align-items: start; }
.settings-grid > .err, .settings-grid > .form-actions { grid-column: 1 / -1; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.page-head h1 { font-weight: 700; letter-spacing: -.01em; font-size: 34px; line-height: 1.1; }
.page-head .tools { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel > .pad { padding: var(--s5); }
.panel h2 { font-size: 20px; font-weight: 700; }
.panel .lead { color: var(--muted); margin-top: var(--s1); }

.summary { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.summary > div { flex: 1 1 200px; padding: var(--s4) var(--s5); }
.summary > div + div { border-left: 1px solid var(--line); }
.summary dt { color: var(--muted); font-size: 16px; }
.summary dd { color: var(--wine); margin: 2px 0 0; font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.breakdown { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s5); }
.breakdown h2 { font-size: 16px; color: var(--muted); font-weight: 600; margin-bottom: var(--s2); }
.breakdown ul { list-style: none; margin: 0; padding: 0; }
.breakdown li { display: flex; justify-content: space-between; gap: var(--s3); padding: 6px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.breakdown li:last-child { border-bottom: 0; }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 600; font-size: 16px; color: var(--muted); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.tbl td { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--raised); }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .act { text-align: right; white-space: nowrap; }
.tbl .act .btn + .btn { margin-left: var(--s2); }
.tbl .strong { font-weight: 700; }
.tbl .nw { white-space: nowrap; }
.tbl-wrap { overflow-x: auto; }
.badge { display: inline-flex; align-items: center; padding: 2px var(--s2); border-radius: 4px; font-size: 15px; font-weight: 700; border: 1px solid var(--line-strong); white-space: nowrap; }
.badge.warn { border-color: var(--warn); color: var(--warn); }
.badge.off { color: var(--muted); border-style: dashed; }
.dotc { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--c); vertical-align: -1px; margin-right: var(--s2); }

.seg2 { display: inline-flex; padding: 3px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); }
.seg2 button { min-height: 48px; padding: 0 var(--s4); border: 0; background: transparent; border-radius: 6px; font-weight: 600; color: var(--muted); }
.seg2 button[aria-pressed="true"] { background: var(--raised-2); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }

.form { display: grid; gap: var(--s4); }
.form.two { grid-template-columns: 1fr 1fr; }
.form-actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
.swatches { display: flex; gap: var(--s2); flex-wrap: wrap; }
.swatches button { width: var(--target); height: var(--target); border-radius: var(--r); border: 2px solid transparent; background: var(--c); display: grid; place-items: center; color: #fff; }
.swatches svg.i { filter: drop-shadow(0 0 2px rgb(58 15 24 / .85)); }
.swatches button[aria-pressed="true"] { border-color: var(--wine-deep); box-shadow: 0 0 0 2px var(--ground); }
.swatches svg.i { visibility: hidden; width: 26px; height: 26px; }
.swatches button[aria-pressed="true"] svg.i { visibility: visible; }
.switch { display: flex; align-items: center; gap: var(--s3); min-height: 44px; font-weight: 600; }
.switch input { width: 24px; height: 24px; }

/* faixa da edição e contador */
.event-bar { display: flex; align-items: center; gap: var(--s4); padding: 10px var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.eb-ed { font-size: 20px; font-weight: 700; white-space: nowrap; }
.eb-main { flex: 1; min-width: 0; padding-left: var(--s4); border-left: 1px solid var(--line-strong); }
.eb-ed:only-child { padding: 0; }
.eb-nums { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s4); font-size: 16px; color: var(--muted); }
.eb-nums b { font-size: 22px; color: var(--wine); font-variant-numeric: tabular-nums; margin-right: 4px; }
.eb-nums .eb-name { margin-left: auto; }
.eb-bar { height: 8px; margin-top: 8px; border-radius: 4px; background: var(--raised); overflow: hidden; }
.eb-bar i { display: block; height: 100%; border-radius: 4px; background: var(--wine); transition: width .4s var(--ease); }
.event-bar.low .eb-bar i { background: var(--warn); }
.act-stock { display: flex; gap: var(--s2); align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.input.qty { width: 150px; }
.muted { color: var(--muted); font-weight: 400; }
.auth-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; color: var(--muted); font-size: 17px; }
.auth-info strong, .auth-info b { color: var(--text); font-size: 21px; font-weight: 700; }

/* ticket da tela de login */
.ticket-wrap { margin-top: var(--s5); filter: drop-shadow(0 6px 10px rgba(53, 28, 36, .14)); }
.ticket {
  --cut: 78px; background: var(--elevated); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  -webkit-mask: radial-gradient(circle 12px at 0 var(--cut), #0000 96%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% var(--cut), #0000 96%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 12px at 0 var(--cut), #0000 96%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% var(--cut), #0000 96%, #000) right / 51% 100% no-repeat;
}
.tk-top { height: var(--cut); padding: 0 var(--s5); display: flex; flex-direction: column; justify-content: center; border-bottom: 2px dashed var(--line-strong); background: var(--raised); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.tk-top strong { font-size: 25px; font-weight: 700; line-height: 1.15; }
.tk-top span { color: var(--muted); font-size: 16px; }
.tk-counts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); padding: var(--s4) var(--s5) var(--s2); }
.tk-counts b { color: var(--wine); display: block; font-size: 36px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tk-counts span { color: var(--muted); font-size: 16px; }
.tk-foot { margin: 0; padding: var(--s2) var(--s5) var(--s4); color: var(--muted); font-size: 16px; }
.settings-grid > .full { grid-column: 1 / -1; }

/* acesso */
.auth { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-art { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s5); padding: var(--s6); background: var(--raised); overflow: hidden; }
.collage { position: relative; width: min(100%, 640px); height: min(70vh, 680px); flex: none; }
.host { display: flex; align-items: center; gap: var(--s4); width: min(100%, 640px); padding-top: var(--s4); border-top: 1px solid var(--cor-borda); color: var(--muted); font-size: 15px; line-height: 1.35; }
.host img { width: 72px; height: 72px; border-radius: 50%; flex: none; box-shadow: 0 2px 8px rgba(53, 28, 36, .16); }
.host p { margin: 0; }
.host span { display: block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.collage .ph { position: absolute; margin: 0; border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 24px 56px rgba(53, 28, 36, .13); background: var(--ground); translate: calc(var(--mx, 0) * var(--k, 8px)) calc(var(--my, 0) * var(--k, 8px)); transition: translate .3s ease-out; animation: rise-in .9s var(--ease) both; }
.collage .ph img { transform-origin: 50% 50%; animation: drift 22s ease-in-out infinite alternate; }
.collage .a { --k: 9px; }
.collage .b { --k: -15px; animation-delay: .18s; }
.collage .b img { animation-duration: 27s; animation-direction: alternate-reverse; }
@keyframes rise-in { from { opacity: 0; transform: translateY(30px) scale(.97); } }
@keyframes drift { from { transform: scale(1.03); } to { transform: scale(1.1) translate(-1.5%, -1%); } }
.collage .ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.collage .a { left: 0; top: 0; width: 55%; height: 78%; }
.collage .a img { object-position: 38% 50%; }
.collage .b { right: 0; bottom: 0; width: 55%; height: 78%; border: 6px solid var(--raised); }
.collage .b img { object-position: 50% 50%; }
.auth-form { display: flex; flex-direction: column; padding: var(--s7); background: var(--ground); }
.auth-wrap { width: 100%; max-width: 420px; margin: auto; display: flex; flex-direction: column; gap: 40px; }
.auth-wrap > * { animation: rise-in .7s var(--ease) both; }
.auth-wrap > :nth-child(2) { animation-delay: .12s; }
.auth-wrap > :nth-child(3) { animation-delay: .24s; }
.auth-brand { display: block; }
.login-logo { width: 100%; max-width: 420px; height: auto; display: block; }
.auth-form form { display: flex; flex-direction: column; gap: var(--s4); }
.auth-form h1 { font-weight: 700; letter-spacing: -.01em; font-size: 38px; line-height: 1.1; }
.auth-form .btn.primary { min-height: 56px; font-size: 18px; }

/* diálogos e avisos */
.scrim { position: fixed; inset: 0; background: rgba(53, 28, 36, .5); display: grid; place-items: center; z-index: 50; padding: var(--s4); animation: fade .18s var(--ease); }
.modal { width: min(520px, 100%); max-height: 94vh; overflow: auto; background: var(--elevated); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s4); box-shadow: 0 24px 60px rgba(53, 28, 36, .14); animation: rise .2s var(--ease); }
.modal h2 { font-size: 24px; font-weight: 700; }
.modal p { color: var(--muted); }
.modal .actions { display: flex; gap: var(--s2); justify-content: flex-end; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.toasts { position: fixed; left: 50%; bottom: var(--s5); transform: translateX(-50%); display: flex; flex-direction: column; gap: var(--s2); z-index: 60; width: min(580px, calc(100% - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); background: var(--elevated); border: 1px solid var(--line-strong); border-radius: var(--r); font-weight: 600; box-shadow: 0 12px 32px rgba(53, 28, 36, .13); animation: rise .2s var(--ease); }
.toast svg.i { color: var(--ok); }
.toast.error { border-color: var(--danger); }
.toast.error svg.i { color: var(--danger); }
.toast span { flex: 1; }

/* ao confirmar, o canhoto sai do painel */
.slip.ghost { pointer-events: none; }

@media (max-height: 900px) {
  .auth-wrap { gap: var(--s4); }
  .auth-form { padding: var(--s5) var(--s7); }
  .auth-form h1 { font-size: 30px; }
  .auth-form form { gap: var(--s3); }
  .auth-form form > .sub { display: none; }
  .tk-counts b { font-size: 30px; }
  .tk-counts { padding-top: var(--s3); }
}
@media (max-width: 1600px) {
  .status .st-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .who .nm { max-width: 110px; }
}
@media (max-width: 1500px) {
  .tab kbd { display: none; }
  .topbar { gap: var(--s3); }
  .bt { font-size: 20px; }
  .tab { padding: 0 9px; gap: 6px; }
  .brand .logo-full { height: 52px; }
  .host-seal { width: 40px; height: 40px; }
  .who .nm { max-width: 160px; }
}
@media (max-width: 1380px) {
  .topbar { gap: var(--s3); padding: 0 var(--s4); }
  .bt { font-size: 18px; }
  .tab { padding: 0 var(--s2); gap: 6px; }
  .who .nm { max-width: 130px; }
}
@media (min-width: 901px) and (max-height: 760px) {
  .topbar { min-height: 66px; }
  .brand .logo-full { height: 46px; }
  .host-seal { width: 40px; height: 40px; }
  main { padding: var(--s4) var(--s5); }
  .hint { display: none; }
  .event-bar { padding: 6px var(--s3); }
  .eb-bar { margin-top: 4px; }
  .search input { min-height: 52px; }
  .slip { padding: var(--s4) 0 var(--s3); }
  .slip-head { padding-bottom: var(--s2); }
  .slip-head h2 { font-size: 22px; }
  .lines { min-height: 90px; }
  .line { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; padding: var(--s2) 0; }
  .line .ln { grid-area: 1 / 1; }
  .line .stepper { grid-area: 1 / 2; justify-self: end; }
  .line .ls { grid-area: 1 / 3; min-width: 70px; font-size: 17px; }
  .line .ln { font-size: 16px; }
  .line .unit { display: none; }
  .slip-foot { gap: var(--s2); padding-top: var(--s2); }
  .total { padding-top: var(--s2); }
  .total strong { font-size: 38px; }
  .seg button { min-height: 48px; }
  .input.big { min-height: 52px; font-size: 24px; }
  .change { padding: 6px var(--s4); }
  .change strong { font-size: 24px; }
  .btn.go { min-height: 56px; }
}
@media (min-width: 901px) and (max-height: 680px) {
  .topbar { min-height: 60px; }
  .brand .logo-full { height: 42px; }
  .slip-head small { display: none; }
  .btn.go { min-height: 52px; }
  .input.big { min-height: 48px; }
}
@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; padding-top: var(--s2); gap: var(--s2) var(--s4); }
  .tabs { order: 3; flex-basis: 100%; min-height: 52px; }
  .who .nm, .status { display: none; }
  .topbar-end { margin-left: auto; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: var(--s5); }
  .collage { height: 44vh; max-width: 460px; }
  .auth-form { padding: var(--s5); }
}
@media (max-width: 900px) {
  body { overflow: auto; }
  main { overflow: visible; }
  .pos { grid-template-columns: minmax(0, 1fr); height: auto; }
  .grid { max-height: 52vh; }
  .form.two, .settings-grid { grid-template-columns: 1fr; }
  .summary > div + div { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .topbar, main { padding-left: var(--s4); padding-right: var(--s4); }
  .bw { display: none; }
  .brand .logo-full { height: 38px; }
  .quick { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .collage .ph, .collage .ph img { animation: none !important; translate: none !important; }
}

@media (max-height: 700px) {
  .auth-form h1, .tk-foot { display: none; }
  .tk-top { --cut: 64px; height: 64px; }
  .ticket { --cut: 64px; }
  .tk-counts { padding-bottom: var(--s4); }
}

@media (max-width: 1100px) { .host-seal { display: none; } }

/* fechamento de caixa */
.input.close { width: 150px; min-height: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.diff { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.diff.ok { color: var(--ok); }
.diff.low { color: var(--danger); }
.tbl tfoot th { border-top: 2px solid var(--line-strong); border-bottom: 0; color: var(--text); font-size: 17px; font-weight: 700; }
.summary dd.sm { font-size: 20px; line-height: 1.4; }
.sec { font-size: 20px; font-weight: 700; margin-bottom: var(--s3); }
.modal .tbl th, .modal .tbl td { padding: var(--s2) var(--s3); }
