/* Evo DMS — modern, calm, fast. */
:root {
  --bg: #f4f6fb; --panel: #ffffff; --ink: #0f172a; --ink-2: #475569; --muted: #8a94a7; --line: #e6eaf2; --line-2: #eef1f7;
  --brand: #4f46e5; --brand-2: #06b6d4; --brand-soft: #eef0ff; --brand-ink: #3730a3;
  --ok: #059669; --ok-soft: #e7f8f1; --warn: #d97706; --warn-soft: #fff5e6; --bad: #dc2626; --bad-soft: #fdecec; --info: #2563eb; --info-soft: #eaf1ff;
  --side: #0b1020; --side-2: #121a33; --side-ink: #aab3c8;
  --radius: 14px; --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, .18);
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; letter-spacing: -.02em; margin: 0; font-weight: 700; }
h2 { font-size: 15px; margin: 0; font-weight: 650; }
h3 { font-size: 14px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; letter-spacing: .02em; }
.ok-t { color: var(--ok); } .warn-t { color: var(--warn); } .bad-t { color: var(--bad); } .r { text-align: right; } .c { text-align: center; } .b { font-weight: 650; }
.full { width: 100%; }

/* ---------- Shell ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: 236px; background: linear-gradient(180deg, var(--side) 0%, var(--side-2) 100%); color: var(--side-ink); display: flex; flex-direction: column; z-index: 20; transition: transform .25s ease; }
.brand { display: flex; align-items: center; gap: 8px; padding: 22px 22px 18px; font-weight: 800; font-size: 18px; color: #fff; letter-spacing: .02em; }
.brand .logo { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; padding: 5px 9px; border-radius: 9px; font-size: 14px; letter-spacing: .08em; box-shadow: 0 6px 18px rgba(79, 70, 229, .45); }
.brand.big { justify-content: center; font-size: 26px; padding: 0 0 6px; color: var(--ink); }
.brand.big .logo { font-size: 20px; padding: 7px 12px; }
.side nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #5d6782; margin: 18px 10px 6px; font-weight: 700; }
.side nav a { display: block; color: var(--side-ink); padding: 8px 12px; border-radius: 9px; margin: 1px 0; font-weight: 500; transition: background .15s, color .15s; }
.side nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.side nav a.on { background: linear-gradient(90deg, rgba(79, 70, 229, .9), rgba(6, 182, 212, .55)); color: #fff; box-shadow: 0 6px 18px rgba(79, 70, 229, .3); }
.side nav { padding-top: 10px; }
.side nav .nav-main { display: flex; align-items: center; gap: 11px; width: 100%; background: none; border: 0; cursor: pointer; font: inherit; font-weight: 650; font-size: 14.5px; color: var(--side-ink); padding: 11px 12px; border-radius: 10px; margin: 2px 0; text-align: left; transition: background .15s, color .15s; }
.side nav .nav-main:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav-sec.here > .nav-main { color: #fff; }
.ni { width: 22px; text-align: center; font-size: 16px; }
.chev { margin-left: auto; opacity: .55; transition: transform .2s; font-size: 16px; }
.nav-sec.open .chev { transform: rotate(90deg); }
.nav-sec .nav-sub { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.nav-sec.open .nav-sub { max-height: 260px; }
.side nav .nav-sub a { padding: 7px 12px 7px 45px; font-size: 13.5px; }
.nav-count { margin-left: auto; background: rgba(255, 255, 255, .14); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 8px; }
.nav-count.bad { background: #ef4444; }
.side-foot { padding: 14px 22px; font-size: 12px; color: #5d6782; border-top: 1px solid rgba(255, 255, 255, .06); }
.body { margin-left: 236px; min-height: 100vh; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; padding: 12px 28px; background: rgba(244, 246, 251, .82); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.gsearch { flex: 1; max-width: 620px; }
.gsearch input { width: 100%; padding: 10px 14px 10px 38px; border-radius: 12px; border: 1px solid var(--line); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a94a7' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 13px center no-repeat; font: inherit; transition: box-shadow .15s, border-color .15s; }
.gsearch input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.who { margin-left: auto; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.btn.menu-btn { display: none; }
.sync { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.sync.saving { background: var(--info-soft); color: var(--info); } .sync.error { background: var(--bad-soft); color: var(--bad); } .sync.local { background: #f1f3f7; color: #64748b; }
main { padding: 26px 28px 60px; max-width: 1480px; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Page header / buttons ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-2); margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 550; cursor: pointer; transition: all .15s; text-decoration: none !important; white-space: nowrap; }
.btn:hover { border-color: #cfd6e4; box-shadow: 0 2px 8px rgba(15, 23, 42, .06); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn.primary { background: linear-gradient(135deg, var(--brand), #6366f1); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(79, 70, 229, .28); }
.btn.primary:hover { box-shadow: 0 8px 22px rgba(79, 70, 229, .38); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger.ghost { background: transparent; color: var(--bad); border-color: #f5c2c2; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; justify-content: center; padding: 11px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
select, input, textarea { font: inherit; color: var(--ink); }
.actions select, .filters select, .filters input, .row-actions input { padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

/* ---------- Cards / stats ---------- */
.card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; border: 1px solid rgba(230, 234, 242, .7); }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 0; }
.card-body { padding: 16px 20px 18px; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stats, .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--panel); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); border: 1px solid rgba(230, 234, 242, .7); color: inherit; transition: transform .15s, box-shadow .15s; display: block; }
a.stat:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(15, 23, 42, .1); text-decoration: none; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stat-value { font-size: 24px; font-weight: 750; letter-spacing: -.02em; margin-top: 4px; }
.stat-note { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.kpis .stat { position: relative; overflow: hidden; }
.kpis .stat::after { content: ""; position: absolute; inset: auto -30px -40px auto; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(79, 70, 229, .10), transparent 70%); }
.kpis .stat-value { font-size: 28px; }
dl.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 7px 14px; margin: 0; }
dl.kv dt { color: var(--muted); font-size: 13px; }
dl.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Dashboard ---------- */
.hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 24px 26px; margin-bottom: 18px; border-radius: 20px; color: #fff;
  background: radial-gradient(1200px 300px at 0% 0%, rgba(6, 182, 212, .55), transparent 60%), linear-gradient(120deg, #312e81 0%, #4f46e5 55%, #0891b2 100%); box-shadow: 0 18px 50px rgba(79, 70, 229, .28); }
.hero .muted { color: rgba(255, 255, 255, .75); }
.hello { font-size: 26px; font-weight: 750; letter-spacing: -.02em; }
.quick { display: flex; gap: 10px; flex-wrap: wrap; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 96px; padding: 12px 10px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer; backdrop-filter: blur(6px); transition: all .18s; }
.qa span { font-size: 20px; line-height: 1; }
.qa:hover { background: rgba(255, 255, 255, .24); transform: translateY(-2px); }
.month-nav { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 15px; }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: url(#g); fill: #818cf8; transition: fill .15s; }
.chart .bar.today, .chart g:hover .bar { fill: var(--brand); }
.chart text { font-size: 10px; fill: var(--muted); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; color: var(--ink-2); font-size: 13px; }
ul.alerts { list-style: none; margin: 0; padding: 0; }
ul.alerts li { padding: 11px 12px 11px 14px; border-radius: 10px; margin-bottom: 8px; border-left: 4px solid; }
ul.alerts li a { color: var(--ink); font-weight: 550; }
ul.alerts li.bad { background: var(--bad-soft); border-color: var(--bad); }
ul.alerts li.warn { background: var(--warn-soft); border-color: var(--warn); }
ul.alerts li.info { background: var(--info-soft); border-color: var(--info); }

/* ---------- Tables ---------- */
.table-wrap { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(230, 234, 242, .7); margin-bottom: 18px; overflow: hidden; }
.card .table-wrap, .modal .table-wrap { box-shadow: none; border: 1px solid var(--line-2); }
.table-tools { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.table-tools .search { flex: 0 1 320px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.table-tools .search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.table-tools .count { color: var(--muted); font-size: 12.5px; margin-right: auto; }
.scroll-x { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; padding: 10px 12px; background: #fafbfe; border-bottom: 1px solid var(--line); cursor: pointer; white-space: nowrap; user-select: none; }
table.grid th:hover { color: var(--ink); }
table.grid th.r { text-align: right; }
table.grid td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid tr.click { cursor: pointer; transition: background .12s; }
table.grid tr.click:hover td { background: #f6f7ff; }
table.grid td.empty { text-align: center; color: var(--muted); padding: 26px; }
table.grid tfoot td, table.grid tr.tot td { font-weight: 700; background: #fafbfe; border-top: 2px solid var(--line); }
table.grid tr.sec td { font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); }
table.grid tr.big td { font-size: 16px; }
table.grid.mini { font-size: 12px; margin-top: 10px; } table.grid.mini td, table.grid.mini th { padding: 5px 6px; text-align: right; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; letter-spacing: .01em; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); } .badge.muted { background: #f1f3f7; color: #64748b; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.form-section { grid-column: 1 / -1; margin: 10px 0 0; font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--brand-ink); font-weight: 700; }
label.f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
label.f > span { font-size: 12px; color: var(--ink-2); font-weight: 600; }
label.f input, label.f select, label.f textarea, textarea.full, input.full { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
label.f input:focus, label.f select:focus, label.f textarea:focus, textarea.full:focus, input.full:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
label.f input[readonly], label.f select[readonly], label.f textarea[readonly] { background: #f7f8fb; color: var(--ink-2); pointer-events: none; }
label.f.check { flex-direction: row; align-items: center; gap: 8px; padding-top: 22px; }
.span-1 { grid-column: span 1; } .span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: 1 / -1; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.hint { color: var(--muted); font-size: 12.5px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; background: var(--panel); padding: 12px 14px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.warnbox { background: var(--warn-soft); color: #92400e; border-radius: 10px; padding: 10px 12px; margin-top: 12px; font-size: 13px; }
.note { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.mini-stats { background: var(--brand-soft); color: var(--brand-ink); padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-weight: 600; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; margin: 0 0 14px; background: #e9ecf4; padding: 4px; border-radius: 12px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tab { padding: 7px 14px; border-radius: 9px; border: 0; background: transparent; color: var(--ink-2); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.tab.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(15, 23, 42, .1); }

/* ---------- Deal desk ---------- */
.desk { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.desk-side .sticky { position: sticky; top: 76px; }
.sum-row { display: flex; justify-content: space-between; padding: 5px 0; color: var(--ink-2); }
.sum-row span:last-child { color: var(--ink); font-variant-numeric: tabular-nums; }
.sum-row.b span { font-weight: 700; color: var(--ink); }
.sum-row.big { font-size: 16px; font-weight: 700; padding: 8px 0; border-top: 1px dashed var(--line); }
.sum-row.big span { color: var(--ink); }
.sum-row.accent span:last-child { color: var(--brand); font-size: 22px; }
.desk-side hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.pickup { margin-bottom: 8px; }
.dropdown { position: relative; display: inline-block; }
.dropdown .menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); min-width: 250px; padding: 6px; z-index: 30; }
.dropdown:focus-within .menu, .dropdown:hover .menu { display: block; }
.dropdown .menu a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); cursor: pointer; }
.dropdown .menu a:hover { background: var(--brand-soft); text-decoration: none; }
.dropdown::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; }

/* ---------- Reports ---------- */
.group-h { margin: 18px 0 10px; color: var(--ink-2); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tile { background: var(--panel); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; color: var(--ink); border: 1px solid rgba(230, 234, 242, .7); transition: all .15s; }
.tile span { color: var(--ink-2); font-size: 13px; }
.tile:hover { transform: translateY(-2px); border-color: #c7cbfa; box-shadow: 0 12px 30px rgba(79, 70, 229, .12); text-decoration: none; }
.report { background: transparent; }
.rep-head { display: flex; justify-content: space-between; margin-bottom: 12px; }
.rep-group { margin: 22px 0 8px; color: var(--brand-ink); }
.rep-sub { margin: 14px 0 6px; font-size: 13px; }
table.sumblock { margin: 8px 0 18px auto; min-width: 380px; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); border-collapse: separate; padding: 8px 14px; }
table.sumblock td { padding: 4px 6px; }
.sum-grid { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.county-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }

/* ---------- Photos & documents ---------- */
.dropzone { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px; border: 2px dashed var(--line); border-radius: 12px; margin-bottom: 12px; transition: all .15s; }
.dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.photo-grid figure { margin: 0; border-radius: 10px; overflow: hidden; background: #f1f3f7; position: relative; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; cursor: zoom-in; transition: transform .2s; }
.photo-grid img:hover { transform: scale(1.04); }
.photo-grid figcaption { position: absolute; left: 6px; bottom: 6px; font-size: 11px; background: rgba(15, 23, 42, .65); color: #fff; padding: 2px 7px; border-radius: 6px; }
.lightbox { text-align: center; } .lightbox img { max-width: 100%; max-height: 62vh; border-radius: 10px; }
img.thumb, span.thumb { width: 56px; height: 42px; border-radius: 6px; object-fit: cover; display: block; background: #eef1f7; }

/* ---------- Modal / toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; animation: fade .15s ease; overflow-y: auto; }
.modal { background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); width: 560px; max-width: 100%; animation: pop .18s ease; }
.modal.wide { width: 920px; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 0; }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 16px 22px; max-height: 68vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line-2); }
.x { border: 0; background: #f1f3f7; width: 32px; height: 32px; border-radius: 50%; font-size: 20px; cursor: pointer; color: var(--ink-2); }
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { padding: 12px 16px; border-radius: 12px; color: #fff; background: #0f172a; box-shadow: var(--shadow-lg); font-weight: 550; animation: pop .2s ease; max-width: 380px; }
.toast.ok { background: linear-gradient(135deg, #059669, #10b981); } .toast.bad { background: var(--bad); } .toast.warn { background: var(--warn); }
pre.err { white-space: pre-wrap; background: #fff; padding: 16px; border-radius: 12px; color: var(--bad); }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(900px 500px at 10% 10%, rgba(6, 182, 212, .35), transparent 60%), radial-gradient(900px 600px at 90% 90%, rgba(79, 70, 229, .45), transparent 60%), #0b1020; }
.login-box { background: rgba(255, 255, 255, .97); padding: 34px 32px; border-radius: 22px; width: 380px; max-width: 100%; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); text-align: center; }
.login-box label.f { text-align: left; }

/* ---------- Mobile ---------- */
@media (max-width: 1100px) { .cols-3 { grid-template-columns: 1fr 1fr; } .desk { grid-template-columns: 1fr; } .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .side { transform: translateX(-100%); box-shadow: var(--shadow-lg); } .side.open { transform: none; }
  .body { margin-left: 0; } .btn.menu-btn { display: inline-flex; } .top { padding: 10px 16px; } main { padding: 18px 16px 50px; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr 1fr; } .span-3 { grid-column: 1 / -1; }
  .who > span { display: none; } table.sumblock { min-width: 0; width: 100%; } .hero { padding: 20px; }
}
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } .span-2, .span-3 { grid-column: 1 / -1; } .qa { min-width: 74px; } }

/* ---------- Print ---------- */
#print-area { display: none; }
@media print {
  @page { margin: 12mm; }
  body { background: #fff; }
  #app, #modal-root, #toasts { display: none !important; }
  #print-area { display: block; color: #000; font-size: 11.5px; }
  .doc-head { display: flex; justify-content: space-between; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 12px; }
  .doc-dealer { font-size: 16px; font-weight: 800; }
  .doc-title { font-size: 18px; font-weight: 800; text-transform: uppercase; }
  table { width: 100%; border-collapse: collapse; margin: 8px 0; }
  th, td { border: 1px solid #999; padding: 3px 5px; text-align: left; font-size: 10.5px; }
  .doc-t.narrow { width: 60%; margin-left: auto; } .r { text-align: right; }
  .tila td { width: 20%; vertical-align: top; } .tila .tv { font-size: 15px; font-weight: 800; margin-top: 6px; }
  .sigs { display: flex; gap: 30px; margin-top: 36px; } .sigs > div { flex: 1; } .sigline { border-bottom: 1px solid #000; height: 30px; }
  .box { border: 1px solid #000; padding: 8px; margin: 8px 0; }
  .doc + .doc { break-before: page; page-break-before: always; }
  ol.terms { padding-left: 18px; } ol.terms li { margin-bottom: 4px; } h3 { font-size: 12px; margin: 10px 0 4px; }
  .sticker .big { font-size: 28px; font-weight: 800; } .sticker .price { font-size: 40px; font-weight: 800; margin: 12px 0; }
  .badge { border: 1px solid #000; background: none !important; color: #000 !important; }
  dl.kv { display: grid; grid-template-columns: 40% 60%; gap: 3px; } dl.kv dt { color: #444; }
  a { color: #000; } .table-tools, .btn { display: none !important; }
  table.sumblock { box-shadow: none; } .stats { display: flex; gap: 10px; } .stat { border: 1px solid #999; padding: 6px; }
}

/* ---------- Inventory queues (IDMS "Inventory Queues") ---------- */
.qchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.qchip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 550; font-size: 13px; transition: all .15s; }
.qchip b { background: var(--line-2); color: var(--ink); border-radius: 999px; padding: 0 8px; font-size: 12px; min-width: 22px; text-align: center; }
.qchip:hover { border-color: var(--brand); color: var(--brand-ink); }
.qchip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.qchip.on b { background: var(--brand); color: #fff; }
@media print { .qchips { display: none; } }
