/* GastroApp setup wizard
   Signature: the setup summary is a thermal POS receipt that "prints" line by line as steps are completed. */

:root {
    --violet: #5E17EB;
    --violet-deep: #3D0FA3;
    --violet-soft: #EFE8FF;
    --ink: #1D1033;
    --ink-2: #4A4163;
    --ink-3: #7C7594;
    --porcelain: #F7F5FB;
    --paper: #FFFFFF;
    --mist: #E6E1F2;
    --mist-2: #D5CDEA;
    --lime: #C7FF17;
    --lime-ink: #253300;
    --tomato: #D93A3F;
    --tomato-soft: #FDECEC;
    --ok: #16865A;

    --font-display: "Bricolage Grotesque", "Poppins", system-ui, sans-serif;
    --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow-card: 0 1px 0 rgba(29, 16, 51, .04), 0 12px 32px -18px rgba(61, 15, 163, .25);
    --focus: 0 0 0 3px rgba(94, 23, 235, .35);
    --bar-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; } /* no horizontal jump between short and long steps */

body {
    margin: 0;
    background: var(--porcelain);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; margin: 0; color: var(--ink); }
p { margin: 0; }
a { color: var(--violet); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
svg[aria-hidden="true"] { width: 18px; height: 18px; flex: none; }
.menu-empty svg[aria-hidden="true"] { width: 44px; height: 44px; color: var(--mist-2); }
.drop > svg[aria-hidden="true"] { width: 40px; height: 40px; }
.venue svg[aria-hidden="true"] { width: 28px; height: 28px; }
.device h3 svg[aria-hidden="true"] { width: 22px; height: 22px; }
.hit .pin svg[aria-hidden="true"] { width: 18px; height: 18px; }

/* ── Boot splash (before WASM is ready) ───────────────────────────────────── */
.boot { min-height: 100vh; display: grid; place-content: center; gap: 22px; justify-items: center; }
.boot-bar { width: 140px; height: 4px; border-radius: 99px; background: var(--mist); overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 40%; background: var(--violet); border-radius: 99px; animation: boot 1.2s ease-in-out infinite; }
@keyframes boot { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

#blazor-error-ui { display: none; position: fixed; inset: auto 16px 16px 16px; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--radius-sm); z-index: 100; gap: 12px; align-items: center; justify-content: space-between; }
#blazor-error-ui .reload { color: var(--lime); font-weight: 600; }

/* ── Shell ────────────────────────────────────────────────────────────────── */
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 16px;
    padding: 12px max(16px, env(safe-area-inset-left));
    background: rgba(247, 245, 251, .86);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--mist);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand img { width: 30px; height: 30px; }
.brand small { font-family: var(--font-body); font-weight: 500; font-size: 12px; color: var(--ink-3); letter-spacing: 0; margin-left: 2px; }
.topbar-spacer { flex: 1; }

.lang-select { position: relative; }
.lang-select select {
    appearance: none; border: 1px solid var(--mist-2); background: var(--paper);
    border-radius: 99px; padding: 7px 30px 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.lang-select::after { content: ""; position: absolute; right: 13px; top: 50%; width: 6px; height: 6px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: translateY(-70%) rotate(45deg); pointer-events: none; }

.topbar .ticket-toggle { display: none; }

.layout {
    width: min(1220px, 100%);
    margin: 0 auto;
    padding: 28px 24px 120px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 40px;
    align-items: start;
}

/* ── Stepper ──────────────────────────────────────────────────────────────── */
.stepper { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.stepper li { min-width: 0; }
.stepper button {
    width: 100%; display: grid; gap: 7px; text-align: left; background: none; border: 0; padding: 0; cursor: pointer;
    color: var(--ink-3); font-size: 12.5px; font-weight: 500;
}
.stepper button:disabled { cursor: default; }
.stepper .rail { height: 5px; border-radius: 99px; background: var(--mist); overflow: hidden; }
.stepper .rail span { display: block; height: 100%; width: 0; background: var(--violet); transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.stepper .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper .done .rail span, .stepper .current .rail span { width: 100%; }
.stepper .current .rail span { background: linear-gradient(90deg, var(--violet) 60%, #8B5CF6); }
.stepper .done button, .stepper .current button { color: var(--ink); }
.stepper .current .label { font-weight: 700; }
.stepper .skipped .label { text-decoration: line-through; opacity: .6; }
.stepper-compact { display: none; }

/* ── Step card ────────────────────────────────────────────────────────────── */
.card { background: var(--paper); border: 1px solid var(--mist); border-radius: 20px; box-shadow: var(--shadow-card); padding: 32px; }
.step-head { display: grid; gap: 6px; margin-bottom: 26px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--violet); }
.step-head h1 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 800; line-height: 1.1; }
.step-head p { color: var(--ink-2); max-width: 62ch; }

.section { display: grid; gap: 14px; }
.section + .section { margin-top: 28px; padding-top: 24px; border-top: 1px dashed var(--mist-2); }
.section-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.hint { font-size: 13px; color: var(--ink-3); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.grid-a { display: grid; grid-template-columns: 2fr 1fr; gap: 14px 16px; }
.grid-b { display: grid; grid-template-columns: 1fr 2fr; gap: 14px 16px; }
.span-2 { grid-column: span 2; }

/* ── Fields ───────────────────────────────────────────────────────────────── */
.field { display: grid; gap: 6px; min-width: 0; align-content: start; } /* a taller neighbour (password meter) must not stretch the input */
.field > label, .field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .optional { font-weight: 400; color: var(--ink-3); }
.input, .field input, .field select {
    width: 100%; min-height: 46px; padding: 10px 14px;
    background: var(--paper); border: 1.5px solid var(--mist-2); border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: #A9A3BD; }
.field input:hover, .field select:hover { border-color: #BDB2DB; }
.field input:focus, .field select:focus, .input:focus { outline: none; border-color: var(--violet); box-shadow: var(--focus); }
.field.invalid input, .field.invalid select { border-color: var(--tomato); background: #FFFBFB; }
.field-error { font-size: 12.5px; color: var(--tomato); font-weight: 500; }
.field-note { font-size: 12.5px; color: var(--ink-3); }
.field-ok { font-size: 12.5px; color: var(--ok); font-weight: 500; }

.with-suffix { position: relative; }
.with-suffix input { padding-right: 46px; }
.with-suffix .suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-family: var(--font-mono); font-size: 13px; }

.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px; }
.meter span { height: 4px; border-radius: 99px; background: var(--mist); }
.meter[data-score="1"] span:nth-child(-n+1) { background: var(--tomato); }
.meter[data-score="2"] span:nth-child(-n+2) { background: #E3A008; }
.meter[data-score="3"] span:nth-child(-n+3) { background: #7AB800; }
.meter[data-score="4"] span { background: var(--ok); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1.5px solid transparent;
    font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: transform .08s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--violet); color: #fff; box-shadow: 0 8px 20px -10px rgba(94, 23, 235, .8); }
.btn-primary:hover:not(:disabled) { background: var(--violet-deep); }
.btn-secondary { background: var(--paper); border-color: var(--mist-2); color: var(--ink); }
.btn-secondary:hover:not(:disabled) { border-color: var(--violet); color: var(--violet); }
.btn-ghost { background: none; color: var(--ink-2); padding: 0 12px; }
.btn-ghost:hover:not(:disabled) { color: var(--violet); }
.btn-lime { background: var(--lime); color: var(--lime-ink); }
.btn-lime:hover:not(:disabled) { filter: brightness(.95); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn .spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.actionbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--mist); }
.actionbar .right { display: flex; gap: 10px; align-items: center; }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 20px; }
.banner-error { background: var(--tomato-soft); color: #8E1F23; }
.banner-info { background: var(--violet-soft); color: var(--violet-deep); }
.banner strong { display: block; }

/* ── Step 1: place search ─────────────────────────────────────────────────── */
.search { display: flex; gap: 10px; }
.search input { flex: 1; }
.hits { display: grid; gap: 8px; }
.hit {
    display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; text-align: left;
    padding: 12px 14px; border: 1.5px solid var(--mist); border-radius: 12px; background: var(--paper); cursor: pointer;
}
.hit:hover { border-color: var(--violet); }
.hit.selected { border-color: var(--violet); background: var(--violet-soft); }
.hit .pin { width: 34px; height: 34px; border-radius: 10px; background: var(--violet-soft); color: var(--violet); display: grid; place-items: center; }
.hit strong { display: block; font-size: 14.5px; }
.hit small { color: var(--ink-3); font-size: 12.5px; }
.jurisdiction { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--porcelain); border: 1px solid var(--mist); font-size: 12.5px; font-weight: 600; }
.chip-violet { background: var(--violet-soft); border-color: transparent; color: var(--violet-deep); }
.chip-lime { background: var(--lime); border-color: transparent; color: var(--lime-ink); }

/* ── Step 2: venue types ──────────────────────────────────────────────────── */
.venues { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.venue {
    position: relative; display: grid; gap: 6px; align-content: start; text-align: left;
    padding: 16px; min-height: 132px; border: 1.5px solid var(--mist); border-radius: var(--radius);
    background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s, transform .15s;
}
.venue:hover { border-color: #BDB2DB; transform: translateY(-1px); }
.venue svg { width: 28px; height: 28px; color: var(--violet); }
.venue strong { font-family: var(--font-display); font-size: 16px; }
.venue span { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.venue[aria-checked="true"] { border-color: var(--violet); background: var(--violet-soft); box-shadow: inset 0 0 0 1px var(--violet); }
.venue[aria-checked="true"]::after { content: ""; position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--violet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.5 2.5 2.5L12 5.5' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }

.toggles { display: flex; flex-wrap: wrap; gap: 10px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 99px; border: 1.5px solid var(--mist-2); background: var(--paper); cursor: pointer; font-weight: 500; font-size: 14px; }
.toggle input { accent-color: var(--violet); width: 16px; height: 16px; margin: 0; }
.toggle:has(input:checked) { border-color: var(--violet); background: var(--violet-soft); color: var(--violet-deep); }

/* ── Step 3: taxes ────────────────────────────────────────────────────────── */
.vat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vat { display: grid; grid-template-columns: 1fr 120px; gap: 4px 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--mist); border-radius: var(--radius); background: var(--porcelain); }
.vat strong { font-size: 14.5px; }
.vat small { grid-column: 1; color: var(--ink-3); font-size: 12.5px; }
.vat .with-suffix { grid-row: span 2; grid-column: 2; grid-row-start: 1; }
.vat input { text-align: right; font-family: var(--font-mono); font-weight: 600; }

/* ── Step 4: menu studio ──────────────────────────────────────────────────── */
.studio { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 20px; align-items: start; }
.drop {
    display: grid; gap: 10px; justify-items: center; text-align: center;
    padding: 26px 18px; border: 2px dashed #B9A8EE; border-radius: var(--radius); background: #FBFAFF;
    transition: background .15s, border-color .15s;
}
.drop.dragging { background: var(--violet-soft); border-color: var(--violet); }
.drop svg { width: 40px; height: 40px; color: var(--violet); }
.drop strong { font-family: var(--font-display); font-size: 17px; }
.drop p { font-size: 13px; color: var(--ink-3); }
.drop .file-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop input.drop-overlay { inset: 0; width: 100%; height: 100%; cursor: pointer; }
.drop .file-actions { position: relative; z-index: 1; pointer-events: none; }
.drop .file-actions .btn { pointer-events: auto; }
.camera-only { display: none; }
.scan-status { display: grid; gap: 8px; padding: 14px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 13.5px; }
.scan-status .progress { height: 4px; background: rgba(255, 255, 255, .15); border-radius: 99px; overflow: hidden; }
.scan-status .progress span { display: block; height: 100%; width: 30%; background: var(--lime); border-radius: 99px; animation: boot 1.4s ease-in-out infinite; }
.studio-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.studio-side > .btn { white-space: normal; text-align: center; padding-block: 10px; line-height: 1.3; }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--mist); }

.menu-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.menu-head h2 { font-size: 17px; }
.menu-empty { display: grid; place-items: center; text-align: center; gap: 6px; min-height: 240px; padding: 24px; border: 1px dashed var(--mist-2); border-radius: var(--radius); color: var(--ink-3); }
.menu-empty strong { color: var(--ink); font-family: var(--font-display); font-size: 17px; }
.menu-list { display: grid; gap: 14px; }
.cat { border: 1px solid var(--mist); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.cat-head { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px; background: var(--porcelain); border-bottom: 1px solid var(--mist); font-weight: 600; font-size: 13px; }
.cat-head .count { color: var(--ink-3); font-weight: 500; }
.item { display: grid; grid-template-columns: 22px minmax(0, 1fr) 118px 34px; gap: 6px 10px; align-items: start; padding: 10px 14px; border-bottom: 1px solid var(--porcelain); }
.item:last-child { border-bottom: 0; }
.item.dropped { opacity: .45; }
.item.dropped .item-name { text-decoration: line-through; }
.item input[type=checkbox] { accent-color: var(--violet); width: 16px; height: 16px; margin-top: 12px; }
.item-main { display: grid; gap: 6px; min-width: 0; }
.item-name, .item-cat { width: 100%; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; background: transparent; }
.item-name { font-weight: 600; font-size: 14.5px; }
.item-cat { font-size: 12.5px; color: var(--ink-3); padding-top: 2px; padding-bottom: 2px; }
.item-name:hover, .item-cat:hover, .item-price:hover { border-color: var(--mist-2); }
.item-name:focus, .item-cat:focus, .item-price:focus { border-color: var(--violet); box-shadow: var(--focus); outline: none; background: var(--paper); }
.item-price { width: 100%; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; text-align: right; font-family: var(--font-mono); font-weight: 600; background: transparent; }
.item-tags { display: flex; flex-wrap: wrap; gap: 5px; padding-left: 8px; }
.tag { border: 1px solid var(--mist-2); background: var(--paper); border-radius: 99px; padding: 1px 9px; font-size: 11.5px; font-weight: 500; color: var(--ink-3); cursor: pointer; }
.tag[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tag.drink[aria-pressed="true"] { background: var(--violet); border-color: var(--violet); }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; border: 0; background: none; color: var(--ink-3); cursor: pointer; }
.icon-btn:hover { background: var(--tomato-soft); color: var(--tomato); }
.menu-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: 12px; }

/* ── Step 5: floor plan ───────────────────────────────────────────────────── */
.counters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.counter { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--mist); border-radius: var(--radius); background: var(--porcelain); }
.counter label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.stepper-input { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; background: var(--paper); border: 1.5px solid var(--mist-2); border-radius: 12px; overflow: hidden; }
.stepper-input button { height: 44px; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--violet); }
.stepper-input button:hover { background: var(--violet-soft); }
.stepper-input input { border: 0; text-align: center; font-family: var(--font-mono); font-weight: 800; font-size: 18px; min-height: 44px; width: 100%; background: none; }
/* The − / + buttons are the control; hide the browser's own number spinner. */
.stepper-input input { appearance: textfield; -moz-appearance: textfield; }
.stepper-input input::-webkit-inner-spin-button, .stepper-input input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.floorplan { display: grid; gap: 14px; margin-top: 6px; }
.floor { border: 1px solid var(--mist); border-radius: var(--radius); padding: 14px; background:
    linear-gradient(var(--paper), var(--paper)) padding-box,
    repeating-linear-gradient(0deg, transparent 0 23px, #F1EEF8 23px 24px); }
.floor-name { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 10px; }
.table { aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; background: var(--violet-soft); color: var(--violet-deep); font-family: var(--font-mono); font-weight: 700; font-size: 13px; position: relative; }
.table small { position: absolute; bottom: 4px; font-size: 10px; font-weight: 500; color: var(--ink-3); }
.skip-note { display: grid; gap: 8px; padding: 22px; border-radius: var(--radius); background: var(--porcelain); border: 1px dashed var(--mist-2); }

/* ── Step 6: hardware ─────────────────────────────────────────────────────── */
.device-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.device { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--mist); border-radius: var(--radius); align-content: start; }
.device h3 { font-size: 16px; display: flex; gap: 10px; align-items: center; }
.device h3 svg { width: 22px; height: 22px; color: var(--violet); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.checklist li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; }
.checklist li::before { content: ""; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; background: var(--violet-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.5 2 2 5-5' stroke='%235E17EB' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }

/* ── Step 7: activation ───────────────────────────────────────────────────── */
.plan { display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; align-items: end; padding: 20px 22px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.plan .eyebrow { color: var(--lime); }
.plan h2 { color: #fff; font-size: 22px; }
.plan .price { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; text-align: right; }
.plan .price small { display: block; font-family: var(--font-body); font-size: 12px; font-weight: 500; color: #CFC7E6; margin-top: 4px; }
.plan ul { grid-column: 1 / -1; list-style: none; margin: 10px 0 0; padding: 12px 0 0; border-top: 1px solid rgba(255, 255, 255, .14); display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: #E5DFF6; }
.plan li::before { content: "✓ "; color: var(--lime); font-weight: 700; }
.payment-box { min-height: 120px; padding: 4px 0; }
.payment-box.mounting { min-height: 0; height: 0; overflow: hidden; }
.payment-loading { display: grid; place-items: center; min-height: 120px; color: var(--ink-3); font-size: 13.5px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.consent input { accent-color: var(--violet); width: 18px; height: 18px; margin: 2px 0 0; flex: none; }

/* ── Receipt (signature) ──────────────────────────────────────────────────── */
.receipt-wrap { position: sticky; top: 90px; }
.receipt {
    position: relative;
    background: var(--paper);
    padding: 22px 22px 30px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: #2A2238;
    box-shadow: 0 1px 2px rgba(29, 16, 51, .06), 0 24px 40px -28px rgba(29, 16, 51, .45);
    border-radius: 6px 6px 0 0;
    -webkit-mask: radial-gradient(circle 7px at 50% calc(100% + 1px), transparent 98%, #000) bottom / 18px 100% repeat-x;
            mask: radial-gradient(circle 7px at 50% calc(100% + 1px), transparent 98%, #000) bottom / 18px 100% repeat-x;
}
.receipt::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: repeating-linear-gradient(90deg, var(--violet) 0 12px, transparent 12px 18px); border-radius: 6px 6px 0 0; opacity: .9; }
.r-head { text-align: center; display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px dashed #CFC8DE; }
.r-head strong { font-size: 14px; letter-spacing: .18em; }
.r-head span { color: #8C84A2; font-size: 11px; }
.r-lines { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 7px; }
.r-line { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: baseline; animation: print .45s cubic-bezier(.2, .8, .2, 1) both; }
.r-line .k { color: #6E6682; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.r-line .dots { border-bottom: 1px dotted #CFC8DE; transform: translateY(-3px); }
.r-line .v { text-align: right; font-weight: 600; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-line.pending .v { color: #B9B2CB; font-weight: 400; }
.r-line.live .v { color: var(--violet); }
.r-sep { border-top: 1px dashed #CFC8DE; margin: 12px 0; }
.r-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 14px; }
.r-foot { margin-top: 14px; text-align: center; color: #8C84A2; font-size: 11px; display: grid; gap: 8px; justify-items: center; }
.barcode { width: 100%; height: 34px; background: repeating-linear-gradient(90deg, #2A2238 0 2px, transparent 2px 4px, #2A2238 4px 5px, transparent 5px 8px, #2A2238 8px 11px, transparent 11px 12px); opacity: .85; }
@keyframes print { from { opacity: 0; transform: translateY(-6px); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); } }

.receipt-close { display: none; }
.receipt-flat .receipt { -webkit-mask: none; mask: none; }

/* ── Success: tear-off stub ───────────────────────────────────────────────── */
.success { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
.success h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; line-height: 1.05; }
.stamp { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: var(--lime); color: var(--lime-ink); font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.stub { position: relative; margin-top: 0; padding: 24px 22px 26px; background: var(--paper); border-top: 2px dashed #CFC8DE; text-align: center; font-family: var(--font-mono); }
.stub::before { content: "✂"; position: absolute; top: -13px; left: 16px; font-size: 16px; color: #8C84A2; background: var(--paper); padding: 0 4px; font-family: var(--font-body); }
.stub .code { font-size: clamp(32px, 5vw, 40px); font-weight: 800; letter-spacing: .12em; color: var(--ink); background: var(--lime); padding: 6px 10px; border-radius: 8px; display: inline-block; margin: 8px 0; }
.stub .licenses { list-style: none; margin: 10px 0 12px; padding: 0; display: grid; gap: 12px; }
.stub .licenses li { display: grid; justify-items: center; gap: 6px; }
.stub .licenses .code { font-size: clamp(20px, 3.2vw, 26px); letter-spacing: .08em; margin: 0; white-space: nowrap; }
.stub .license-name { font-family: var(--font-body); font-size: 12px; font-weight: 600; color: #6E6682; }
.stub small { display: block; color: #6E6682; font-size: 11.5px; }
.howto { list-style: none; counter-reset: how; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.howto li { counter-increment: how; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.howto li::before { content: counter(how); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--violet-soft); color: var(--violet); font-family: var(--font-display); font-weight: 800; }
.howto strong { display: block; }
.howto span { color: var(--ink-2); font-size: 14px; }
.success-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.fact { padding: 12px 14px; border: 1px solid var(--mist); border-radius: 12px; background: var(--paper); }
.fact strong { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.fact span { font-size: 12.5px; color: var(--ink-3); }

.resume { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }

/* ── Tablet ───────────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
    .layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .receipt-wrap { position: static; order: -1; display: none; }
    .topbar .ticket-toggle { display: inline-flex; }
    .layout.ticket-open .receipt-wrap { display: block; position: fixed; inset: auto 0 0 0; z-index: 40; padding: 0 12px 12px; max-height: 80vh; overflow: auto; animation: sheet .3s ease both; }
    .layout.ticket-open::before { content: ""; position: fixed; inset: 0; background: rgba(29, 16, 51, .45); z-index: 39; }
    .layout.ticket-open .receipt { border-radius: 16px 16px 0 0; padding-top: 30px; }
    .receipt-close { display: block; position: absolute; top: 10px; right: 12px; font-family: var(--font-body); }
    .studio { grid-template-columns: minmax(0, 1fr); }
    .success { grid-template-columns: minmax(0, 1fr); }
    @keyframes sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ── Phone: thumb-zone stack ──────────────────────────────────────────────── */
@media (max-width: 720px) {
    body { font-size: 15px; }
    .topbar { padding: 10px 14px; gap: 8px; }
    .brand small { display: none; }
    .topbar .ticket-toggle { padding: 0; width: 42px; min-height: 40px; }
    .topbar .ticket-label { display: none; }
    .lang-select select { font-size: 16px; padding: 6px 28px 6px 12px; } /* < 16px makes iOS zoom in on tap */
    .input, .field input, .field select, .item-name, .item-cat, .item-price { font-size: 16px; } /* same: no zoom on focus */
    .layout { padding: 16px 12px calc(var(--bar-h) + 28px + env(safe-area-inset-bottom)); }
    .card { padding: 22px 16px; border-radius: 18px; }
    .stepper { display: none; }
    .stepper-compact { display: grid; gap: 8px; margin-bottom: 14px; }
    .stepper-compact .top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
    .stepper-compact .top span { color: var(--ink-3); font-weight: 500; }
    .stepper-compact .bar { height: 6px; border-radius: 99px; background: var(--mist); overflow: hidden; }
    .stepper-compact .bar span { display: block; height: 100%; background: var(--violet); border-radius: 99px; transition: width .45s cubic-bezier(.2, .8, .2, 1); }
    .grid-2, .grid-a, .grid-b, .vat-grid, .device-grid, .counters, .facts { grid-template-columns: minmax(0, 1fr); }
    .span-2 { grid-column: auto; }
    .venues { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .venue { min-height: 118px; padding: 14px; }
    .venue span { font-size: 12px; }
    .search { flex-direction: column; }
    .actionbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0;
        padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
        border-top: 1px solid var(--mist); box-shadow: 0 -10px 30px -20px rgba(29, 16, 51, .5);
    }
    .actionbar .right { flex: 1; justify-content: flex-end; }
    .actionbar .right .btn-primary { flex: 1; min-height: 50px; }
    .actionbar .btn-ghost.save { display: none; }
    .camera-only { display: inline-flex; }
    .drop input.drop-overlay { pointer-events: none; }
    .item { grid-template-columns: 22px minmax(0, 1fr) 34px; }
    .item-price { grid-column: 2; text-align: left; max-width: 140px; }
    .item .icon-btn { grid-row: 1; grid-column: 3; }
    .plan { grid-template-columns: 1fr; }
    .plan .price { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
    .topbar, .actionbar, .success-actions, .no-print, #blazor-error-ui { display: none !important; }
    body { background: #fff; }
    .success { grid-template-columns: 1fr 1fr; }
}
