/* Aevilo on the web. Colors are the iPhone app's (Assets: Background, Surface, Raised, Line, Text…, Accent). */
:root {
  --bg: #f4f6f9; --surface: #ffffff; --raised: #ebeef3; --line: #e1e5ec;
  --text: #11151c; --text-2: #677084; --text-3: #9aa1b0;
  --accent: #2f66f0; --accent-soft: #e3ebfd; --good: #13875a; --bad: #d64545; --warn: #b7791f;
  --display: Outfit, Inter, sans-serif;
  --r-lg: 18px; --r-md: 12px; --r-sm: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1015; --surface: #171b22; --raised: #20252e; --line: #29303b;
    --text: #f2f4f7; --text-2: #8a93a3; --text-3: #5d6574;
    --accent: #5b8cff; --accent-soft: #1c2843; --good: #6fd3a0; --bad: #f07a72; --warn: #f5b85c;
  }
}
:root[data-theme="dark"] {
    --bg: #0d1015; --surface: #171b22; --raised: #20252e; --line: #29303b;
    --text: #f2f4f7; --text-2: #8a93a3; --text-3: #5d6574;
    --accent: #5b8cff; --accent-soft: #1c2843; --good: #6fd3a0; --bad: #f07a72; --warn: #f5b85c;
  }
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
       -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); } .bad { color: var(--bad); } .good { color: var(--good); }
.center { display: grid; place-items: center; min-height: 50vh; color: var(--text-2); }

/* ── Shell: a quiet rail on the left, the work on the right ── */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px;
        border-right: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 18px; }
.brand img { width: 28px; height: 28px; }
.brand span { font: 500 21px/1 var(--display); letter-spacing: -.01em; }
.find { display: flex; align-items: center; gap: 8px; margin: 0 4px 12px; padding: 8px 10px; border-radius: var(--r-md);
        background: var(--raised); color: var(--text-2); }
.find input { border: 0; background: none; outline: none; width: 100%; padding: 0; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r-md); color: var(--text-2); font-weight: 500; }
.nav a:hover { background: var(--raised); color: var(--text); }
.nav a.on { background: var(--accent-soft); color: var(--accent); }
.nav a .count { margin-left: auto; font-size: 12px; font-weight: 600; color: #fff; background: var(--accent); border-radius: 999px; padding: 0 7px; line-height: 19px; }
.theme { margin-top: auto; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border: 0; background: none; border-radius: var(--r-md); color: var(--text-2); font-weight: 500; text-align: left; }
.theme:hover { background: var(--raised); color: var(--text); }
.me { margin-top: 4px; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-md); }
.me .who { min-width: 0; font-size: 13px; } .me .who div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me button { background: none; border: 0; padding: 0; color: var(--text-2); font-size: 13px; }
.me button:hover { color: var(--text); }
main { padding: 36px 44px 80px; width: 100%; max-width: 1180px; }

/* ── Type ── */
.dateline { font: 500 15px/1 var(--display); color: var(--text-2); margin-bottom: 6px; }
h1 { font: 500 40px/1.05 var(--display); letter-spacing: -.02em; margin: 0 0 6px; }
.lede { color: var(--text-2); margin: 0 0 30px; max-width: 64ch; }
h2 { font: 600 17px/1.2 var(--display); margin: 34px 0 12px; display: flex; align-items: baseline; gap: 10px; }
h2 .n { font: 500 14px Inter, sans-serif; color: var(--text-3); }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); margin-bottom: 16px; font-size: 14px; }
.back:hover { color: var(--text); }

/* ── Lists ── */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
a.row:hover { background: var(--raised); }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .end { font-size: 13px; color: var(--text-2); white-space: nowrap; text-align: right; }
.row .end.late { color: var(--bad); font-weight: 500; }
.empty { padding: 26px 18px; color: var(--text-2); }
.glyph { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--raised); color: var(--text-2); }
.glyph.text { background: var(--accent-soft); color: var(--accent); }
.glyph.call { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.glyph.email { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 600 13px Inter, sans-serif;
          color: var(--accent); background: var(--accent-soft); }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.more { display: block; width: 100%; border: 0; border-top: 1px solid var(--line); background: none; padding: 11px 18px; text-align: left; color: var(--accent); font-weight: 500; }
.more:hover { background: var(--raised); }
.stage { display: inline-block; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--raised); color: var(--text-2); }
.stage.hot { background: var(--accent-soft); color: var(--accent); }
.stage.won { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }

/* ── Today: two columns under the contracts ── */
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.week .day { padding: 12px 18px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 56px 1fr; gap: 12px; }
.week .day:first-child { border-top: 0; }
.week .when { font: 500 13px/1.2 var(--display); color: var(--text-2); }
.week .when b { display: block; font-size: 22px; color: var(--text); font-weight: 500; }
.week .item { display: block; padding: 2px 0; }
.week .item .s { font-size: 13px; color: var(--text-2); }
.week a.item:hover .t { color: var(--accent); }

/* ── The contract timeline: the one loud thing ── */
.contracts { display: grid; gap: 14px; }
.contract { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 22px 20px; }
.contract:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.contract .head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.contract .addr { font: 500 21px/1.15 var(--display); letter-spacing: -.01em; }
.contract .client { color: var(--text-2); font-size: 14px; }
.contract .left { margin-left: auto; text-align: right; font: 500 15px/1 var(--display); color: var(--text-2); white-space: nowrap; }
.contract .left b { font-size: 30px; color: var(--accent); font-weight: 500; letter-spacing: -.02em; margin-right: 4px; }
.track { position: relative; height: 54px; margin: 0 6px; }
.track .rule { position: absolute; left: 0; right: 0; top: 9px; height: 3px; border-radius: 3px; background: var(--raised); }
.track .done { position: absolute; left: 0; top: 9px; height: 3px; border-radius: 3px; background: var(--accent); }
.track .mark { position: absolute; top: 3px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; width: 92px; }
.track .dot { width: 15px; height: 15px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); }
.track .mark.past .dot { background: var(--accent); border-color: var(--accent); }
.track .mark.soon .dot { border-color: var(--warn); }
.track .mark.close .dot { width: 19px; height: 19px; margin-top: -2px; border-color: var(--accent); }
.track .lbl { margin-top: 6px; font-size: 12px; line-height: 1.25; text-align: center; color: var(--text-2); }
.track .lbl b { display: block; color: var(--text); font-weight: 500; }
.track .now { position: absolute; top: -6px; bottom: 18px; width: 2px; background: var(--text); border-radius: 2px; transform: translateX(-1px); }
.track .now span { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; white-space: nowrap; }

/* ── Deals board ── */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.col h3 { font: 600 15px/1 var(--display); margin: 0 0 10px 4px; display: flex; gap: 8px; }
.col h3 .n { color: var(--text-3); font-weight: 500; }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 10px; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card .addr { font-weight: 600; }
.card .s { font-size: 13px; color: var(--text-2); }
.card .foot { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; color: var(--text-2); }
.card .price { font: 500 16px var(--display); color: var(--text); }
.tabs { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--raised); margin-bottom: 22px; }
.tabs button { border: 0; background: none; padding: 6px 16px; border-radius: 999px; color: var(--text-2); font-weight: 500; }
.tabs button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.tabs a { padding: 6px 16px; border-radius: 999px; color: var(--text-2); font-weight: 500; }
.tabs a.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.title-row .actions .tabs { margin-bottom: 0; }

/* ── Person and deal pages ── */
.hero { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.hero h1 { margin: 0; }
.hero .sub { color: var(--text-2); margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions { display: flex; gap: 8px; margin-left: auto; }
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px;
       border-radius: 999px; font-weight: 500; font-size: 14px; }
.btn:hover { background: var(--raised); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.facts { display: grid; grid-template-columns: 130px 1fr; gap: 10px 16px; padding: 18px; margin: 0; }
.facts dt { color: var(--text-2); } .facts dd { margin: 0; overflow-wrap: anywhere; }
.facts a { color: var(--accent); }
.tags span { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--raised); color: var(--text-2); margin: 0 4px 4px 0; }
.feed .row { align-items: flex-start; }
.feed .t, .feed .s { white-space: normal; }
.money { font: 500 34px/1 var(--display); letter-spacing: -.02em; }
.check { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 700;
         border: 2px solid var(--line); color: transparent; }
.check.ok { background: var(--good); border-color: var(--good); color: #fff; }
.check.miss { border-color: var(--bad); color: var(--bad); }
.check.na { border-style: dashed; }
.progress { height: 6px; border-radius: 6px; background: var(--raised); overflow: hidden; margin: 6px 0 0; }
.progress i { display: block; height: 100%; background: var(--good); }

/* ── Sign in ── */
.signin { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.signin .side { background: linear-gradient(160deg, #081226, #0e1d3d); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.signin .side .brand { color: #fff; padding: 0; }
.signin .side p { font: 500 40px/1.1 var(--display); letter-spacing: -.02em; max-width: 14ch; margin: 0; }
.signin form { align-self: center; justify-self: center; width: min(360px, 88%); display: grid; gap: 12px; }
.signin form h1 { font-size: 30px; margin-bottom: 8px; }
.signin input { padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.signin .wide { justify-content: center; padding: 12px; border-radius: var(--r-md); }
.signin .or { text-align: center; color: var(--text-3); font-size: 13px; }

/* ── Team chat ── */
.chat { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; height: calc(100vh - 170px); min-height: 420px; }
.threads { overflow: auto; }
.threads .row.on { background: var(--accent-soft); }
.pill { font-size: 12px; font-weight: 600; color: #fff; background: var(--accent); border-radius: 999px; padding: 0 7px; line-height: 19px; }
.pane { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.msgs { flex: 1; overflow: auto; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 70%; } .msg.me { align-self: flex-end; text-align: right; }
.msg .who { font-size: 12px; color: var(--text-2); font-weight: 600; margin: 0 0 3px 4px; }
.bubble { display: inline-block; text-align: left; padding: 9px 13px; border-radius: 18px; background: var(--raised); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me .bubble { background: var(--accent); color: #fff; }
.bubble a { font-weight: 600; color: var(--accent); }
.msg.me .bubble a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.msg .at { font-size: 11px; color: var(--text-3); margin: 3px 4px 0; }
.composer { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--line); position: relative; }
.composer textarea { flex: 1; resize: none; padding: 10px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg); min-height: 42px; max-height: 140px; }
.picker { position: absolute; bottom: 66px; left: 12px; width: min(380px, 90%); max-height: 320px; overflow: auto; background: var(--surface);
          border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .35); }
.picker .row { cursor: pointer; } .picker .row.sel { background: var(--accent-soft); }
.starters { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }


/* ── Toolbars, filters, chips ── */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .tabs { margin-bottom: 0; }
.searchbox { flex: 1 1 280px; padding: 10px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.select { display: inline-flex; align-items: center; gap: 8px; padding: 0 4px 0 12px; border-radius: var(--r-md); border: 1px solid var(--line);
          background: var(--surface); font-size: 14px; color: var(--text-2); }
.select select { border: 0; background: none; padding: 9px 6px; color: var(--text); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.chips button { border: 1px solid var(--line); background: var(--surface); padding: 5px 13px; border-radius: 999px; font-size: 14px; color: var(--text-2); }
.chips button:hover { color: var(--text); }
.chips button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tagchip { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--raised); color: var(--text-2); }

/* People table */
.people .row.head { padding: 9px 18px; font-size: 12px; font-weight: 600; color: var(--text-3); background: var(--raised); }
.people .row.head .grow { padding-left: 50px; }
.people .c-stage { width: 170px; flex: none; }
.people .c-phone { width: 140px; flex: none; }
.people .c-last { width: 110px; flex: none; text-align: right; }
.people .c-last.late { color: var(--warn); }
@media (max-width: 900px) { .people .c-phone, .people .row.head .c-phone { display: none; } }
@media (max-width: 640px) { .people .c-stage, .people .row.head { display: none; } }

/* Follow-up rows with a check */
.row.task { gap: 12px; transition: opacity .25s; }
.row.task.gone { opacity: 0; }
.row.task a.grow:hover .t { color: var(--accent); }
.tick { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 2px solid var(--line); background: none; color: transparent;
        font-size: 12px; font-weight: 700; padding: 0; display: grid; place-items: center; }
.tick:hover:not(:disabled) { border-color: var(--good); color: var(--good); }
.tick.on { background: var(--good); border-color: var(--good); color: #fff; }
.tick:disabled:not(.on) { border-style: dashed; cursor: default; }
.glyph.sm { width: 28px; height: 28px; border-radius: 8px; }
.glyph.sm svg.i { width: 15px; height: 15px; }
.glyph.note { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.glyph.offer { background: var(--accent-soft); color: var(--accent); }
.subhead { padding: 8px 18px; font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--raised); border-top: 1px solid var(--line); }

/* Contact header */
.stage-pick { font: 500 13px Inter, sans-serif; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--raised); color: var(--text); }
.stage-pick.hot { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.stage-pick.won { color: var(--good); }

/* Composer */
.composer-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; display: grid; gap: 10px; }
.composer-card textarea { resize: vertical; min-height: 64px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--raised); width: fit-content; }
.seg button { border: 0; background: none; padding: 5px 13px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.row-end { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.extra { display: flex; gap: 8px; margin-right: auto; }
.extra[hidden] { display: none; }
.extra select, .extra input { padding: 7px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); }

/* Timeline */
.feed2 { display: grid; gap: 18px; }
.tl-day { display: grid; gap: 8px; }
.tl-date { font: 600 13px/1 var(--display); color: var(--text-2); padding: 4px 2px; position: sticky; top: 0; background: var(--bg); z-index: 1; }
.tl { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.tl .grow { flex: 1; min-width: 0; }
.tl .t { font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.tl .dir { font-size: 12px; font-weight: 500; color: var(--text-3); }
.tl .b { color: var(--text-2); margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tl .b.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.tl .meta { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.tl .link { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--accent); }
.tl.card-note { background: color-mix(in srgb, var(--warn) 7%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 25%, var(--line)); }
.tl.card-note .b { color: var(--text); }
.tl.text { background: none; border: 0; padding: 0; flex-direction: column; gap: 3px; }
.tl.text .bubble { max-width: 78%; padding: 9px 13px; border-radius: 18px; background: var(--raised); white-space: pre-wrap; overflow-wrap: anywhere; }
.tl.text.out { align-items: flex-end; }
.tl.text.out .bubble { background: var(--accent); color: #fff; }
.tl.text .meta { padding: 0 6px; }

/* Deal cards */
.card-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.side { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.side.buyer { background: var(--accent-soft); color: var(--accent); }
.side.seller { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }

.hint { font-size: 13px; color: var(--warn); }
.hint[hidden] { display: none; }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.pane-head .t { font: 600 16px var(--display); }
.msg .at.bad { color: var(--bad); }

/* Deal page: updates to approve, paperwork actions, file drop, editor */
.updates { display: grid; gap: 12px; margin-bottom: 18px; }
.update { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: var(--r-lg); padding: 16px 18px; }
.update .t { font-weight: 600; }
.changes { display: grid; gap: 6px; margin-bottom: 12px; }
.change { display: grid; grid-template-columns: 22px 180px auto auto auto; gap: 10px; align-items: center; justify-content: start; }
.change .lbl { color: var(--text-2); } .change .was { color: var(--text-3); text-decoration: line-through; } .change .arrow { color: var(--text-3); font-size: 13px; }
.row.paper .row-actions { display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.row.paper:hover .row-actions, .row.paper:focus-within .row-actions { opacity: 1; }
.mini { border: 1px solid var(--line); background: var(--surface); padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.mini:hover { color: var(--text); background: var(--raised); }
.mini.ghost { border-color: transparent; background: none; color: var(--text-3); }
.mini.ghost:hover { color: var(--bad); background: none; }
h2 select { font: 500 13px Inter, sans-serif; padding: 4px 8px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text-2); }
.drop { display: flex; align-items: center; gap: 12px; padding: 18px; border: 2px dashed var(--line); border-radius: var(--r-lg); color: var(--text-2); cursor: pointer; }
.drop b { color: var(--text); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.editor { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 12px; }
.editor .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 4px; font-size: 13px; color: var(--text-2); }
.field input, .field select, .field textarea { padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 15px; }
@media (max-width: 640px) { .editor .grid { grid-template-columns: 1fr; } .change { grid-template-columns: 22px 1fr; } .row.paper .row-actions { opacity: 1; } }

/* Deal: updates, paperwork actions, files, editor */
.updates { display: grid; gap: 12px; margin-bottom: 18px; }
.update { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: var(--r-lg); padding: 16px 18px; }
.update .t { font-weight: 600; }
.changes { display: grid; gap: 6px; margin-bottom: 12px; }
.change { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--r-sm); padding: 8px 12px; }
.change .lbl { min-width: 170px; color: var(--text-2); }
.change .was { color: var(--text-3); text-decoration: line-through; }
.change .arrow { color: var(--text-3); font-size: 13px; }
.row.paper .row-actions { display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.row.paper:hover .row-actions, .row.paper:focus-within .row-actions { opacity: 1; }
.mini { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.mini:hover { color: var(--text); background: var(--raised); }
.mini.ghost { border-color: transparent; background: none; }
.drop { display: flex; align-items: center; gap: 12px; padding: 18px; border: 2px dashed var(--line); border-radius: var(--r-lg); color: var(--text-2); cursor: pointer; }
.drop b { color: var(--text); }
.drop.over, .drop:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
h2 select { font: 500 13px Inter, sans-serif; padding: 4px 8px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text-2); }
.editor { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 12px; }
.editor .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.field { display: grid; gap: 4px; font-size: 13px; color: var(--text-2); }
.field input, .field select, .field textarea { font-size: 15px; color: var(--text); padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); }
@media (hover: none) { .row.paper .row-actions { opacity: 1; } }

/* Contacts: header, selection, bulk changes */
.title-row { display: flex; align-items: center; gap: 12px; }
.title-row .actions { margin-left: auto; }
button.row.pick { width: 100%; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; color: inherit; }
button.row.pick.on { background: var(--accent-soft); }
.row.pick input { width: 18px; height: 18px; accent-color: var(--accent); pointer-events: none; }
.bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; margin-bottom: 12px; border-radius: var(--r-md);
        background: var(--accent-soft); }
.bulk select { padding: 4px 8px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); }

/* Dialogs */
.dlg { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; background: var(--surface); color: var(--text); width: min(520px, 94vw);
       box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); }
.dlg.wide { width: min(720px, 94vw); }
.dlg::backdrop { background: rgba(8, 12, 20, .55); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dlg-head h3 { margin: 0; font: 600 20px var(--display); }
.methods { display: grid; gap: 6px; }
.method { display: flex; gap: 6px; align-items: center; }
.method input, .method select { padding: 7px 9px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); font-size: 14px; }
.method input:nth-child(3) { flex: 1; min-width: 0; }

/* Reports */
.bar-row .yr { font: 500 22px var(--display); width: 64px; }
.bar { height: 10px; border-radius: 6px; background: var(--raised); overflow: hidden; margin-bottom: 4px; }
.bar.thin { height: 6px; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.row.task.paper .row-actions { margin-left: 4px; }

/* Net sheet */
.ns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
.ns-form { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.ns-form .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px; position: sticky; top: 20px; }
.sheet-head { display: flex; justify-content: space-between; gap: 12px; color: var(--text-2); font-size: 13px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sheet-head b { color: var(--text); font: 600 18px var(--display); }
.sheet .big { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; }
.sheet .big span { color: var(--text-2); }
.sheet .big strong { font: 500 34px var(--display); color: var(--accent); letter-spacing: -.02em; }
.sheet .sub { color: var(--text-2); font-size: 13px; }
.sheet h4 { margin: 18px 0 6px; font: 600 14px var(--display); }
.sheet .ln { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sheet .ln em { font-style: normal; color: var(--text-3); font-size: 12px; margin-left: 8px; }
.sheet .ln b { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sheet .ln.tot { font-weight: 600; border-bottom: 0; }
.sheet .ln.big2 { font-size: 17px; border-top: 2px solid var(--text); margin-top: 6px; padding-top: 8px; }
.sheet .fine { font-size: 11px; color: var(--text-3); margin-top: 18px; }
@media (max-width: 900px) { .ns { grid-template-columns: 1fr; } .sheet { position: static; } }
@media print {
  body { background: #fff; color: #000; }
  .rail, .back, .title-row, .ns-form, .toast { display: none !important; }
  .shell, .ns { display: block; } main { padding: 0; max-width: none; }
  .sheet { border: 0; padding: 0; position: static; background: #fff; color: #000; }
  .sheet .big strong { color: #000; }
}

/* Ask Aevilo */
.ask-pane { height: calc(100vh - 230px); min-height: 420px; }
.ask-log { flex: 1; overflow: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.ask-reply { max-width: 86%; }
.ask-text { white-space: pre-wrap; line-height: 1.6; }
.ask-start { display: grid; gap: 8px; justify-items: start; color: var(--text-2); }
.ask-start p { margin: 0 0 4px; }
.proposal { margin-top: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); display: grid; gap: 6px; }
.proposal .t { font-weight: 600; }
.proposal .s { font-size: 13px; color: var(--text-2); }
.proposal .s a { color: var(--accent); }
.proposal textarea, .proposal input { width: 100%; padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); }

/* Deals board: drag between columns */
.col { border-radius: var(--r-lg); padding: 6px; margin: -6px; transition: background .15s; }
.col.over { background: var(--accent-soft); outline: 2px dashed var(--accent); }
.card[draggable="true"] { cursor: grab; }
.card.dragging { opacity: .45; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px;
         border-radius: 999px; font-weight: 500; font-size: 14px; z-index: 50; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .4); }
.toast.bad { background: var(--bad); color: #fff; }

/* ── Quick search ── */
button.find { border: 0; text-align: left; font-size: 14px; }
button.find:hover { color: var(--text); }
kbd { font: 500 11px Inter, sans-serif; color: var(--text-3); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; background: var(--surface); }
.palette { padding: 0; width: min(600px, 94vw); margin-top: 12vh; overflow: hidden; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.pal-in input { flex: 1; border: 0; outline: none; background: none; font-size: 17px; color: var(--text); }
.pal-list { max-height: min(420px, 60vh); overflow: auto; padding: 6px; }
.pal-head { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 10px 12px 4px; }
.pal-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--r-md); cursor: pointer; }
.pal-row .glyph { width: 30px; height: 30px; border-radius: 8px; }
.pal-row .t { font-weight: 500; } .pal-row .s { font-size: 13px; color: var(--text-2); }
.pal-row.sel { background: var(--accent-soft); } .pal-row.sel .glyph { background: var(--surface); color: var(--accent); }
.pal-list .empty { padding: 18px 12px; color: var(--text-2); }

/* ── Live alerts inside the page ── */
.toast.live { border: 0; cursor: pointer; max-width: min(520px, 92vw); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Calendar ── */
:root { --k-deadline: var(--warn); --k-closing: var(--good); --k-showing: var(--accent); --k-open: #8a5cf5; --k-task: var(--text-2); }
.k-deadline { --k: var(--k-deadline); } .k-closing { --k: var(--k-closing); } .k-showing { --k: var(--k-showing); }
.k-open { --k: var(--k-open); } .k-task { --k: var(--k-task); }
.cal-keys .key { display: inline-flex; align-items: center; gap: 7px; }
.chips.cal-keys button.key.on { background: var(--surface); color: var(--text); border-color: var(--line); }
.cal-keys .key:not(.on) { opacity: .5; } .cal-keys .key:not(.on) .dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--k); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--k); display: inline-block; flex: none; }
.cal { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 24px; align-items: start; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.cal-dow { padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--text-3); border-bottom: 1px solid var(--line); }
.cal-day { display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-height: 104px; padding: 6px; border: 0; border-top: 1px solid var(--line);
           border-left: 1px solid var(--line); background: none; text-align: left; min-width: 0; }
.cal-day:nth-child(7n + 1) { border-left: 0; }
.cal-dow + .cal-day, .cal-day:nth-child(-n + 14) { border-top: 0; }
.cal-day:hover { background: var(--bg); }
.cal-day.out .num { color: var(--text-3); } .cal-day.out .evs { opacity: .55; }
.cal-day .num { font-size: 13px; font-weight: 500; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.now .num { background: var(--accent); color: #fff; }
.cal-day.pick { box-shadow: inset 0 0 0 2px var(--accent); }
.evs { display: grid; gap: 2px; }
.ev { font-size: 12px; line-height: 1.35; padding: 1px 6px; border-radius: 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
      background: color-mix(in srgb, var(--k) 13%, transparent); color: var(--text); border-left: 2px solid var(--k); }
.ev i { font-style: normal; color: var(--text-2); margin-right: 4px; }
.ev.done { opacity: .5; text-decoration: line-through; }
.ev.more { background: none; border: 0; color: var(--text-2); padding-left: 6px; }
.dots { display: none; gap: 3px; flex-wrap: wrap; padding-left: 4px; }
.cal-side { position: sticky; top: 24px; }
.cal-side h2 { margin-top: 0; }
.cal-side .row .kbar { width: 4px; align-self: stretch; border-radius: 2px; background: var(--k); }
.cal-side .row.done .t { text-decoration: line-through; color: var(--text-2); }
.cal-side a.row:hover { background: var(--bg); }
@media (max-width: 1280px) { .cal { grid-template-columns: 1fr; } .cal-side { position: static; } }
@media (max-width: 640px) {
  .cal-day { min-height: 58px; align-items: center; } .evs { display: none; } .dots { display: flex; justify-content: center; padding: 0; }
}

/* ── Plans and templates ── */
.form { display: grid; gap: 12px; }
.form > label, .grid2 > label { display: grid; gap: 4px; font-size: 13px; color: var(--text-2); }
.form input:not([type=checkbox]), .form select, .form textarea { font: inherit; font-size: 15px; color: var(--text); padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); width: 100%; }
.form h4 { margin: 8px 0 0; font: 600 16px var(--display); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkline { display: flex !important; align-items: center; gap: 8px; color: var(--text) !important; font-size: 14px !important; }
.danger-text { color: var(--bad); }
.list > button.row { width: 100%; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.list > button.row:first-child { border-top: 0; }
.list > button.row:hover { background: var(--bg); }
.row.add { width: 100%; border: 0; background: none; text-align: left; color: var(--accent); }
.row.add .glyph { color: var(--accent); }
.steps { display: grid; gap: 10px; }
.step-card { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.step-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.step-top .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); font-size: 12px; font-weight: 600; }
.form .step-top select, .form .step-top input { width: auto; padding: 6px 8px; font-size: 14px; }
.form .step-top input[type=number] { width: 72px; }
.clamp1 { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.plan-preview .row.done .t { text-decoration: line-through; color: var(--text-2); }
.tpl-pick { margin-right: auto; padding: 7px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.tpl-slot { margin-right: auto; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.map-grid label { display: grid; gap: 3px; font-size: 13px; font-weight: 500; color: var(--text); }
.map-grid .faint { font-weight: 400; font-size: 12px; }
.row.good .t { color: var(--good); font-weight: 600; }

/* ── Homes ── */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid3 > label { display: grid; gap: 4px; font-size: 13px; color: var(--text-2); }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.home-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; color: inherit; text-decoration: none; display: flex; flex-direction: column; }
.home-card:hover { border-color: var(--accent); }
.home-photo { position: relative; aspect-ratio: 16 / 10; background: var(--raised); display: grid; place-items: center; color: var(--text-3); }
.home-photo img { width: 100%; height: 100%; object-fit: cover; }
.home-photo .pill { position: absolute; left: 10px; top: 10px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface); color: var(--text); }
.home-photo .pill.active { background: var(--good); color: #fff; } .home-photo .pill.pending { background: var(--warn); color: #fff; }
.home-body { padding: 12px 14px 14px; display: grid; gap: 2px; }
.home-body .price { font: 600 20px var(--display); }
.home-body .s { color: var(--text-2); font-size: 13px; }
.photo-strip { display: flex; gap: 10px; overflow-x: auto; margin: 4px 0 18px; }
.photo-strip img { height: 160px; border-radius: var(--r-md); }
.pick { position: relative; }
.pick-menu { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); padding: 4px; max-height: 240px; overflow: auto; }
.pick-row { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: var(--r-sm); text-align: left; color: var(--text); font: inherit; }
.pick-row:hover { background: var(--accent-soft); }
@media (max-width: 640px) { .grid3 { grid-template-columns: 1fr 1fr; } }

/* ── Statement check ── */
.stmt { margin-top: 14px; }
.stmt label.btn { position: relative; overflow: hidden; cursor: pointer; }
.stmt label.btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dot-status { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--text-3); }
.dot-status.ok { background: var(--good); } .dot-status.diff, .dot-status.missing { background: var(--bad); } .dot-status.blank { background: var(--warn); }
.fine-note { color: var(--text-2); font-size: 13px; margin: 8px 2px 0; }

/* ── Newsletter and booking ── */
textarea.issue { font: 15px/1.6 Inter, sans-serif; min-height: 420px; }
.hours { display: grid; gap: 6px; }
.hours-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hours-row .checkline { width: 80px; }
.hours-row input[type=time] { padding: 6px 8px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
a.mini { text-decoration: none; display: inline-flex; align-items: center; }

/* ── Narrow screens ── */
@media (max-width: 900px) {
  .split, .board { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 8px 0 4px; } .find, .me { display: none; }
  .theme { margin: 0 0 0 auto; padding: 7px 10px; } .theme .lbl { display: none; }
  .nav { display: flex; gap: 2px; } .nav a { padding: 7px 10px; } .nav a span.lbl { display: none; }
  main { padding: 22px 16px 60px; }
  h1 { font-size: 32px; }
  .hero { flex-wrap: wrap; } .actions { margin-left: 0; width: 100%; }
  .chat { grid-template-columns: 1fr; height: auto; } .msgs { max-height: 60vh; }
  .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 10px; }
  .contract .head { flex-wrap: wrap; } .contract .left { margin-left: 0; width: 100%; text-align: left; }
  .track .mark { width: 70px; } .track .lbl { font-size: 11px; }
  .signin { grid-template-columns: 1fr; } .signin .side { padding: 28px; } .signin .side p { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ── Ask box on Today (type or tap a question; Ask Aevilo answers it) ── */
.askbox { margin: -8px 0 8px; }
.askfield { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border: 1px solid var(--line); border-radius: var(--r-lg);
            background: var(--surface); color: var(--accent); max-width: 720px; }
.askfield:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.askfield input { flex: 1; border: 0; outline: none; background: none; padding: 6px 0; color: var(--text); }
.askbox .chips { margin: 10px 0 0; }

/* ── Appointments (Today) and the week calendar ── */
h2 .stepper { margin-left: auto; display: inline-flex; gap: 4px; font: 500 12px Inter, sans-serif; }
.stepper .mini { min-width: 30px; text-align: center; }
.stepper .mini.on { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); }
.row.appt { gap: 12px; }
.appt-time { width: 64px; flex: none; font-size: 13px; font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; }
.appt-bar { width: 4px; align-self: stretch; border-radius: 4px; flex: none; background: var(--text-3); }
.appt-bar.showing { background: var(--accent); }
.appt-bar.open_house { background: var(--good); }
.appt-bar.deadline { background: var(--warn); }
.appt-bar.task { background: var(--text-3); }
.empty-act { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.empty-act b { color: var(--text); font-weight: 600; }
.empty-act .s { font-size: 13px; }
.cal-range { font: 500 16px var(--display); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 12px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .appt-bar { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.weekgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg);
        background: var(--surface); overflow: hidden; min-height: 420px; }
.wday { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.wday:first-child { border-left: 0; }
.wday.past { background: color-mix(in srgb, var(--raised) 45%, transparent); }
.whead { display: flex; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.whead b { font: 500 18px/1 var(--display); color: var(--text); }
.wday.today .whead b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 15px; }
.wday.today .whead span { color: var(--accent); font-weight: 600; }
.witems { padding: 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; align-content: start; }
.wnone { color: var(--text-3); font-size: 13px; padding: 4px; }
.wcard { display: block; min-width: 0; overflow: hidden; padding: 7px 9px; border-radius: 9px; border-left: 3px solid var(--text-3); background: var(--raised); font-size: 12.5px; line-height: 1.35; }
a.wcard:hover { filter: brightness(.97); }
.wcard.showing { border-color: var(--accent); background: var(--accent-soft); }
.wcard.open_house { border-color: var(--good); background: color-mix(in srgb, var(--good) 13%, transparent); }
.wcard.deadline { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.wcard .wt { font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.wcard .wn { font-weight: 500; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wcard .ws { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Reports: last-7-days cards ── */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; display: grid; gap: 6px; align-content: start; }
.kpi .s { font-size: 13px; color: var(--text-2); }
.kpi-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.kpi-n { font: 500 34px/1 var(--display); font-variant-numeric: tabular-nums; }
.kpi-d { font-size: 12.5px; font-weight: 500; }
.kpi-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 74px; margin-top: 6px; }
.kb { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.kb i { display: block; width: 100%; max-width: 22px; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--accent) 45%, transparent); }
.kb i.zero { background: var(--raised); }
.kb.last i:not(.zero) { background: var(--accent); }
.kb span { font-size: 11px; color: var(--text-3); line-height: 1; }

/* ── Email draft from Ask Aevilo ── */
.proposal.mail { gap: 0; padding: 0; overflow: hidden; background: var(--surface); }
.proposal.mail > .s:first-child { padding: 10px 14px 6px; }
.mail-line { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.mail-line > span:first-child { width: 56px; color: var(--text-3); font-size: 13px; flex: none; }
.mail-line .to { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mail-line .to a { color: var(--accent); font-weight: 500; }
.proposal.mail .mail-line input { border: 0; padding: 0; background: none; outline: none; font-weight: 500; }
.proposal.mail textarea { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 14px; resize: vertical; line-height: 1.55; outline: none; }
.proposal.mail .row-end { padding: 10px 14px; border-top: 1px solid var(--line); background: var(--bg); }
.avatar.xs { width: 22px; height: 22px; font-size: 10px; }
.btn.ghost { border-color: transparent; background: none; color: var(--text-2); }
.btn.ghost:hover { color: var(--text); background: var(--raised); }

@media (max-width: 900px) {
  .kpis { grid-template-columns: 1fr; }
  .weekgrid { grid-template-columns: 1fr; min-height: 0; }
  .wday { border-left: 0; border-top: 1px solid var(--line); }
  .wday:first-child { border-top: 0; }
}
