@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #171719;
  --ink-soft: #38383d;
  --paper: #ffffff;
  --canvas: #f5f6f8;
  --line: #e7e8ec;
  --muted: #767982;
  --soft: #f8f8fa;
  --red: #c92f32;
  --red-dark: #a92227;
  --red-soft: #fff1f1;
  --green: #1c7c55;
  --green-soft: #edf8f2;
  --yellow: #9a6b0e;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(20, 21, 30, .035), 0 1px 2px rgba(20, 21, 30, .03);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); font: 14px/1.5 'DM Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: not-allowed; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(201, 47, 50, .22); outline-offset: 2px; }
::selection { background: #f5d4d5; color: var(--ink); }
#root { min-height: 100vh; }
.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.boot-screen img { width: 44px; height: 44px; }
.icon { display: inline-block; flex: none; }

/* Shell and navigation */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: 252px; background: #151516; color: #fff; display: flex; flex-direction: column; padding: 24px 15px 17px; overflow-y: auto; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 24px; border-bottom: 1px solid rgba(255,255,255,.105); text-decoration: none; color: #fff; }
.brand-logo { display: inline-grid; place-items: center; border-radius: 12px; overflow: hidden; flex: none; background: #151515; }
.brand-logo img { display: block; width: 100%; height: 100%; }
.brand-logo--small { width: 38px; height: 38px; border-radius: 11px; }
.brand-logo--normal { width: 50px; height: 50px; border-radius: 14px; box-shadow: 0 3px 10px rgba(17,17,17,.1); }
.brand-logo--tiny { width: 18px; height: 18px; border-radius: 5px; }
.sidebar-brand__text { display: grid; min-width: 0; gap: 3px; }
.sidebar-brand__text strong { font: 800 12px/1.2 'Manrope', sans-serif; letter-spacing: .105em; }
.sidebar-brand__text span { font-size: 11px; color: #a7a7ac; }
.sidebar-label { margin: 24px 10px 9px; font-size: 9px; letter-spacing: .15em; color: #818187; font-weight: 800; }
.sidebar-nav { display: grid; gap: 4px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #b8b8bd; text-align: left; font-size: 12px; font-weight: 650; transition: background .15s, color .15s; }
.nav-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-item.is-active { color: #fff; background: #29292c; border-color: #37373a; }
.nav-item.is-active > .icon { color: #ff797b; }
.nav-item.is-active i { position: absolute; left: -15px; width: 3px; height: 23px; border-radius: 0 3px 3px 0; background: #dd4144; }
.sidebar-label--quick { margin-top: 28px; }
.sidebar-quick { display: grid; gap: 7px; }
.sidebar-quick button { display: flex; align-items: center; gap: 10px; text-align: left; background: transparent; color: #d1d1d5; border: 1px solid #303034; padding: 9px 10px; border-radius: 9px; font-size: 11px; }
.sidebar-quick button:hover { border-color: #56565b; background: #202022; }
.quick-plus { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 6px; color: #fff; background: #323236; font-size: 16px; line-height: 1; }
.sidebar-spacer { flex: 1; min-height: 28px; }
.sidebar-total { border: 1px solid #36363b; background: linear-gradient(150deg, #222225, #1a1a1c); border-radius: 13px; padding: 14px 12px 12px; }
.sidebar-total__label { display: block; color: #a9a9b0; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.sidebar-total strong { display: block; color: #fff; font: 800 21px/1.35 'Manrope', sans-serif; letter-spacing: -.04em; margin: 4px 0 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-export { width: 100%; justify-content: center; padding: 10px 8px !important; font-size: 11px !important; }
.sidebar-foot { display: flex; align-items: center; gap: 7px; padding: 16px 7px 0; color: #8e8e95; font-size: 10px; }
.privacy-dot, .connectivity i, .app-footer__private i { width: 6px; height: 6px; background: #46b980; display: inline-block; border-radius: 50%; flex: none; }
.main-content { min-width: 0; margin-left: 252px; }
.content-wrap { max-width: 1600px; margin: 0 auto; padding: 34px clamp(22px, 3vw, 46px) 23px; }

/* Buttons and headings */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 9px 13px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 750; white-space: nowrap; transition: transform .12s ease, background .14s ease, border-color .14s ease; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--primary:hover:not(:disabled) { background: #2d2d31; border-color: #2d2d31; }
.btn--secondary { background: #fff; color: var(--ink); border-color: #dedfe4; }
.btn--secondary:hover:not(:disabled) { background: #f8f8fa; border-color: #c9cbd2; }
.btn--red { background: var(--red); color: #fff; border-color: var(--red); }
.btn--red:hover:not(:disabled) { background: var(--red-dark); }
.btn--block { width: 100%; }
.icon-button { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: white; color: #555; }
.icon-button:hover { background: var(--soft); color: var(--ink); }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-header__identity { display: flex; align-items: center; gap: 15px; min-width: 0; }
.page-header__identity > div:last-child { min-width: 0; }
.eyebrow { margin: 0 0 6px; color: #8b8d94; font-size: 9px; line-height: 1.2; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow span { padding: 0 4px; color: #c5c6cb; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 5px; font: 800 clamp(25px, 2.1vw, 32px)/1.14 'Manrope', sans-serif; letter-spacing: -.055em; }
.page-header__identity p { margin: 0; color: var(--muted); font-size: 12px; }
.page-header__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.connectivity { display: inline-flex; align-items: center; gap: 6px; color: #777a82; font-size: 10px; font-weight: 750; padding: 0 8px; }
.connectivity.is-offline i { background: #d09232; }
.install-button { border-color: transparent; background: transparent; }
.install-button:hover { border-color: #ddd; background: #fff; }
.export-button { min-height: 42px; padding-inline: 15px; }

/* Responsible driver */
.driver-panel { display: grid; grid-template-columns: 41px minmax(180px, 1fr) minmax(250px, .75fr); align-items: center; gap: 13px; padding: 15px 18px; margin-bottom: 17px; border: 1px solid #e6e7eb; background: #fff; border-radius: 13px; box-shadow: var(--shadow); scroll-margin-top: 80px; }
.driver-panel__icon { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 11px; background: #f0f0f2; color: #29292d; }
.driver-panel__copy { display: grid; gap: 3px; }
.driver-panel__copy strong { font-size: 12px; font-weight: 800; }
.driver-panel__copy span { color: var(--muted); font-size: 11px; }
.driver-field { display: grid; gap: 5px; }
.driver-field > span { color: #777a82; font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.driver-field input, .form-field input, .form-field textarea { width: 100%; min-width: 0; border: 1px solid #dfe0e5; border-radius: 8px; background: #fbfbfc; color: var(--ink); padding: 10px 11px; outline: none; font-size: 12px; }
.driver-field input:focus, .form-field input:focus, .form-field textarea:focus, .paste-qr textarea:focus { border-color: #9e9fa7; background: #fff; box-shadow: 0 0 0 3px rgba(20,20,20,.045); }

/* Metrics */
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 20px; }
.stat-card { min-width: 0; background: #fff; border: 1px solid #e6e7eb; border-radius: 13px; padding: 16px 17px 14px; box-shadow: var(--shadow); }
.stat-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #777a83; font-size: 11px; font-weight: 750; }
.stat-card__icon { display: grid; place-items: center; width: 33px; height: 33px; background: #f4f4f6; color: #54555b; border-radius: 9px; }
.stat-card--accent .stat-card__icon { color: var(--red); background: var(--red-soft); }
.stat-card__value { margin-top: 9px; font: 800 clamp(18px, 1.8vw, 26px)/1.25 'Manrope', sans-serif; letter-spacing: -.045em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card--accent .stat-card__value { color: #1e1e20; }
.stat-card__detail { margin-top: 5px; color: #989aa1; font-size: 10px; }

/* Workspace */
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.36fr) minmax(300px, .86fr); align-items: start; gap: 17px; margin-bottom: 19px; }
.panel { min-width: 0; border: 1px solid #e5e6ea; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.scanner-panel { padding: 19px; scroll-margin-top: 88px; }
.panel-heading { display: flex; align-items: center; gap: 11px; min-width: 0; margin-bottom: 16px; }
.panel-heading__icon { display: grid; place-items: center; width: 39px; height: 39px; flex: none; border-radius: 11px; background: #f2f2f4; color: #35353a; }
.panel-heading__icon--red { color: var(--red); background: var(--red-soft); }
.panel-heading__text { min-width: 0; flex: 1; }
.panel-heading__text h2, .section-title h2, .records-title h2 { margin: 0 0 3px; font: 800 15px/1.3 'Manrope', sans-serif; letter-spacing: -.03em; }
.panel-heading__text p, .records-title p { margin: 0; font-size: 11px; color: var(--muted); }
.live-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e4e5e8; border-radius: 50px; padding: 6px 8px; color: #6d7078; font-size: 8px; letter-spacing: .05em; font-weight: 850; white-space: nowrap; }
.live-pill i { width: 5px; height: 5px; border-radius: 50%; background: #aaadb4; }
.live-pill--on { color: #176844; background: #eef8f2; border-color: #d6ecdf; }
.live-pill--on i { background: #21a366; box-shadow: 0 0 0 3px rgba(33,163,102,.1); }
.camera-stage { height: clamp(210px, 24vw, 300px); position: relative; display: grid; place-items: center; overflow: hidden; background: #141416; border-radius: 12px; border: 1px solid #29292c; }
.camera-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.camera-video.is-visible { display: block; }
.camera-placeholder { position: relative; z-index: 1; display: grid; justify-items: center; padding: 20px; text-align: center; color: #fff; }
.camera-placeholder__glyph { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 11px; background: #28282b; color: #e5e5e8; border: 1px solid #3a3a3e; border-radius: 16px; }
.camera-placeholder strong { margin-bottom: 4px; font: 750 14px 'Manrope', sans-serif; }
.camera-placeholder span { color: #a7a7ad; font-size: 11px; }
.scan-frame { position: absolute; top: 15%; left: 18%; width: 64%; height: 70%; border: 1.5px solid rgba(255,255,255,.85); border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.12); pointer-events: none; }
.scan-frame:before, .scan-frame:after { content: ''; position: absolute; left: 7%; right: 7%; height: 1.5px; background: rgba(235,55,58,.85); box-shadow: 0 0 8px rgba(235,55,58,.4); }
.scan-frame:before { top: 0; } .scan-frame:after { bottom: 0; }
.scan-frame span { position: absolute; left: 50%; top: -23px; transform: translateX(-50%); padding: 3px 8px; border-radius: 4px; background: #141416; color: #fff; font-size: 8px; font-weight: 850; letter-spacing: .12em; white-space: nowrap; }
.camera-paused { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 6px; color: #fff; background: rgba(10,10,11,.67); text-align: center; z-index: 3; padding: 18px; }
.camera-paused strong { font-size: 14px; } .camera-paused span { font-size: 11px; color: #d4d4d8; }
.scanner-actions { display: flex; gap: 8px; margin-top: 12px; }
.scanner-actions .btn { min-width: 0; }
.camera-tools { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.tool-button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e1e2e6; border-radius: 7px; padding: 7px 9px; background: #fff; color: #55575d; font-size: 10px; font-weight: 700; }
.tool-button:hover, .tool-button.is-on { background: #f2f5f3; color: #176844; border-color: #d8e8dd; }
.scanner-tip { margin: 10px 1px 0; color: #8a8c94; font-size: 10px; line-height: 1.5; }
.status-banner { display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; border-radius: 9px; margin-top: 13px; background: #f5f6f8; color: #64666d; }
.status-banner p { margin: 0; font-size: 11px; line-height: 1.45; }
.status-banner__dot { width: 7px; height: 7px; margin-top: 4px; flex: none; background: #999ca3; border-radius: 50%; }
.status-banner--ok { background: var(--green-soft); color: #216947; }
.status-banner--ok .status-banner__dot { background: #208658; }
.status-banner--warn { background: #fff7e8; color: #856011; }
.status-banner--warn .status-banner__dot { background: #c48a1c; }
.status-banner--error { background: #fff0f0; color: #982d30; }
.status-banner--error .status-banner__dot { background: #c92f32; }
.paste-qr { margin-top: 13px; border-top: 1px solid #eeeff2; padding-top: 11px; }
.paste-qr summary { color: #767982; font-size: 10px; font-weight: 750; cursor: pointer; }
.paste-qr__body { display: grid; justify-items: start; gap: 8px; padding-top: 10px; }
.paste-qr textarea { width: 100%; resize: vertical; border: 1px solid #dfe0e5; border-radius: 8px; padding: 10px; font-size: 11px; }

/* Right rail */
.right-rail { display: grid; gap: 13px; }
.quick-panel { padding: 17px 15px 14px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 13px; }
.section-title .eyebrow { margin-bottom: 4px; }
.section-title h2 { margin: 0; font-size: 15px; }
.shortcut-mark { display: grid; place-items: center; min-width: 26px; height: 26px; border-radius: 7px; background: #f5f5f7; border: 1px solid #e6e6e9; color: #81838a; font-size: 13px; font-weight: 750; }
.quick-card { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; border: 1px solid #ebecf0; border-radius: 11px; padding: 10px; margin-top: 7px; text-align: left; color: var(--ink); background: #fff; transition: border-color .15s, background .15s, transform .15s; }
.quick-card:hover { border-color: #cfd0d6; background: #fcfcfd; transform: translateY(-1px); }
.quick-card--highlight { background: #fffafa; border-color: #f2dbdc; }
.quick-card--highlight:hover { background: #fff4f4; border-color: #e9bfc1; }
.quick-card__icon { display: grid; place-items: center; width: 39px; height: 39px; flex: none; background: #f2f2f4; color: #45464b; border-radius: 10px; }
.quick-card__icon--red { background: #fbe6e7; color: #bd272b; }
.quick-card__text { display: grid; gap: 3px; flex: 1; min-width: 0; }
.quick-card__text strong { font-size: 11px; font-weight: 800; }
.quick-card__text small { color: #858790; font-size: 9.5px; }
.quick-card__arrow { color: #b3b5bc; }
.clients-panel { padding: 15px; scroll-margin-top: 90px; }
.panel-heading--compact { margin-bottom: 13px; }
.panel-heading--compact .panel-heading__icon { width: 35px; height: 35px; border-radius: 10px; }
.panel-heading--compact .panel-heading__text h2 { font-size: 13px; }
.panel-heading--compact .panel-heading__text p { font-size: 10px; }
.clients-count { display: flex; align-items: center; gap: 9px; border: 1px solid #e8e9ed; border-radius: 9px; background: #fafafb; padding: 10px; }
.clients-count__symbol { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: var(--green-soft); color: var(--green); }
.clients-count div:last-child { display: grid; gap: 2px; }
.clients-count strong { font-size: 11px; }
.clients-count span { color: #8b8e95; font-size: 9.5px; }
.clients-actions { display: grid; gap: 5px; margin-top: 11px; }
.clients-actions .btn { min-height: 35px; font-size: 11px; }
.text-button { display: inline-flex; justify-content: center; align-items: center; gap: 5px; padding: 6px 7px; border: 0; background: transparent; color: #898b92; font-size: 10px; }
.text-button:hover:not(:disabled) { color: var(--red); }
.privacy-note { display: flex; align-items: flex-start; gap: 5px; margin: 8px 0 0; color: #9698a0; font-size: 9px; line-height: 1.45; }
.privacy-note .icon { margin-top: 1px; flex: none; }
.note-panel { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #e3eae6; border-radius: 12px; background: #f7fbf8; }
.note-panel__icon { display: grid; place-items: center; width: 29px; height: 29px; flex: none; border-radius: 8px; background: #e3f3e9; color: #24744d; }
.note-panel strong { display: block; margin: 1px 0 3px; color: #285e43; font-size: 11px; }
.note-panel p { margin: 0; color: #708579; font-size: 9.5px; line-height: 1.5; }

/* Records table */
.records-panel { overflow: hidden; margin-bottom: 18px; scroll-margin-top: 88px; }
.records-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 20px 16px; }
.records-title { display: flex; align-items: center; gap: 11px; }
.records-title .panel-heading__icon { width: 38px; height: 38px; }
.records-title h2 { font-size: 15px; }
.records-count { flex: none; border: 1px solid #e2e3e7; background: #fafafb; color: #676970; border-radius: 50px; padding: 6px 10px; font-size: 10px; font-weight: 800; }
.table-scroll { max-width: 100%; overflow: auto; border-top: 1px solid #ececf0; }
.records-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.records-table thead th { background: #fafafb; color: #777982; padding: 11px 14px; border-bottom: 1px solid #e9e9ed; font-size: 9px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
.records-table tbody td { padding: 10px 14px; border-bottom: 1px solid #f0f0f2; vertical-align: middle; }
.records-table tbody tr:last-child td { border-bottom: none; }
.records-table tbody tr:hover { background: #fcfcfd; }
.records-table .col-num { width: 42px; }
.records-table .col-amount { text-align: right; }
.records-table .col-action { width: 44px; }
.row-num { color: #9b9da4; font-size: 10px; font-variant-numeric: tabular-nums; }
.client-edit { display: block; min-width: 150px; max-width: 100%; width: 100%; background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 5px 7px; color: #252529; font-size: 11px; font-weight: 700; }
.client-edit:hover, .client-edit:focus { background: #fff; border-color: #dbdce1; outline: none; }
.record-note { display: block; padding-left: 7px; color: #9a7475; font-size: 9px; }
.invoice-value { color: #60626a; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted-dash { color: #c1c2c7; }
.money-value { font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.row-delete { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid transparent; border-radius: 7px; color: #9a9ca3; background: transparent; }
.row-delete:hover { border-color: #f0d3d4; color: var(--red); background: #fff5f5; }
.empty-state { padding: 43px 20px 45px; display: grid; justify-items: center; text-align: center; }
.empty-state__icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 12px; background: #f2f2f4; border-radius: 15px; color: #777982; }
.empty-state strong { font: 800 14px 'Manrope', sans-serif; }
.empty-state p { margin: 5px 0 0; max-width: 320px; color: #858790; font-size: 11px; }
.records-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid #ebecf0; background: #fbfbfc; padding: 13px 20px; }
.records-footer > span { display: flex; align-items: center; gap: 6px; color: #8a8c93; font-size: 10px; }
.records-footer > span .icon { color: #4d936e; }
.records-footer > strong { display: flex; align-items: center; gap: 17px; font-size: 9px; color: #797b83; letter-spacing: .075em; }
.records-footer > strong b { color: #1a1a1d; font: 800 15px 'Manrope', sans-serif; letter-spacing: -.035em; white-space: nowrap; }
.app-footer { display: flex; align-items: center; gap: 8px; color: #92949b; font-size: 10px; padding: 3px 2px 8px; }
.app-footer__private { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.app-footer__private i { width: 5px; height: 5px; }

/* Modal and forms */
.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(16,16,19,.58); backdrop-filter: blur(5px); }
.modal { width: min(100%, 500px); max-height: min(88vh, 760px); overflow-y: auto; border: 1px solid rgba(255,255,255,.28); border-radius: 17px; padding: 21px; background: #fff; box-shadow: 0 25px 90px rgba(0,0,0,.22); animation: modal-in .16s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(7px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 20px; }
.modal__header h2 { margin: 1px 0 5px; font: 800 18px 'Manrope', sans-serif; letter-spacing: -.04em; }
.modal__header p { margin: 0; max-width: 385px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.modal-form { display: grid; gap: 15px; }
.form-field { display: grid; gap: 6px; min-width: 0; }
.form-field > span { display: flex; align-items: center; gap: 7px; color: #55575e; font-size: 11px; font-weight: 750; }
.form-field em { color: #9698a0; font-style: normal; font-size: 9px; font-weight: 500; }
.form-field input { padding: 11px 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding-top: 3px; }
.invoice-preview { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; padding: 13px; border: 1px solid #e7e8ec; border-radius: 10px; background: #fafafb; }
.invoice-preview span { color: #8d8f96; font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.invoice-preview strong { font-size: 11px; font-weight: 800; text-align: right; }
.invoice-preview small { grid-column: 1/-1; margin-top: 4px; color: #8d8f96; font-size: 10px; }
.toast-message { position: fixed; z-index: 150; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 9px; max-width: min(430px, calc(100vw - 32px)); padding: 13px 16px; border: 1px solid #333; border-radius: 11px; background: #1b1b1e; color: #fff; font-size: 12px; font-weight: 650; box-shadow: 0 15px 45px rgba(0,0,0,.2); animation: toast-in .18s ease-out; }
.toast-message .icon { color: #ff8587; }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1500px) {
  .content-wrap { padding-top: 41px; }
  .workspace-grid { grid-template-columns: minmax(0, 1.5fr) minmax(320px, .84fr); }
  .scanner-panel { padding: 22px; }
  .camera-stage { height: 315px; }
}
@media (max-width: 1180px) {
  .content-wrap { padding: 26px 22px 20px; }
  .sidebar { width: 230px; }
  .main-content { margin-left: 230px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .right-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .note-panel { grid-column: 1 / -1; }
  .page-header { align-items: flex-start; }
  .page-header__actions { max-width: 280px; }
}
@media (max-width: 850px) {
  .sidebar { position: sticky; inset: 0 0 auto; width: 100%; height: auto; max-height: none; padding: 9px 13px 7px; border-bottom: 1px solid #333; overflow: visible; }
  .sidebar-brand { padding: 0 3px 9px; border: 0; }
  .brand-logo--small { width: 31px; height: 31px; }
  .sidebar-brand__text { display: flex; align-items: baseline; gap: 8px; }
  .sidebar-brand__text strong { font-size: 10px; }
  .sidebar-brand__text span { font-size: 10px; }
  .sidebar-label, .sidebar-quick, .sidebar-spacer, .sidebar-total, .sidebar-foot { display: none; }
  .sidebar-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 1px; scrollbar-width: none; }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .nav-item { flex: none; min-height: 34px; padding: 0 10px; gap: 7px; font-size: 10px; border-color: #303034; background: #202022; }
  .nav-item.is-active { background: #353539; }
  .nav-item.is-active i { display: none; }
  .nav-item .icon { width: 15px; height: 15px; }
  .main-content { margin-left: 0; }
  .content-wrap { max-width: 1050px; padding: 22px 18px 18px; }
  .page-header { margin-bottom: 19px; }
  .page-header__actions { max-width: none; }
  .stats-grid { gap: 10px; }
  .driver-panel { grid-template-columns: 40px minmax(120px, 1fr) minmax(200px, .9fr); padding: 13px; }
}
@media (max-width: 620px) {
  html { scroll-padding-top: 100px; }
  .content-wrap { padding: 18px 12px 14px; }
  .page-header { align-items: flex-start; flex-direction: column; gap: 15px; }
  .page-header__identity { gap: 11px; align-items: center; }
  .brand-logo--normal { width: 43px; height: 43px; border-radius: 12px; }
  .eyebrow { font-size: 8px; letter-spacing: .13em; }
  h1 { font-size: 25px; }
  .page-header__identity p { font-size: 10.5px; }
  .page-header__actions { width: 100%; display: grid; grid-template-columns: 1fr 1.2fr; gap: 6px; }
  .connectivity { grid-column: 1/-1; justify-content: flex-start; padding: 0 2px 2px; }
  .btn { min-height: 38px; padding: 9px 10px; font-size: 11px; }
  .install-button { border: 1px solid #e0e1e5; background: #fff; }
  .export-button { width: 100%; }
  .driver-panel { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 12px; margin-bottom: 12px; }
  .driver-panel__icon { width: 36px; height: 36px; }
  .driver-panel__copy strong { font-size: 11px; }
  .driver-panel__copy span { font-size: 9.5px; }
  .driver-field { grid-column: 1/-1; }
  .driver-field input { padding: 10px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 13px; }
  .stat-card { padding: 12px; }
  .stat-card:last-child { grid-column: 1/-1; }
  .stat-card__top { font-size: 9.5px; }
  .stat-card__icon { width: 28px; height: 28px; }
  .stat-card__value { font-size: 20px; }
  .stat-card__detail { font-size: 9px; }
  .workspace-grid { gap: 12px; margin-bottom: 12px; }
  .scanner-panel { padding: 13px; border-radius: 13px; }
  .panel-heading { gap: 9px; margin-bottom: 12px; }
  .panel-heading__icon { width: 35px; height: 35px; border-radius: 10px; }
  .panel-heading__text h2 { font-size: 13px; }
  .panel-heading__text p { font-size: 10px; }
  .live-pill { font-size: 7px; padding: 5px 6px; }
  .camera-stage { height: 220px; }
  .scanner-actions { gap: 7px; }
  .scanner-actions .btn { flex: 1; white-space: normal; font-size: 10.5px; }
  .camera-tools { gap: 5px; }
  .tool-button { font-size: 9px; padding: 6px 7px; }
  .scanner-tip { font-size: 9.5px; }
  .right-rail { grid-template-columns: 1fr; gap: 10px; }
  .quick-panel, .clients-panel { padding: 13px; }
  .quick-card { padding: 9px; gap: 9px; }
  .quick-card__icon { width: 35px; height: 35px; }
  .quick-card__text strong { font-size: 11px; }
  .quick-card__text small { font-size: 9px; }
  .records-header { align-items: flex-start; padding: 13px 12px 12px; }
  .records-title { gap: 9px; }
  .records-title .panel-heading__icon { width: 33px; height: 33px; }
  .records-title h2 { font-size: 13px; }
  .records-title p { max-width: 220px; font-size: 9px; }
  .records-count { font-size: 9px; padding: 5px 7px; }
  .records-table { min-width: 620px; }
  .records-table thead th { padding: 10px 9px; font-size: 8px; }
  .records-table tbody td { padding: 8px 9px; }
  .client-edit { min-width: 130px; font-size: 10.5px; }
  .records-footer { align-items: flex-start; flex-direction: column; padding: 11px 12px; gap: 10px; }
  .records-footer > strong { width: 100%; justify-content: space-between; gap: 6px; font-size: 8px; }
  .records-footer > strong b { font-size: 14px; }
  .app-footer { flex-wrap: wrap; font-size: 9px; padding: 2px 3px; }
  .app-footer__private { width: 100%; margin: 0; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 90dvh; padding: 20px 16px max(18px, env(safe-area-inset-bottom)); border-radius: 19px 19px 0 0; border-bottom: 0; }
  .modal__header h2 { font-size: 17px; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .toast-message { right: 12px; bottom: calc(13px + env(safe-area-inset-bottom)); left: 12px; max-width: none; }
}
@media (max-width: 380px) {
  .sidebar-brand__text span { display: none; }
  .nav-item { padding: 0 8px; gap: 5px; }
  .nav-item span { font-size: 9px; }
  h1 { font-size: 23px; }
  .stat-card__value { font-size: 17px; }
  .form-row { grid-template-columns: 1fr; }
}
