/* Deal Room — Night desk (shared with Parcel Room). Teal = action/selection, amber = opportunity/money. */
:root {
  --bg: #0b0e13; --panel: #10141b; --raised: #161b24; --raised-2: #1c2230; --ink: #e9edf2; --muted: #8a94a4; --line: #222936; --line-2: #2e3746;
  --accent: #3dd6b5; --accent-soft: rgba(61,214,181,.12); --heat: #f5b547; --heat-soft: rgba(245,181,71,.13); --red: #ff6b6b; --red-soft: rgba(255,107,107,.12); --green: #5ad37a; --blue: #4dabf7; --violet: #a78bfa; --orange: #ff8a4c;
  --radius: 10px; --mono: 'Geist Mono', ui-monospace, SFMono-Regular, monospace; --sans: Geist, system-ui, -apple-system, sans-serif;
  --nav-w: 212px; --top-h: 54px; --gutter: clamp(14px, 1.6vw, 28px);
  font-family: var(--sans); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-size: 13px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; } a.lnk:hover { text-decoration: underline; }
::selection { background: var(--accent); color: #04120f; }
*::-webkit-scrollbar { width: 10px; height: 10px; } *::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 3px solid var(--panel); } *::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .heat { color: var(--heat); } .acc { color: var(--accent); } .red { color: var(--red); } .green { color: var(--green); }
.section-t, .flabel, th, .kpi small, .fgroup h4 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; }
h1 { font-size: 20px; font-weight: 600; letter-spacing: -.015em; margin: 0; } h2 { font-size: 16px; font-weight: 600; margin: 0; } h3 { margin: 0; } h4.section-t { margin: 14px 0 6px; } p { margin: 0 0 8px; line-height: 1.5; max-width: 70ch; }
.ic { vertical-align: -3px; }

/* Shell */
.app { display: grid; grid-template-columns: var(--nav-w) 1fr; grid-template-rows: var(--top-h) 1fr; height: 100vh; height: 100dvh; width: 100%; }
header.top { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 0 var(--gutter) 0 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; white-space: nowrap; color: var(--ink); width: calc(var(--nav-w) - 14px); }
.brand b { font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
.badge { font-family: var(--mono); font-size: 11px; letter-spacing: .02em; color: var(--muted); border: 1px solid var(--line-2); padding: 2px 8px; border-radius: 99px; }
.badge i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 6px; box-shadow: 0 0 8px var(--accent); vertical-align: 1px; }
.search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 7px 10px; color: var(--muted); cursor: text; text-align: left; }
.search:hover { border-color: var(--line-2); } .search span { flex: 1; } .search kbd { font-family: var(--mono); font-size: 10.5px; border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; }
.hdr-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
#nav-toggle { display: none; }
nav { background: var(--panel); border-right: 1px solid var(--line); padding: 10px 8px; display: flex; flex-direction: column; gap: 1px; overflow-y: auto; }
nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--muted); font-weight: 500; }
nav a:hover { color: var(--ink); background: var(--raised); } nav a.on { color: var(--ink); background: var(--raised); box-shadow: inset 2px 0 0 var(--accent); }
nav a .nbadge { margin-left: auto; }
.nbadge { font-family: var(--mono); font-size: 10.5px; background: var(--heat); color: #1a1200; border-radius: 99px; padding: 1px 6px; font-weight: 500; min-width: 18px; text-align: center; }
.nav-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.userbtn { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: transparent; padding: 6px 8px; border-radius: 7px; cursor: pointer; text-align: left; }
.userbtn:hover { background: var(--raised); } .userbtn span { display: grid; line-height: 1.25; } .userbtn small { color: var(--muted); font-size: 11px; }
main { min-width: 0; min-height: 0; overflow-y: auto; position: relative; }
.page { padding: 18px var(--gutter) 40px; }
.page.flush { padding: 0; height: 100%; display: flex; flex-direction: column; }
.phead { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.phead p { margin: 4px 0 0; } .pactions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Buttons, inputs, chips */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--raised); padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; white-space: nowrap; transition: border-color .12s, background .12s; color: var(--ink); }
.btn:hover { border-color: #465164; } .btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #04120f; font-weight: 600; } .btn.primary:hover { background: #5be3c5; }
.btn.danger { background: var(--red-soft); border-color: rgba(255,107,107,.4); color: var(--red); }
.btn.ghost { background: transparent; } .btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.sm { padding: 4px 9px; font-size: 12px; border-radius: 6px; } .btn.xs { padding: 2px 7px; font-size: 11.5px; border-radius: 5px; }
.iconbtn { border: 1px solid transparent; background: transparent; padding: 6px; border-radius: 7px; cursor: pointer; color: var(--muted); position: relative; display: inline-flex; }
.iconbtn:hover { background: var(--raised); color: var(--ink); } .iconbtn .nbadge { position: absolute; top: -3px; right: -4px; }
input.full, select.full, textarea.full, .range input { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; background: var(--bg); color: var(--ink); min-width: 0; }
input.full:focus, select.full:focus, textarea.full:focus, .range input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
input.big { font-size: 16px; padding: 11px 12px; }
textarea.full { resize: vertical; line-height: 1.45; }
select.full { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 26px; }
.field { display: grid; gap: 5px; margin-bottom: 10px; min-width: 0; } .field small { font-size: 11px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 6px 0; } input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.checks label { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; } .checks .n { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.inline-checks { display: flex; flex-wrap: wrap; gap: 2px 14px; }
details summary { cursor: pointer; margin: 8px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line-2); background: transparent; border-radius: 99px; padding: 4px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink); }
.chip:hover { border-color: #465164; } .chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); } .chip .n { font-family: var(--mono); font-size: 11px; opacity: .7; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.tabs { display: inline-flex; gap: 2px; background: var(--bg); padding: 3px; border-radius: 8px; border: 1px solid var(--line); }
.tabs button { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tabs button:hover { color: var(--ink); } .tabs button.on { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.tabs button .n { font-family: var(--mono); font-size: 11px; color: var(--heat); margin-left: 5px; }
.tag { display: inline-block; font-size: 11px; border: 1px solid var(--line-2); border-radius: 99px; padding: 1px 7px; color: var(--muted); white-space: nowrap; margin: 1px 2px 1px 0; }
.tag.demo { border-style: dashed; }
.tag.hot, .tag.Hot { border-color: rgba(245,181,71,.5); color: var(--heat); background: var(--heat-soft); }
.score { font-family: var(--mono); font-size: 11px; border-radius: 6px; padding: 2px 6px; font-weight: 500; }
.score.shot { background: var(--heat-soft); color: var(--heat); } .score.swarm { background: rgba(77,171,247,.14); color: var(--blue); } .score.scold { background: var(--raised-2); color: var(--muted); }
.stage { display: inline-block; font-size: 11.5px; border-radius: 6px; padding: 2px 8px; background: var(--raised-2); border: 1px solid var(--line-2); white-space: nowrap; }
.stage.won { background: rgba(90,211,122,.14); border-color: rgba(90,211,122,.4); color: var(--green); } .stage.lost { background: var(--red-soft); border-color: rgba(255,107,107,.35); color: var(--red); }
.status { display: inline-block; font-size: 11px; border-radius: 6px; padding: 2px 7px; white-space: nowrap; font-weight: 500; background: var(--raised-2); color: var(--muted); }
.st-active { background: rgba(90,211,122,.15); color: var(--green); } .st-coming-soon { background: rgba(77,171,247,.15); color: var(--blue); } .st-pending, .st-under-contract { background: var(--heat-soft); color: var(--heat); } .st-sold { background: rgba(167,139,250,.15); color: var(--violet); } .st-prospect { background: var(--raised-2); color: var(--muted); } .st-off-market { background: var(--raised-2); color: var(--muted); }
.due { font-family: var(--mono); font-size: 11.5px; color: var(--muted); } .due.late { color: var(--red); } .due.today { color: var(--heat); }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: color-mix(in srgb, var(--c, #3dd6b5) 22%, transparent); color: var(--c, #3dd6b5); font-family: var(--mono); font-weight: 500; flex: none; letter-spacing: .02em; }
.avatar.unassigned { background: var(--raised-2); color: var(--muted); border: 1px dashed var(--line-2); }
.banner { border: 1px solid var(--line-2); background: var(--raised); border-radius: 8px; padding: 9px 12px; margin-bottom: 12px; }
.banner.warn { border-color: rgba(245,181,71,.45); background: var(--heat-soft); } .banner.danger { border-color: rgba(255,107,107,.45); background: var(--red-soft); }

/* Cards, KPIs, charts */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); } .card-a { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card-b { padding: 12px 14px; }
.card-b.flush { padding: 0; } .card-b.flush .tablewrap { border: 0; border-radius: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 4px; }
.kpi b { font-family: var(--mono); font-size: 22px; font-weight: 500; letter-spacing: -.01em; } .kpi span { font-size: 11.5px; color: var(--muted); }
.kpi.heat b { color: var(--heat); } .kpi.acc b { color: var(--accent); } .kpi.red b { color: var(--red); }
.cols { display: grid; gap: 12px; } .cols.c2 { grid-template-columns: 1fr 1fr; } .cols.c3 { grid-template-columns: repeat(3, 1fr); } .cols.c21 { grid-template-columns: 2fr 1fr; } .cols.c12 { grid-template-columns: 1fr 2fr; }
.chart.bars { position: relative; } .chart.bars svg { width: 100%; height: 100%; display: block; } .chart.bars .xl { position: absolute; left: 0; right: 0; bottom: 0; display: flex; } .chart.bars .xl span { flex: 1; text-align: center; font-family: var(--mono); font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbars, .funnel { display: grid; gap: 6px; } .hb, .fstep { display: grid; grid-template-columns: 130px 1fr 72px; gap: 10px; align-items: center; }
.hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hbar, .fbar { height: 8px; background: var(--raised-2); border-radius: 99px; overflow: hidden; } .hbar i, .fbar i { display: block; height: 100%; border-radius: 99px; } .fbar i { background: linear-gradient(90deg, var(--accent), var(--heat)); }
.hv { text-align: right; font-size: 12px; } .hv small { color: var(--muted); }
.spark { width: 100%; display: block; }
.donut { display: flex; align-items: center; gap: 16px; } .donut svg { transform: rotate(-90deg); flex: none; } .dlegend { display: grid; gap: 4px; font-size: 12px; } .dlegend span { display: flex; align-items: center; gap: 7px; } .dlegend b { margin-left: auto; font-weight: 500; padding-left: 10px; }

/* Tables */
.tablewrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; background: var(--panel); }
table.grid { width: 100%; border-collapse: collapse; } table.grid th, table.grid td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
table.grid th { position: sticky; top: 0; background: var(--panel); z-index: 1; } table.grid th.sortable { cursor: pointer; user-select: none; } table.grid th.sortable:hover { color: var(--ink); } table.grid th.sorted { color: var(--accent); }
table.grid tbody tr:hover { background: var(--raised); } table.grid tr.selected { background: var(--accent-soft); } table.grid tr[data-href] { cursor: pointer; }
table.grid td.mono, table.grid th.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; } table.grid td.r, table.grid th.r { text-align: right; }
table.grid .sel { width: 32px; } table.grid td.wrap { white-space: normal; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 7px 10px; }
.bulkbar { display: flex; gap: 8px; align-items: center; background: var(--raised); border: 1px solid var(--accent); border-radius: 8px; padding: 6px 10px; margin-bottom: 10px; flex-wrap: wrap; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); white-space: normal; } .empty b { display: block; color: var(--ink); margin-bottom: 4px; } .empty p { margin: 0 auto 10px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; } .toolbar select.full, .card-a select.full, .pactions select.full { width: auto; min-width: 120px; } .toolbar input.full { width: 100%; } .toolbar .search-in { position: relative; flex: 1; min-width: 180px; max-width: 360px; } .toolbar .search-in input { padding-left: 30px; } .toolbar .search-in .ic { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.filters-side { display: grid; grid-template-columns: 236px 1fr; gap: 14px; align-items: start; } .fgroup { padding: 10px 0; border-bottom: 1px solid var(--line); } .fgroup:first-child { padding-top: 0; } .fgroup h4 { margin: 0 0 8px; }

/* Detail layouts */
.detail { display: grid; grid-template-columns: 1fr 340px; gap: 14px; align-items: start; } .detail > * { min-width: 0; }
.dhead { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; flex-wrap: wrap; } .dhead .dtitle { display: grid; gap: 4px; } .dhead .meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--muted); }
.dhead .dactions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 12.5px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.list { display: grid; gap: 0; } .list > * { padding: 9px 0; border-bottom: 1px solid var(--line); } .list > *:last-child { border-bottom: 0; }
.row { display: flex; gap: 10px; align-items: center; } .row .grow { flex: 1; min-width: 0; } .row .trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task { display: flex; gap: 10px; align-items: flex-start; } .task input[type=checkbox] { margin-top: 3px; width: 15px; height: 15px; } .task.done .ttl { text-decoration: line-through; color: var(--muted); } .task .tmeta { color: var(--muted); font-size: 11.5px; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; } .task .tacts { margin-left: auto; display: flex; gap: 4px; opacity: 0; } .task:hover .tacts { opacity: 1; }
.timeline { list-style: none; margin: 0; padding: 0; } .tl { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); } .tl:last-child { border-bottom: 0; }
.tl-i { width: 26px; height: 26px; border-radius: 50%; background: var(--raised); border: 1px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); } .tl.call .tl-i, .tl.text .tl-i, .tl.email .tl-i { color: var(--accent); } .tl.stage .tl-i { color: var(--heat); }
.tl-h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .tl-when { margin-left: auto; font-size: 11px; color: var(--muted); } .tl-body { margin: 4px 0 2px; color: var(--ink); white-space: pre-wrap; max-width: 70ch; } .tl-meta { font-size: 11px; margin-top: 2px; }
.milestones { display: grid; gap: 0; } .ms { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); } .ms:last-child { border: 0; } .ms i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; color: #04120f; cursor: pointer; } .ms.done i { background: var(--accent); border-color: var(--accent); } .ms.late i { border-color: var(--red); } .ms.done span { color: var(--muted); text-decoration: line-through; }

/* Kanban */
.kanban { display: flex; gap: 10px; overflow-x: auto; flex: 1; min-height: 0; padding: 0 var(--gutter) 14px; }
.kcol { flex: 1 0 236px; max-width: 320px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 0; }
.kcol.over { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.kcol-h { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 8px; } .kcol-h b { font-weight: 600; } .kcol-h .n { font-family: var(--mono); font-size: 11px; color: var(--muted); } .kcol-h .sum { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--heat); }
.kcol-b { padding: 8px; overflow-y: auto; display: grid; gap: 8px; align-content: start; flex: 1; }
.kcard { background: var(--raised); border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 10px; cursor: grab; display: grid; gap: 5px; } .kcard:active { cursor: grabbing; } .kcard.dragging { opacity: .4; } .kcard:hover { border-color: #465164; }
.kcard .kt { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .kcard .km { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 11.5px; } .kcard .km .v { font-family: var(--mono); color: var(--heat); } .kcard .km .age { margin-left: auto; font-family: var(--mono); }
.kcard .kn { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .kcard .kn.late { color: var(--red); }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.cal .dow { padding: 6px 8px; border-bottom: 1px solid var(--line); } .cal .day { min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 5px 6px; display: grid; align-content: start; gap: 3px; } .cal .day:nth-child(7n) { border-right: 0; } .cal .day.other { background: var(--bg); color: var(--muted); } .cal .day.today .dn { color: var(--heat); font-weight: 600; } .cal .dn { font-family: var(--mono); font-size: 11px; }
.cal .ev { font-size: 11px; padding: 2px 5px; border-radius: 4px; background: var(--raised-2); border-left: 2px solid var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; } .cal .ev.task { border-left-color: var(--muted); } .cal .ev.Showing { border-left-color: var(--blue); } .cal .ev.Closing { border-left-color: var(--heat); } .cal .ev.Open.house, .cal .ev.openhouse { border-left-color: var(--violet); } .cal .ev.Inspection { border-left-color: var(--orange); }
.cal .more { font-size: 11px; color: var(--muted); }
.week { display: grid; grid-template-columns: 54px repeat(7, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; background: var(--panel); max-height: calc(100vh - 230px); }
.week .hd { position: sticky; top: 0; background: var(--panel); z-index: 2; padding: 6px; border-bottom: 1px solid var(--line); text-align: center; } .week .hd.today b { color: var(--heat); }
.week .hr { font-family: var(--mono); font-size: 10.5px; color: var(--muted); padding: 2px 6px; height: 48px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.week .slot { height: 48px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); position: relative; } .week .slot .ev { position: absolute; left: 2px; right: 2px; z-index: 1; font-size: 11px; padding: 2px 5px; border-radius: 4px; background: var(--raised-2); border-left: 2px solid var(--accent); overflow: hidden; cursor: pointer; }
.agenda .item { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); } .agenda .item:last-child { border: 0; } .agenda .t { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Modal, toast, search, quick add */
.modal-bg { position: fixed; inset: 0; background: rgba(4,6,10,.66); z-index: 50; backdrop-filter: blur(3px); }
.modal { position: fixed; z-index: 51; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.5); display: flex; }
.modal.lg { width: min(820px, calc(100vw - 24px)); } .modal.sm { width: min(400px, calc(100vw - 24px)); } .modal.search { top: 12vh; transform: translate(-50%, 0); width: min(640px, calc(100vw - 24px)); }
.modal-f { display: flex; flex-direction: column; min-height: 0; width: 100%; } .modal header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); } .modal header h3 { font-size: 15px; font-weight: 600; } .modal header .iconbtn { margin-left: auto; }
.modal-b { padding: 14px 16px; overflow-y: auto; } .modal footer { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 16px; border-top: 1px solid var(--line); } .modal footer:empty { display: none; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 9px 14px; border-radius: 99px; font-weight: 500; z-index: 60; display: flex; gap: 10px; align-items: center; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; } .toast.warn { background: var(--heat); color: #1a1200; } .toast .btn { background: rgba(0,0,0,.12); border-color: transparent; color: inherit; }
.gs-r { margin-top: 10px; } .nrow { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 7px; color: var(--ink); } .nrow:hover { background: var(--raised); } .nrow span, .nrow > b { display: grid; } .nrow small { color: var(--muted); font-size: 11.5px; } .nrow .ic { color: var(--muted); flex: none; }
.qa { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .qa.one { grid-template-columns: 1fr; } .qa-b { border: 1px solid var(--line-2); background: var(--raised); border-radius: 8px; padding: 12px 8px; display: grid; justify-items: center; gap: 6px; cursor: pointer; } .qa-b:hover { border-color: var(--accent); } .qa-b.row { display: flex; justify-items: start; text-align: left; padding: 8px 10px; } .qa-b.row span { display: grid; } .qa-b small { color: var(--muted); }

/* Property mini map */
.minimap { height: 220px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.minimap .maplibregl-ctrl-attrib { font-size: 9px; }

/* Responsive */
@media (max-width: 1100px) { .cols.c3 { grid-template-columns: 1fr 1fr; } .detail { grid-template-columns: 1fr; } .filters-side { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; } nav { position: fixed; top: var(--top-h); left: 0; bottom: 0; width: 240px; z-index: 40; transform: translateX(-100%); transition: transform .18s; box-shadow: 0 0 40px rgba(0,0,0,.5); } body.nav-open nav { transform: none; }
  #nav-toggle { display: inline-flex; } .brand { width: auto; } .brand .badge { display: none; } .search span { display: none; } .search kbd { display: none; } .search { flex: 0; padding: 7px 9px; max-width: none; } .pr-link { display: none; }
  .cols.c2, .cols.c3, .cols.c21, .cols.c12 { grid-template-columns: 1fr; } .grid3, .grid4 { grid-template-columns: 1fr 1fr; } .kpis { grid-template-columns: 1fr 1fr; }
  .page { padding: 12px 12px calc(28px + env(safe-area-inset-bottom)); } .hb, .fstep { grid-template-columns: 92px 1fr 60px; } .kv { grid-template-columns: 104px 1fr; }
  .cal .day { min-height: 64px; } .cal .ev { display: none; } .cal .day .cnt { display: block; } .modal { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
}
@media (min-width: 861px) { .cal .day .cnt { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
