@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
    color-scheme: light;
    --ink: #202b27;
    --muted: #78817c;
    --line: #e5e9e5;
    --paper: #f5f7f4;
    --white: #fff;
    --forest: #173a32;
    --forest-soft: #e8efeb;
    --lime: #c9ee62;
    --orange: #ef754a;
    --red: #bd493c;
    --mono: 'Space Mono', 'Courier New', monospace;
    --sans: 'DM Sans', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { background: var(--forest); color: #f7f9f7; display: flex; flex-direction: column; padding: 25px 17px 20px; min-height: 100vh; }
.brand-lockup { display: flex; align-items: center; gap: 10px; color: inherit; font-family: var(--mono); font-size: 12px; letter-spacing: 0; font-weight: 700; }
.brand-logo { display: block; flex: 0 0 42px; width: 42px; height: 42px; object-fit: contain; }
.nav-label, .eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: 0; font-weight: 700; }
.nav-label { margin: 54px 10px 12px; color: #93aaa1; }
.main-nav { display: grid; gap: 5px; }
.nav-button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 11px; border: 0; border-radius: 3px; background: transparent; color: #d5e0db; text-align: left; cursor: pointer; }
.nav-button:hover, .nav-button.active { background: #2c5046; color: #fff; }
.nav-button.active { box-shadow: inset 3px 0 var(--lime); }
.nav-icon { width: 18px; color: var(--lime); font-size: 18px; text-align: center; }
.nav-button kbd { margin-left: auto; border: 1px solid #4b6a61; border-radius: 2px; color: #adc0b8; font: 10px var(--mono); padding: 2px 5px; }
.sidebar-bottom { margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 13px 10px 0; border-top: 1px solid #36554c; color: #b6c8c0; font-size: 11px; }
.connection-dot, .live-pill span { width: 7px; height: 7px; background: var(--lime); border-radius: 50%; box-shadow: 0 0 0 3px rgb(201 238 98 / 13%); }
.workspace { min-width: 0; }
.topbar { height: 64px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #fff; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.breadcrumb span:first-child, .crumb-slash { font: 10px var(--mono); color: #8d9892; }
.topbar-right { display: flex; align-items: center; gap: 11px; }
.today-label { color: var(--muted); font-size: 12px; margin-right: 8px; }
.user-avatar { display: grid; place-items: center; width: 29px; height: 29px; background: var(--forest-soft); color: var(--forest); border-radius: 50%; font-weight: 700; }
.user-name { font-weight: 600; }
.text-button { padding: 5px 4px; border: 0; background: transparent; color: var(--forest); font-size: 12px; font-weight: 600; cursor: pointer; }
.topbar .text-button { margin-left: 9px; color: var(--muted); }
.text-button:hover { text-decoration: underline; }
.page-content { width: min(1440px, 100%); margin: 0 auto; padding: 34px; }
.view-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 7px; color: #79877f; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 30px; line-height: 1.13; letter-spacing: 0; font-weight: 600; }
h2 { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 600; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #dce6df; border-radius: 2px; color: #487263; font: 9px var(--mono); }
.live-pill span { width: 6px; height: 6px; background: #63a77d; }
.register-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .85fr); gap: 20px; align-items: start; }
.catalog-panel, .cart-panel { background: var(--white); border: 1px solid var(--line); border-radius: 4px; }
.catalog-panel { min-height: 590px; padding: 18px; }
.search-wrap { display: flex; align-items: center; gap: 11px; min-height: 47px; padding: 0 12px; border: 1px solid #dce2dc; border-radius: 3px; background: #fff; }
.search-wrap:focus-within { border-color: #78958a; box-shadow: 0 0 0 3px rgb(23 58 50 / 7%); }
.search-icon { color: #728078; font-size: 23px; line-height: 1; transform: rotate(-20deg); }
.search-wrap input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-wrap input::placeholder { color: #99a19c; }
kbd { flex: 0 0 auto; font: 9px var(--mono); color: #8b9690; }
.catalog-meta { display: flex; justify-content: space-between; margin: 18px 3px 8px; color: #859089; font-size: 11px; }
.product-results { display: grid; }
.product-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 27px; align-items: center; gap: 12px; width: 100%; min-height: 67px; padding: 8px 3px; border: 0; border-bottom: 1px solid #eef0ed; background: #fff; text-align: left; cursor: pointer; }
.product-row:hover:not(:disabled) { background: #f8faf7; }
.product-row:disabled { opacity: .5; cursor: not-allowed; }
.product-glyph { display: grid; place-items: center; width: 34px; height: 34px; background: #edf2ed; color: #3d6b59; border-radius: 3px; font-weight: 700; }
.product-info { display: grid; gap: 4px; min-width: 0; }
.product-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.product-info small { color: #89948d; font-size: 10px; }
.product-price { font: 11px var(--mono); white-space: nowrap; }
.add-mark { color: #678375; font-size: 17px; text-align: center; }
.cart-panel { display: flex; flex-direction: column; min-height: 590px; padding: 19px; }
.cart-heading { display: flex; justify-content: space-between; align-items: center; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.cart-heading .eyebrow { margin-bottom: 5px; }
.cart-heading h2 span { color: #88958e; font: 11px var(--mono); }
.icon-button { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: #6b7871; font-size: 21px; cursor: pointer; }
.icon-button:hover { background: #f4f6f3; }
.cart-items { flex: 1; min-height: 210px; }
.cart-empty { padding-top: 65px; color: #57665f; text-align: center; line-height: 1.8; }
.cart-empty span { color: #9aa39e; font-size: 12px; }
.cart-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 14px 0; border-bottom: 1px solid #eef0ed; }
.cart-item-info { display: grid; gap: 5px; min-width: 0; }
.cart-item-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.cart-item-info small { color: #8a948e; font-size: 10px; }
.quantity-stepper { display: flex; align-items: center; gap: 8px; border: 1px solid #e3e8e3; border-radius: 2px; }
.quantity-stepper button { width: 24px; height: 26px; padding: 0; border: 0; background: #fff; cursor: pointer; color: var(--forest); }
.quantity-stepper span { min-width: 12px; text-align: center; font: 10px var(--mono); }
.line-total { min-width: 65px; text-align: right; font: 10px var(--mono); }
.cart-bottom { padding-top: 16px; border-top: 1px solid var(--line); }
.total-line { display: flex; justify-content: space-between; align-items: center; margin-bottom: 17px; }
.total-line span, .payment-row label { color: #6f7c74; font-size: 12px; }
.total-line strong { font: 700 15px var(--mono); }
.summary-line { margin: -8px 0 12px; color: #748078; font-size: 11px; }
.summary-line strong { font-size: 11px; }
.compact-input { width: 100%; height: 34px; padding: 0 9px; border: 1px solid #dce2dc; border-radius: 2px; background: #fff; color: var(--ink); font: 12px var(--mono); }
.payment-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-top: 1px solid #eef0ed; }
.payment-row select { min-width: 105px; padding: 6px 25px 6px 8px; border: 1px solid #dce2dc; border-radius: 2px; background: #fff; color: var(--ink); }
.tender-label { display: block; margin: 7px 0 6px; color: #6f7c74; font-size: 11px; }
.tender-wrap { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 10px; border: 1px solid #dce2dc; border-radius: 2px; font: 10px var(--mono); color: #7f8a83; }
.tender-wrap input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: 12px var(--mono); }
.change-line { display: flex; justify-content: space-between; margin-top: 10px; font-size: 11px; color: #4d765d; }
.change-line strong { font: 11px var(--mono); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 0 15px; border: 0; border-radius: 3px; font-weight: 600; cursor: pointer; transition: background .16s ease, transform .16s ease; }
.button:active { transform: translateY(1px); }
.button-primary { background: var(--forest); color: white; }
.button-primary:hover { background: #245347; }
.button-primary span, .button-checkout span { color: var(--lime); font-size: 18px; }
.button-checkout { width: 100%; margin-top: 16px; background: var(--orange); color: #fff; }
.button-checkout:hover:not(:disabled) { background: #d96139; }
.button-checkout:disabled { background: #d7dcd7; color: #8b938e; cursor: not-allowed; }
.button-checkout:disabled span { color: #f4f5f3; }
.sale-message { min-height: 14px; margin: 8px 0 0; color: #487263; font-size: 10px; line-height: 1.4; }
.empty-state { display: grid; justify-items: center; gap: 9px; padding: 110px 15px 0; color: #64736a; text-align: center; }
.empty-state strong { color: var(--ink); }
.empty-state span:not(.empty-symbol) { color: #8c9890; font-size: 12px; }
.empty-symbol { color: var(--orange); font-size: 28px; }
.inventory-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.inventory-search { width: min(450px, 100%); }
.muted { color: var(--muted); font-size: 12px; }
.table-frame { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 3px; }
.staff-layout { display: grid; grid-template-columns: minmax(250px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.staff-form { padding: 19px; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.staff-form h2 { margin-bottom: 19px; }
.staff-form label { display: grid; gap: 7px; margin-bottom: 14px; color: #56635b; font-size: 11px; font-weight: 600; }
.staff-form input { width: 100%; height: 40px; padding: 0 10px; border: 1px solid #dce2dc; border-radius: 2px; background: #fff; color: var(--ink); }
.staff-form .button { width: 100%; margin: 3px 0 10px; }
.settings-section { margin-top: 34px; }
.settings-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; padding: 19px; border: 1px solid var(--line); background: #fff; }
.settings-form label { display: grid; gap: 7px; color: #56635b; font-size: 11px; font-weight: 600; }
.settings-form input:not([type="checkbox"]) { width: 100%; height: 40px; padding: 0 10px; border: 1px solid #dce2dc; border-radius: 2px; background: #fff; color: var(--ink); }
.settings-form .check-label { display: flex; align-items: center; min-height: 40px; gap: 8px; }
.settings-form .check-label input { accent-color: var(--forest); }
.settings-form .button, .settings-form .form-error { grid-column: 1 / -1; }
.restore-form { grid-template-columns: minmax(180px, .8fr) minmax(240px, 1.8fr) auto; }
.settings-form .restore-file input { height: auto; padding: 8px; font-size: 10px; }
.restore-warning { margin: 0; color: #8b6246; font-size: 11px; line-height: 1.5; }
.audit-details { max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 12px 15px; background: #f7f9f6; color: #7c8981; font: 9px var(--mono); white-space: nowrap; }
td { padding: 13px 15px; border-top: 1px solid #edf0ed; color: #4c5952; font-size: 12px; white-space: nowrap; }
td strong { color: var(--ink); font-weight: 600; }
.mono-cell { font: 10px var(--mono); color: #6e7b73; }
.stock-value { display: inline-block; min-width: 25px; padding: 4px 6px; border-radius: 2px; background: #edf3ee; color: #527562; text-align: center; font: 10px var(--mono); }
.stock-value.stock-low { background: #fff0e8; color: #bd633e; }
.row-actions { text-align: right; }
.row-actions .text-button + .text-button { margin-left: 9px; }
.text-danger { color: var(--red); }
.table-empty { padding: 30px; color: #89948d; text-align: center; font-size: 12px; }
.month-picker { display: grid; gap: 5px; color: #79877f; font: 9px var(--mono); }
.month-picker input { padding: 8px 10px; border: 1px solid #dce2dc; border-radius: 2px; background: #fff; color: var(--ink); font: 12px var(--sans); }
.report-stats { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; margin-bottom: 30px; }
.stat-block { display: grid; align-content: start; gap: 12px; min-height: 123px; padding: 19px; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.stat-block > span { color: #7e8a82; font: 9px var(--mono); }
.stat-block > strong { font: 700 22px var(--mono); color: var(--ink); }
.stat-block small { color: #8b968f; font-size: 11px; }
.stat-primary { background: var(--forest); border-color: var(--forest); }
.stat-primary > span, .stat-primary small { color: #bdcec6; }
.stat-primary > strong { color: var(--lime); }
.report-section { margin: 0 0 28px; }
.drawer-history { margin-top: 28px; }
.drawer-history td:nth-child(3) { min-width: 130px; white-space: normal; }
.drawer-closed { background: #f1f3f0; color: #738078; }
.section-title { display: flex; align-items: end; justify-content: space-between; margin-bottom: 12px; }
.section-title .eyebrow { margin-bottom: 5px; }
.payment-tag { padding: 4px 7px; border-radius: 2px; background: #edf3ee; color: #537363; font-size: 10px; text-transform: capitalize; }
.product-dialog { width: min(480px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 22px 70px rgb(20 36 29 / 20%); }
.product-dialog::backdrop { background: rgb(17 34 27 / 46%); backdrop-filter: blur(2px); }
.product-dialog form { padding: 23px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; margin-bottom: 21px; }
.product-dialog label, .setup-form label, .login-form label { display: grid; gap: 7px; margin-bottom: 15px; color: #56635b; font-size: 11px; font-weight: 600; }
.product-dialog input, .setup-form input, .login-form input { width: 100%; height: 40px; padding: 0 10px; border: 1px solid #dce2dc; border-radius: 2px; outline: 0; background: #fff; color: var(--ink); }
.product-dialog input:focus, .setup-form input:focus, .login-form input:focus { border-color: #78958a; box-shadow: 0 0 0 3px rgb(23 58 50 / 7%); }
.optional { margin-left: 5px; color: #929c95; font: 8px var(--mono); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-actions { display: flex; justify-content: end; gap: 9px; margin-top: 20px; }
.return-items { display: grid; gap: 7px; max-height: 220px; overflow: auto; padding: 8px 10px; border: 1px solid var(--line); background: #fafbf9; }
.return-item { display: grid; grid-template-columns: minmax(0, 1fr) 74px; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid #edf0ed; }
.return-item:last-child { border-bottom: 0; }
.return-item span { display: grid; gap: 3px; min-width: 0; }
.return-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 12px; }
.return-item small { color: var(--muted); font-size: 10px; }
.return-item input { width: 100%; height: 34px; padding: 0 7px; border: 1px solid #dce2dc; border-radius: 2px; color: var(--ink); }
.button-subtle { background: #eff2ef; color: #58655e; }
.form-error { min-height: 15px; margin: 0; color: var(--red); font-size: 11px; line-height: 1.5; }
.receipt-dialog { width: min(430px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 22px; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 22px 70px rgb(20 36 29 / 20%); }
.receipt-dialog::backdrop { background: rgb(17 34 27 / 46%); }
.receipt-paper { width: min(100%, 320px); margin: 0 auto; color: #202b27; font-family: var(--mono); font-size: 11px; }
.receipt-brand { display: flex; align-items: center; gap: 9px; justify-content: center; margin-bottom: 17px; }
.receipt-brand img { width: 38px; height: 38px; object-fit: contain; }
.receipt-brand div { display: grid; gap: 3px; }
.receipt-brand strong { font: 700 12px var(--sans); }
.receipt-brand small { color: var(--muted); font: 9px var(--mono); }
.receipt-meta, .receipt-item, .receipt-total { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px dashed #dce2dc; }
.receipt-meta { color: #56635b; font-size: 9px; }
.receipt-item { align-items: start; }
.receipt-item > span { display: grid; gap: 3px; }
.receipt-item small { color: var(--muted); font-size: 9px; }
.receipt-item strong, .receipt-total strong { white-space: nowrap; }
.receipt-total { margin-top: 7px; border-top: 1px solid #aeb8b1; font-weight: 700; }
.receipt-thanks { margin: 20px 0 0; color: #56635b; text-align: center; font-size: 10px; }
.receipt-actions { display: flex; justify-content: center; gap: 9px; margin-top: 20px; }
.toast { position: fixed; right: 23px; bottom: 22px; z-index: 5; max-width: min(380px, calc(100vw - 32px)); padding: 12px 16px; background: var(--forest); color: white; border-left: 3px solid var(--lime); border-radius: 2px; box-shadow: 0 8px 25px rgb(16 32 24 / 18%); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast-error { border-left-color: #ff9b76; }
.login-screen { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); min-height: 100vh; background: #fff; }
.login-art { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; min-height: 100vh; padding: 42px; background-color: var(--forest); background-image: linear-gradient(143deg, transparent 44%, rgb(201 238 98 / 8%) 44%, rgb(201 238 98 / 8%) 45%, transparent 45%), radial-gradient(ellipse at 90% 10%, rgb(239 117 74 / 20%), transparent 44%), linear-gradient(35deg, transparent 68%, rgb(255 255 255 / 4%) 68%, rgb(255 255 255 / 4%) 69%, transparent 69%); color: #fff; }
.login-art::after { position: absolute; content: ''; width: 36vw; aspect-ratio: 1; right: -10vw; bottom: -17vw; border: 1px solid rgb(201 238 98 / 20%); border-radius: 50%; box-shadow: 0 0 0 35px rgb(201 238 98 / 3%), 0 0 0 85px rgb(201 238 98 / 3%), 0 0 0 145px rgb(201 238 98 / 3%); }
.art-stamp { position: relative; z-index: 1; margin: auto 0; color: var(--lime); font-size: clamp(70px, 10vw, 148px); font-weight: 700; line-height: .83; letter-spacing: 0; }
.art-caption { position: relative; z-index: 1; font: 11px var(--mono); color: #bdcec6; }
.login-side { display: flex; flex-direction: column; padding: 35px clamp(27px, 7vw, 100px); }
.login-side .brand-lockup { color: var(--forest); }
.login-form { width: 100%; max-width: 365px; margin: auto; }
.login-form .eyebrow { color: #698177; }
.login-form h1 { margin-bottom: 12px; font-size: 34px; line-height: 1.15; }
.login-form > .muted { margin-bottom: 30px; }
.login-form .button { width: 100%; margin-top: 6px; }
.login-foot { margin: 0; color: #8c9890; font-size: 10px; }
.setup-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; background: radial-gradient(ellipse at 92% 7%, rgb(239 117 74 / 13%), transparent 32%), linear-gradient(135deg, #f1f5f1, #fafbf9 52%, #edf2ee); }
.setup-panel { width: min(440px, 100%); padding: 30px; border: 1px solid var(--line); border-radius: 4px; background: #fff; box-shadow: 0 16px 50px rgb(20 36 29 / 7%); }
.setup-panel .setup-logo { width: 76px; height: 76px; margin-bottom: 25px; }
.setup-panel .eyebrow { color: #6d8175; }
.setup-panel h1 { font-size: 28px; margin-bottom: 10px; }
.setup-panel > .muted { margin-bottom: 22px; line-height: 1.6; }
.setup-form { margin-top: 22px; }
.setup-form .button { width: 100%; margin-top: 7px; }
.setup-action { width: 100%; margin-top: 8px; }
.setup-note { margin: 20px 0 0; color: #8c9890; font-size: 11px; line-height: 1.5; }
.setup-note code { color: var(--ink); }
.notice { margin: 12px 0; padding: 10px; border-radius: 2px; font-size: 11px; line-height: 1.5; }
.notice-error { background: #fff0eb; color: #a84837; }

@media (max-width: 900px) {
    .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
    .page-content { padding: 26px 22px; }
    .topbar { padding: 0 22px; }
    .register-layout { grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 12px; }
    .catalog-panel, .cart-panel { padding: 14px; }
    .product-row { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px; }
    .add-mark { display: none; }
    .staff-layout { grid-template-columns: 1fr; }
    .settings-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .app-shell { display: block; padding-bottom: 62px; }
    .sidebar { position: fixed; z-index: 4; inset: auto 0 0; min-height: 0; height: 62px; padding: 5px 10px max(5px, env(safe-area-inset-bottom)); flex-direction: row; align-items: center; justify-content: center; }
    .sidebar > .brand-lockup, .sidebar > .nav-label, .sidebar-bottom { display: none; }
    .main-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); width: 100%; gap: 5px; }
    .nav-button { min-height: 47px; justify-content: center; gap: 6px; padding: 4px; font-size: 10px; }
    .nav-button.active { box-shadow: inset 0 2px var(--lime); }
    .nav-icon { width: auto; font-size: 15px; }
    .nav-button kbd { display: none; }
    .topbar { height: 55px; padding: 0 14px; }
    .topbar-right { gap: 7px; }
    .today-label { display: none; }
    .user-name { max-width: 74px; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
    .topbar .text-button { margin-left: 2px; font-size: 11px; }
    .page-content { padding: 22px 14px; }
    .view-heading { align-items: center; margin-bottom: 18px; }
    h1 { font-size: 25px; }
    .live-pill { padding: 6px 7px; font-size: 8px; }
    .register-layout { grid-template-columns: 1fr; }
    .catalog-panel { min-height: 290px; }
    .cart-panel { min-height: 360px; }
    .cart-items { min-height: 100px; }
    .cart-empty { padding-top: 26px; }
    .product-row { grid-template-columns: 34px minmax(0, 1fr) auto 20px; }
    .add-mark { display: block; }
    .report-stats { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 22px; }
    .stat-block { min-height: 105px; padding: 14px; gap: 9px; }
    .stat-primary { grid-column: 1 / -1; }
    .stat-block > strong { font-size: 17px; }
    .report-section { margin-bottom: 22px; }
    th, td { padding: 11px 10px; }
    .row-actions .text-button + .text-button { margin-left: 5px; }
    .month-picker input { max-width: 145px; }
    .settings-form { grid-template-columns: 1fr; }
    .settings-form .button, .settings-form .form-error { grid-column: auto; }
    .login-screen { grid-template-columns: 1fr; }
    .login-art { display: none; }
    .login-side { min-height: 100vh; padding: 24px; }
    .login-form { max-width: 420px; }
    .login-form h1 { font-size: 30px; }
}

@media print {
    body * { visibility: hidden !important; }
    #receiptDialog[open], #receiptDialog[open] * { visibility: visible !important; }
    #receiptDialog[open] { position: fixed; inset: 0 auto auto 0; display: block; width: 80mm; max-width: 80mm; max-height: none; margin: 0; padding: 8mm; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
    .receipt-paper { width: 64mm; margin: 0; font-size: 9pt; }
    .receipt-actions { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
    body * { visibility: hidden !important; }
    #receiptDialog[open], #receiptDialog[open] * { visibility: visible !important; }
    #receiptDialog[open] { position: fixed; inset: 0 auto auto 0; display: block; width: 80mm; max-width: 80mm; max-height: none; margin: 0; padding: 8mm; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
    .receipt-paper { width: 64mm; margin: 0; font-size: 9pt; }
    .receipt-actions { display: none !important; }
}