/* Salon Manager — core stylesheet. --primary / --secondary come from salon settings. */
:root {
  --primary: #6d28d9;
  --primary-ink: #fff;
  --secondary: #f59e0b;
  --bg: #f4f5f9;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --border: #e4e7ee;
  --text: #1c2130;
  --text-2: #5b6275;
  --muted: #8a90a2;
  --green: #0f9d58;  --green-bg: #e6f6ee;
  --red: #d93025;    --red-bg: #fdecea;
  --amber: #b26a00;  --amber-bg: #fff4e0;
  --blue: #1a66d2;   --blue-bg: #e8f0fe;
  --gray-bg: #eef0f4;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --sidebar: 248px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
.icon { vertical-align: -3px; flex-shrink: 0; }
.muted { color: var(--muted); } .small { font-size: 12px; } .text-2 { color: var(--text-2); }
.right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.mt-0{margin-top:0}.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.5rem}.mb-2{margin-bottom:1rem}
.flex { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; }
.text-green { color: var(--green); } .text-red { color: var(--red); } .text-amber { color: var(--amber); } .strong { font-weight: 600; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); background: #151826; color: #c9cddb; position: fixed; inset: 0 auto 0 0; overflow-y: auto; z-index: 40; display: flex; flex-direction: column; transition: transform .2s; }
.brand { display: flex; align-items: center; gap: .65rem; padding: 1.1rem 1.1rem 1rem; color: #fff; font-weight: 700; font-size: 1.02rem; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand img { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; background: #fff; }
.brand .logo-fallback { width: 36px; height: 36px; border-radius: 9px; background: var(--primary); display: grid; place-items: center; color: #fff; }
.brand small { display: block; font-weight: 400; font-size: 11.5px; color: #8b91a7; }
.nav { padding: .6rem .6rem 1.5rem; flex: 1; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #6c7289; padding: 1rem .7rem .35rem; }
.nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 8px; color: #c9cddb; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav a.active { background: var(--primary); color: var(--primary-ink); }
.nav .count { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; border-radius: 99px; padding: 0 .45rem; }
.main { margin-left: var(--sidebar); flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; padding: 0 1.25rem; position: sticky; top: 0; z-index: 30; }
.topbar .menu-btn { display: none; }
.topbar .title { font-weight: 600; font-size: 1.02rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .user-chip { display: flex; align-items: center; gap: .5rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex-shrink: 0; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.user-chip .meta { line-height: 1.15; } .user-chip .meta small { color: var(--muted); display: block; }
.content { padding: 1.4rem 1.25rem 3rem; max-width: 1400px; width: 100%; }
.page-head > * { min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.page-head p { margin: .15rem 0 0; color: var(--text-2); }
.backdrop { display: none; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.1rem; }
.card-head { padding: .85rem 1.1rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: 1.1rem; }
.card-body.flush { padding: 0; }
.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-2-1 { grid-template-columns: 2fr 1fr; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .9rem; margin-bottom: 1.1rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .95rem 1.05rem; box-shadow: var(--shadow); }
.stat .label { color: var(--text-2); font-size: 12.5px; display: flex; align-items: center; gap: .4rem; }
.stat .value { font-size: 1.45rem; font-weight: 700; margin-top: .25rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: .75rem; font-weight: 500; color: var(--muted); }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: .15rem; }
.stat.accent { border-top: 3px solid var(--primary); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: .6rem .8rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { background: var(--surface-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); font-weight: 600; white-space: nowrap; }
.table tbody tr:hover { background: #fafbfe; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; }
.table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--border); }
.table tr.row-flag td { background: var(--red-bg); }
.table tr.row-muted td { color: var(--muted); }
.table.compact th, .table.compact td { padding: .4rem .55rem; }
.table .actions { white-space: nowrap; text-align: right; }
.table.sticky-first th:first-child, .table.sticky-first td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.table.sticky-first th:first-child { background: var(--surface-2); }
.table.sticky-first tr.row-flag td:first-child { background: var(--red-bg); }
.table.sticky-first tfoot td:first-child { background: var(--surface-2); }
.empty { padding: 2.2rem 1rem; text-align: center; color: var(--muted); }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9rem 1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field.full { grid-column: 1 / -1; }
.field label, .label-text { font-weight: 600; font-size: 12.5px; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=tel], input[type=search], select, textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid #d3d7e2; border-radius: 8px; background: #fff; font: inherit; color: var(--text); min-height: 38px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
input[type=color] { width: 56px; height: 38px; border: 1px solid #d3d7e2; border-radius: 8px; padding: 2px; background: #fff; }
textarea { min-height: 80px; resize: vertical; }
input.money, input.num { text-align: right; font-variant-numeric: tabular-nums; }
.check { display: inline-flex; align-items: center; gap: .45rem; font-weight: 500; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }
.form-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.1rem; flex-wrap: wrap; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.filters .field { min-width: 150px; }
.filters .field.sm { min-width: 110px; flex: 0 0 auto; }

/* ---------- Select2 (searchable selects) ---------- */
.select2-container { font: inherit; max-width: 100%; }
.select2-container--default .select2-selection--single { height: 38px; border: 1px solid #d3d7e2; border-radius: 8px; background: #fff; outline: none; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 36px; padding-left: .7rem; padding-right: 1.8rem; color: var(--text); }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 36px; right: 6px; }
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.select2-dropdown { border-color: #d3d7e2; border-radius: 8px; box-shadow: 0 10px 28px rgba(16,24,40,.14); overflow: hidden; z-index: 1100; }
.select2-container--open .select2-dropdown--below { margin-top: 4px; border-top: 1px solid #d3d7e2; border-radius: 8px; }
.select2-container--open .select2-dropdown--above { margin-top: -4px; border-bottom: 1px solid #d3d7e2; border-radius: 8px; }
.select2-search--dropdown { padding: 8px; }
.select2-container--default .select2-search--dropdown .select2-search__field { border: 1px solid #d3d7e2; border-radius: 6px; padding: .45rem .6rem; font: inherit; outline: none; }
.select2-container--default .select2-search--dropdown .select2-search__field:focus { border-color: var(--primary); }
.select2-results__option { padding: .45rem .75rem; }
.select2-container--default .select2-results > .select2-results__options { max-height: 280px; }
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--primary); color: var(--primary-ink); }
.select2-container--default .select2-results__option--selected { background: color-mix(in srgb, var(--primary) 10%, #fff); }
.page-head .select2-container, form.flex .select2-container { min-width: 190px; }
.cart-line .lc .select2-container { flex: 1; min-width: 0; }
.cart-line .lc .select2-selection--single { height: 34px; }
.cart-line .lc .select2-selection__rendered { line-height: 32px !important; }
.cart-line .lc .select2-selection__arrow { height: 32px !important; }
@media print { .select2-selection__arrow { display: none; } .select2-selection--single { border: 0 !important; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .5rem .95rem; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; min-height: 38px; background: var(--surface); color: var(--text); border-color: #d3d7e2; white-space: nowrap; text-decoration: none !important; }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary); filter: brightness(.93); }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: var(--red); filter: brightness(.93); }
.btn-success { background: var(--green); color: #fff; border-color: var(--green); }
.btn-success:hover { background: var(--green); filter: brightness(.93); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { padding: .3rem .6rem; min-height: 30px; font-size: 12.5px; }
.btn-lg { padding: .75rem 1.3rem; font-size: 1rem; min-height: 48px; }
.btn-block { width: 100%; }
.btn-icon { padding: .35rem; min-height: 32px; min-width: 32px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
form.inline { display: inline; }

/* ---------- badges & alerts ---------- */
.badge { display: inline-block; padding: .12rem .55rem; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-gray { background: var(--gray-bg); color: var(--text-2); }
.badge-primary { background: color-mix(in srgb, var(--primary) 12%, #fff); color: var(--primary); }
.alert { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1rem; display: flex; gap: .6rem; align-items: flex-start; border: 1px solid transparent; }
.alert-success { background: var(--green-bg); color: #0b6b3c; border-color: #bfe7d1; }
.alert-error { background: var(--red-bg); color: #a3231b; border-color: #f6c7c3; }
.alert-warning { background: var(--amber-bg); color: #8a5300; border-color: #f7dcaa; }
.alert-info { background: var(--blue-bg); color: #184e9c; border-color: #c6d9fb; }
.alert ul { margin: 0; padding-left: 1.1rem; }

.list-alerts { list-style: none; margin: 0; padding: 0; }
.list-alerts li { display: flex; gap: .6rem; align-items: center; padding: .6rem 1.1rem; border-bottom: 1px solid var(--border); }
.list-alerts li:last-child { border-bottom: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-red { background: var(--red); } .dot-amber { background: #f59e0b; } .dot-green { background: var(--green); } .dot-blue { background: var(--blue); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; }
.tabs a { padding: .6rem .9rem; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--primary); border-color: var(--primary); }
.tabs a:hover { text-decoration: none; color: var(--text); }

/* ---------- charts ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-text { fill: var(--muted); font-size: 11px; }
.chart .bar { fill: var(--primary); }
.chart .bar:hover, .chart .hit:hover + .bar { opacity: .8; }
.chart .hit { fill: transparent; cursor: default; }
.chart-tip { position: fixed; pointer-events: none; background: #151826; color: #fff; padding: .4rem .6rem; border-radius: 6px; font-size: 12px; z-index: 100; display: none; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.hbar { display: grid; grid-template-columns: 120px 1fr auto; gap: .6rem; align-items: center; padding: .35rem 0; }
.hbar .track { background: var(--surface-2); border-radius: 4px; height: 12px; overflow: hidden; }
.hbar .fill { background: var(--primary); height: 100%; border-radius: 0 4px 4px 0; }
.hbar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .val { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }

/* ---------- checkout ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 1.1rem; align-items: start; }
.pos-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; max-height: 60vh; overflow-y: auto; padding: 2px; }
.pos-item { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: .7rem .75rem; text-align: left; cursor: pointer; font: inherit; color: var(--text); display: flex; flex-direction: column; gap: .2rem; min-height: 74px; transition: border-color .15s, box-shadow .15s; }
.pos-item:hover { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent); }
.pos-item .n { font-weight: 600; line-height: 1.2; }
.pos-item .p { color: var(--primary); font-weight: 700; font-variant-numeric: tabular-nums; margin-top: auto; }
.pos-item .s { font-size: 11.5px; color: var(--muted); }
.pos-item[disabled] { opacity: .45; cursor: not-allowed; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: .35rem .6rem; padding: .7rem 0; border-bottom: 1px dashed var(--border); }
.cart-line .ln { font-weight: 600; }
.cart-line .lp { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.cart-line .lc { grid-column: 1 / -1; display: flex; gap: .4rem; align-items: center; }
.cart-line .lc select { flex: 1; min-height: 34px; padding: .3rem .5rem; }
.cart-line .lc input { width: 70px; min-height: 34px; padding: .3rem .4rem; }
.totals-row { display: flex; justify-content: space-between; padding: .3rem 0; font-variant-numeric: tabular-nums; }
.totals-row.grand { font-size: 1.35rem; font-weight: 800; border-top: 2px solid var(--border); padding-top: .6rem; margin-top: .3rem; }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.pay-methods label { border: 2px solid var(--border); border-radius: 10px; padding: .65rem .4rem; text-align: center; cursor: pointer; font-weight: 700; }
.pay-methods input { position: absolute; opacity: 0; pointer-events: none; }
.pay-methods input:checked + span { color: var(--primary); }
.pay-methods label:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, #fff); }
.seg { display: inline-flex; border: 1px solid #d3d7e2; border-radius: 8px; overflow: hidden; }
.seg a, .seg button { padding: .42rem .8rem; background: #fff; border: 0; font: inherit; font-weight: 600; color: var(--text-2); cursor: pointer; }
.filters .seg { max-width: 100%; overflow-x: auto; }
.seg a, .seg button { white-space: nowrap; }
.seg a.active, .seg button.active { background: var(--primary); color: var(--primary-ink); }
.seg a:hover { text-decoration: none; }

/* ---------- daily sheet grid ---------- */
.sheet td input.money { min-width: 110px; }
.diff-ok { color: var(--green); font-weight: 700; }
.diff-bad { color: var(--red); font-weight: 700; }

/* ---------- attendance ---------- */
.att-opts { display: inline-flex; gap: .25rem; flex-wrap: wrap; }
.att-opts label { cursor: pointer; }
.att-opts input { position: absolute; opacity: 0; pointer-events: none; }
.att-opts span { display: inline-block; padding: .3rem .65rem; border-radius: 99px; border: 1px solid var(--border); font-weight: 600; font-size: 12.5px; color: var(--text-2); background: #fff; }
.att-opts input:checked + span.present { background: var(--green); border-color: var(--green); color: #fff; }
.att-opts input:checked + span.absent { background: var(--red); border-color: var(--red); color: #fff; }
.att-opts input:checked + span.halfday { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.att-opts input:checked + span.leave { background: var(--blue); border-color: var(--blue); color: #fff; }
.att-cell { width: 26px; height: 26px; border-radius: 6px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; }
.att-present { background: var(--green-bg); color: var(--green); } .att-absent { background: var(--red-bg); color: var(--red); }
.att-halfday { background: var(--amber-bg); color: var(--amber); } .att-leave { background: var(--blue-bg); color: var(--blue); }

/* ---------- misc ---------- */
.kv { display: grid; grid-template-columns: 160px 1fr; gap: .45rem 1rem; }
.kv dt { color: var(--text-2); } .kv dd { margin: 0; font-weight: 600; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 5px; vertical-align: -4px; border: 1px solid rgba(0,0,0,.1); }
.logo-preview { max-height: 70px; border-radius: 8px; border: 1px solid var(--border); padding: 4px; background: #fff; }
dialog { border: 0; border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(15,18,30,.45); }
dialog .card { margin: 0; border: 0; box-shadow: none; }
.pill-nav { display: flex; gap: .4rem; flex-wrap: wrap; }
.report-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .9rem; }
.report-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; color: var(--text); box-shadow: var(--shadow); }
.report-card:hover { border-color: var(--primary); text-decoration: none; }
.report-card .num { width: 30px; height: 30px; border-radius: 8px; background: color-mix(in srgb, var(--primary) 12%, #fff); color: var(--primary); display: grid; place-items: center; font-weight: 700; margin-bottom: .6rem; }
.report-card h3 { margin-bottom: .25rem; } .report-card p { margin: 0; color: var(--text-2); font-size: 13px; }
.diff-json { font-family: ui-monospace, Menlo, monospace; font-size: 12px; white-space: pre-wrap; word-break: break-word; margin: 0; }
.statement td:first-child { padding-left: 1.2rem; }
.statement tr.section td { font-weight: 700; background: var(--surface-2); padding-left: .8rem; }
.statement tr.total td { font-weight: 800; font-size: 1.05rem; border-top: 2px solid var(--text); }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--primary) 22%, #fff), transparent 55%), radial-gradient(circle at 90% 90%, color-mix(in srgb, var(--secondary) 25%, #fff), transparent 50%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 16px; box-shadow: 0 12px 40px rgba(16,24,40,.12); padding: 2rem 1.75rem; }
.auth-card .brand-lg { text-align: center; margin-bottom: 1.4rem; }
.auth-card .brand-lg img, .auth-card .brand-lg .logo-fallback { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; margin: 0 auto .6rem; display: grid; place-items: center; background: var(--primary); color: #fff; }

/* ---------- receipt ---------- */
.receipt { max-width: 340px; margin: 0 auto; background: #fff; padding: 1.2rem 1rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; border: 1px solid var(--border); border-radius: 8px; }
.receipt h2 { text-align: center; font-family: var(--font); margin-bottom: .1rem; }
.receipt .c { text-align: center; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td { padding: .15rem 0; vertical-align: top; }
.receipt hr { border: 0; border-top: 1px dashed #999; margin: .5rem 0; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .pos { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }
  .main { margin-left: 0; }
  .topbar .menu-btn { display: inline-flex; }
  .grid-2, .grid-3, .grid-2-1 { grid-template-columns: minmax(0, 1fr); }
  .topbar { padding: 0 12px; gap: .5rem; }
  .topbar .title { font-size: .95rem; }
  .user-chip .meta { display: none; }
}
@media (max-width: 560px) {
  .content { padding: 1rem 16px 3rem; }
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .pos-items { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }
  .page-head > div:first-child { min-width: 0; flex: 1 1 100%; }
  .filters .field, .filters .field.sm { min-width: 0; flex: 1 1 140px; }
  .card-head input[type=search] { max-width: none !important; flex: 1 1 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stat .value { font-size: 1.15rem; }
  .kv { grid-template-columns: 1fr; }
  .page-head .btn { flex: 1; }
  .hbar { grid-template-columns: 90px 1fr auto; }
}

/* ---------- print ---------- */
@media print {
  .sidebar, .topbar, .no-print, .filters, .form-actions, .tabs, .btn { display: none !important; }
  .main { margin: 0; }
  body { background: #fff; font-size: 11px; }
  .content { padding: 0; max-width: none; }
  .card { border: 0; box-shadow: none; }
  .table th, .table td { padding: .25rem .4rem; }
  .table-wrap { overflow: visible; }
  .print-only { display: block !important; }
  .receipt { border: 0; }
  a { color: inherit; }
}
.print-only { display: none; }
