/* N&D Insurance — staff system. Navy + champagne gold, high-contrast serif headings (from the logo). */
:root {
  --navy: #0B1F33; --navy-2: #12304d; --navy-3: #1d4067; --brand: #0B1F33; --brand-2: #12304d; --side: #0B1F33;
  --soft: var(--soft); --hover: var(--hover); --soft-gold: var(--soft-gold); --input-line: #DCD3C4; --top: rgba(244,240,232,.92);
  --gold: #A88458; --gold-2: #C9A774; --gold-lt: #EADBC0; --gold-grad: linear-gradient(135deg, #DCC097 0%, #8A6640 55%, #B08C62 100%);
  --cream: #F4F0E8; --paper: #FFFFFF; --ink: #142235; --muted: #5E6B79; --faint: #8D97A3; --line: #E6DFD2; --line-2: #EFEAE1;
  --good: #2E7D4F; --good-bg: #E7F3EC; --warn: #9A6412; --warn-bg: #FBF1DE; --bad: #A8352A; --bad-bg: #F9E6E3;
  --s1: #2B5A93; --s2: #B5772A; /* validated chart series pair */
  --serif: 'Playfair Display', 'Didot', 'Bodoni 72', Georgia, serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --r: 10px; --shadow: 0 1px 2px rgba(11,31,51,.06), 0 4px 16px rgba(11,31,51,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 var(--sans); color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .2px; margin: 0; color: var(--navy); }
h1 { font-size: 26px; } h2 { font-size: 19px; } h3 { font-size: 15px; font-family: var(--sans); font-weight: 600; }
a { color: var(--navy-3); }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 10px; align-items: center; } .wrap { flex-wrap: wrap; } .grow { flex: 1; } .right { margin-left: auto; }
.eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

/* ───── Login ───── */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 20% -10%, #fff 0%, var(--cream) 60%); }
.login-card { width: 100%; max-width: 400px; background: var(--paper); border-radius: 16px; padding: 36px 34px 30px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.login-card img { display: block; width: 210px; margin: 0 auto 6px; }
.login-card .rule { height: 1px; background: var(--gold-grad); margin: 18px 0 22px; opacity: .7; }
.login-card h1 { font-size: 21px; text-align: center; margin-bottom: 4px; }
.login-card p.sub { text-align: center; margin: 0 0 20px; color: var(--muted); }
.login-card .foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--faint); }

/* ───── Shell ───── */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100%; }
.side { background: var(--side); color: #DCE3EA; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side .brand { padding: 22px 22px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.side .brand img { width: 150px; display: block; }
.side .brand .role { margin-top: 8px; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-2); }
.nav { padding: 12px 10px; overflow-y: auto; flex: 1; }
.nav .group { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: #7f93a8; padding: 14px 12px 6px; }
.nav button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; background: none; color: #C9D3DD; border-radius: 8px; cursor: pointer; text-align: left; }
.nav button:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav button.on { background: rgba(201,167,116,.14); color: #fff; box-shadow: inset 2px 0 0 var(--gold-2); }
.nav svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav .badge { margin-left: auto; background: var(--gold-2); color: var(--navy); font-size: 11px; font-weight: 700; border-radius: 99px; padding: 0 7px; line-height: 18px; }
.side .me { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.07); font-size: 13px; }
.side .me b { color: #fff; font-weight: 600; display: block; }
.side .me button { background: none; border: 0; color: #9fb0c1; padding: 0; cursor: pointer; font-size: 12.5px; margin-right: 12px; }
.side .me button:hover { color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 5; background: var(--top); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  padding: 14px 28px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.top h1 { font-size: 23px; }
.content { padding: 24px 28px 60px; max-width: 1320px; width: 100%; }

.clock { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 99px; padding: 4px 4px 4px 14px; }
.clock .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.clock.on .dot { background: var(--good); box-shadow: 0 0 0 4px rgba(46,125,79,.15); }
.clock .txt { font-size: 13px; font-weight: 500; }
.quick { display: flex; gap: 6px; }

/* ───── Controls ───── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  padding: 7px 13px; border-radius: 8px; cursor: pointer; font-weight: 500; white-space: nowrap; line-height: 1.3; }
.btn:hover { border-color: #cfc5b3; }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.gold { background: var(--gold-grad); border: 0; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.15); padding: 8px 15px; }
.btn.pill { border-radius: 99px; }
.btn.ghost { background: none; border-color: transparent; color: var(--navy-3); padding: 5px 8px; }
.btn.ghost:hover { background: var(--line-2); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btn:disabled { opacity: .55; cursor: default; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 500; }
.seg button.on { background: var(--paper); color: var(--navy); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
label.f > small { display: block; color: var(--muted); margin-top: 4px; font-size: 12px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=month], input[type=tel], input[type=search], select, textarea {
  width: 100%; border: 1px solid var(--input-line); background: var(--paper); border-radius: 8px; padding: 8px 11px; outline: none; transition: border .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(168,132,88,.18); }
textarea { min-height: 76px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; margin-bottom: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }

/* ───── Cards, tiles ───── */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.card > .hd { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card > .bd { padding: 16px 18px; }
.card > .bd.flush { padding: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }
.cols > *, .stack > * { min-width: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px 14px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.tile::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--gold-grad); opacity: .8; }
.tile .lbl { font-size: 12px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tile .lbl svg { width: 15px; height: 15px; color: var(--gold); }
.tile .big { font-family: var(--serif); font-size: 32px; font-weight: 600; color: var(--navy); line-height: 1.15; margin-top: 4px; font-variant-numeric: lining-nums tabular-nums; }
.tile .big small { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 500; }
.tile .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tile.click { cursor: pointer; } .tile.click:hover { border-color: #d6c9b2; }
.goal { margin-top: 10px; height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.goal i { display: block; height: 100%; background: var(--navy-3); border-radius: 99px; }
.goal.done i { background: var(--good); }
.goaltxt { font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.split { display: flex; height: 6px; border-radius: 99px; overflow: hidden; margin-top: 10px; gap: 2px; background: var(--line-2); }
.split i { display: block; height: 100%; }
.split .ok { background: var(--s1); } .split .no { background: var(--s2); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend span { white-space: nowrap; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* ───── Tables & lists ───── */
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap; }
table.t td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--hover); }
table.t td.n, table.t th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.t tfoot td { font-weight: 600; background: var(--soft); border-top: 1px solid var(--line); }
.tablewrap { overflow-x: auto; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.list li.click { cursor: pointer; } .list li.click:hover { background: var(--hover); }
.list .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--line-2); color: var(--navy-3); }
.list .ico svg { width: 16px; height: 16px; }
.list .ico.call { background: #E8EEF6; color: var(--s1); } .list .ico.email { background: #EEF0F7; color: #4B5A8C; }
.list .ico.text { background: #EAF1EF; color: #2E6B5E; }
.list .ico.quote { background: #F5EDE0; color: #8A6232; } .list .ico.appointment { background: #E9F2EC; color: var(--good); }
.list .main2 { min-width: 0; flex: 1; }
.list .main2 b { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .time { color: var(--faint); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.empty { padding: 26px 18px; text-align: center; color: var(--faint); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.tag.good { background: var(--good-bg); color: var(--good); } .tag.warn { background: var(--warn-bg); color: var(--warn); } .tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.navy { background: #E6ECF3; color: var(--navy-3); } .tag.gold { background: #F5ECDD; color: #7A5A30; }
.tag svg { width: 12px; height: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 3px 11px; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.chips button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 10px; margin-bottom: 8px; font-size: 13.5px; }
.alert svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.alert.warn { background: var(--warn-bg); color: #6E4A0F; } .alert.bad { background: var(--bad-bg); color: #7E2A21; } .alert.info { background: #E9EEF5; color: var(--navy-2); }

/* ───── Modal & drawer ───── */
.overlay { position: fixed; inset: 0; background: rgba(11,31,51,.42); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; animation: fade .15s; }
.modal { background: var(--paper); border-radius: 14px; width: 100%; max-width: 540px; box-shadow: 0 20px 60px rgba(11,31,51,.3); animation: rise .18s; }
.modal.wide { max-width: 760px; }
.modal .mh { padding: 18px 22px 0; display: flex; align-items: center; }
.modal .mh h2 { font-size: 21px; }
.modal .mb { padding: 16px 22px; }
.modal .mf { padding: 14px 22px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; background: var(--soft); border-radius: 0 0 14px 14px; }
.modal .err { color: var(--bad); font-size: 13px; margin-right: auto; align-self: center; }
.x { border: 0; background: none; cursor: pointer; margin-left: auto; color: var(--muted); padding: 4px; border-radius: 6px; }
.x:hover { background: var(--line-2); } .x svg { width: 18px; height: 18px; display: block; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--cream); z-index: 40; box-shadow: -10px 0 40px rgba(11,31,51,.18); overflow-y: auto; animation: slide .2s; }
.drawer .dh { background: var(--side); color: #fff; padding: 20px 22px 18px; position: sticky; top: 0; z-index: 2; }
.drawer .dh h2 { color: #fff; font-size: 23px; }
.drawer .dh .x { color: #9fb0c1; } .drawer .dh .x:hover { background: rgba(255,255,255,.08); }
.drawer .db { padding: 18px 22px 40px; display: grid; gap: 16px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.outcomes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.outcomes button { border: 1px solid var(--line); background: var(--paper); border-radius: 9px; padding: 10px 8px; cursor: pointer; font-weight: 500; font-size: 13px; }
.outcomes button.on { border-color: var(--brand); background: var(--brand); color: #fff; }
.outcomes button.ok.on { background: var(--good); border-color: var(--good); }
.outcomes button.stop.on { background: var(--bad); border-color: var(--bad); }
.picker { position: relative; }
.picker .results { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); z-index: 5; max-height: 260px; overflow-y: auto; }
.picker .results button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.picker .results button:hover { background: var(--hover); }
.picker .chosen { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--gold-lt); background: var(--soft-gold); border-radius: 8px; }
.newc { border: 1px dashed #d6c9b2; border-radius: 10px; padding: 12px 12px 0; margin-top: 8px; background: var(--soft-gold); }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 10px; z-index: 80; box-shadow: 0 8px 30px rgba(0,0,0,.25); font-size: 13.5px; animation: rise .2s; max-width: 90vw; }
.toast.warn { background: #7a4e0c; } .toast.bad { background: var(--bad); }
.secret { font: 600 20px/1.3 ui-monospace, Menlo, monospace; background: var(--soft-gold); border: 1px dashed var(--gold); padding: 12px; border-radius: 10px; text-align: center; letter-spacing: .5px; user-select: all; }
@keyframes fade { from { opacity: 0; } } @keyframes rise { from { opacity: 0; transform: translateY(8px); } } @keyframes slide { from { transform: translateX(30px); opacity: 0; } }

/* ───── Handbook ───── */
.article { padding: 18px 20px; border-bottom: 1px solid var(--line-2); }
.article:last-child { border-bottom: 0; }
.article h3 { font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.article p { margin: 0 0 10px; } .article ul { margin: 0 0 10px; padding-left: 20px; } .article li { margin-bottom: 5px; }
.article .foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.article.need { background: linear-gradient(90deg, var(--soft-gold), var(--paper) 40%); box-shadow: inset 3px 0 0 var(--gold); }

/* ───── Charts ───── */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .gridline { stroke: var(--line-2); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.chart .zero { stroke: var(--line); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover { fill: rgba(11,31,51,.04); }
.tip { position: absolute; pointer-events: none; background: var(--brand); color: #fff; border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.5; white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,.2); z-index: 3; transform: translate(-50%, calc(-100% - 10px)); }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .nav { display: flex; overflow-x: auto; padding: 6px; } .nav .group { display: none; } .nav button { width: auto; white-space: nowrap; }
  .side .brand, .side .me { display: none; }
  .cols { grid-template-columns: 1fr; }
  .content, .top { padding-left: 16px; padding-right: 16px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .shell > *, .main, .cols > *, .stack > * { min-width: 0; }
  .top { padding-top: 10px; padding-bottom: 10px; }
  .top .right { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .quick .btn { padding: 6px 10px; }
  .top .right .clock { order: -1; flex: none; }
  .quick { flex: none; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile .big { font-size: 26px; }
  .modal .mb, .modal .mh, .modal .mf { padding-left: 16px; padding-right: 16px; }
  .outcomes { grid-template-columns: 1fr 1fr; }
}
@media print { .side, .top .quick, .top .clock { display: none; } .shell { display: block; } body { background: #fff; } }

.scroll { max-height: 720px; overflow-y: auto; }

table.t td.n, table.t td b { white-space: nowrap; }

/* Quick counters */
.tallies { display: flex; gap: 6px; }
.tally { display: inline-flex; align-items: center; gap: 2px; background: var(--paper); border: 1px solid var(--line); border-radius: 99px; padding: 2px 3px 2px 10px; white-space: nowrap; }
.tally .tl { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); margin-right: 4px; }
.tally .tl svg { width: 14px; height: 14px; }
.tally button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--line-2); color: var(--navy); font-size: 16px; font-weight: 600; cursor: pointer; line-height: 1; }
.tally button.plus { background: var(--brand); color: #fff; }
.tally button:hover { filter: brightness(.95); }
.tally b { min-width: 24px; text-align: center; font-size: 14px; color: var(--navy); }
.tally.big { margin-top: 10px; padding: 3px; border-color: var(--line-2); background: var(--soft); }
.tally.big button { width: 34px; height: 34px; font-size: 20px; }
.tally.big b { min-width: 30px; font-size: 15px; }
/* Calendar */
.cal-card { overflow: hidden; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-col { border-right: 1px solid var(--line-2); min-height: 420px; display: flex; flex-direction: column; }
.cal-col:last-child { border-right: 0; }
.cal-head { display: flex; align-items: baseline; gap: 6px; padding: 10px 10px 8px; border-bottom: 1px solid var(--line-2); background: var(--soft); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cal-head b { font-family: var(--serif); font-size: 20px; color: var(--navy); letter-spacing: 0; }
.cal-col.today .cal-head { background: #F5ECDD; box-shadow: inset 0 -2px 0 var(--gold); }
.cal-count { background: var(--brand); color: #fff; border-radius: 99px; font-size: 10.5px; font-weight: 700; padding: 0 6px; line-height: 17px; letter-spacing: 0; }
.cal-add { margin-left: auto; border: 0; background: none; color: var(--gold); font-size: 18px; cursor: pointer; line-height: 1; padding: 0 2px; }
.cal-add:hover { color: var(--navy); }
.cal-body { padding: 8px; display: grid; gap: 6px; align-content: start; }
.cal-empty { color: var(--faint); text-align: center; padding-top: 8px; }
.cal-chip { display: block; width: 100%; text-align: left; border: 1px solid var(--line); border-left: 3px solid var(--navy-3); background: var(--paper); border-radius: 6px; padding: 5px 7px; font-size: 12px; line-height: 1.35; cursor: pointer; overflow: hidden; text-overflow: ellipsis; }
.cal-chip:hover { background: var(--hover); }
.cal-chip b { font-weight: 600; color: var(--navy); }
.cal-meta { display: block; color: var(--muted); font-size: 11px; }
.cal-chip.st-completed, .lg.st-completed { border-left-color: var(--good); }
.cal-chip.st-no_show, .lg.st-no_show { border-left-color: var(--bad); }
.cal-chip.st-completed { opacity: .75; }
.legend .lg { width: 10px; height: 10px; border-radius: 2px; background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--navy-3); }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow div { padding: 8px 10px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--soft); border-bottom: 1px solid var(--line); }
.cal-cell { min-height: 108px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 6px; cursor: pointer; display: grid; gap: 4px; align-content: start; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:hover { background: var(--hover); }
.cal-cell.out { background: var(--soft); } .cal-cell.out .cal-num { color: var(--faint); }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--gold); }
.cal-num { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--navy); font-size: 13px; }
.cal-cell .cal-chip { padding: 2px 5px; font-size: 11px; white-space: nowrap; }
.cal-more { font-size: 11px; color: var(--muted); padding-left: 4px; }
@media (max-width: 980px) { .cal-week { grid-template-columns: 1fr; } .cal-col { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line-2); } .tally .tl { display: none; } }
.tally.big b { display: none; }
.tally.big { gap: 8px; }
.tally.locked button, .quick.locked > .btn { opacity: .45; }
.tally.locked button { cursor: not-allowed; }

/* ───── Dark mode ───── */
.theme-btn { background: none; border: 0; color: #9fb0c1; padding: 0; cursor: pointer; font-size: 12.5px; }
html[data-theme=dark] {
  color-scheme: dark;
  --cream: #0D1824; --paper: #14222F; --soft: #182838; --hover: #1C2E41; --soft-gold: #262116; --input-line: #2F4358; --top: rgba(13,24,36,.92);
  --ink: #E4E9EF; --muted: #A2B0BF; --faint: #7C8A9A; --line: #27394C; --line-2: #1E2F41;
  --navy: #EADBC1; --navy-2: #D8C5A3; --navy-3: #8FB4E2;
  --brand: #2C5C96; --brand-2: #376AA8; --side: #08131E;
  --gold: #C9A774; --gold-lt: #4A3F2C;
  --good: #63C08C; --good-bg: #15301F; --warn: #E7B567; --warn-bg: #33270F; --bad: #EC8578; --bad-bg: #3B1D1A;
  --s1: #5B8FD0; --s2: #B57E36;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
}
html[data-theme=dark] .login { background: radial-gradient(1200px 600px at 20% -10%, #17283A 0%, var(--cream) 60%); }
html[data-theme=dark] .tag.navy { background: #1C3048; color: var(--navy-3); }
html[data-theme=dark] .tag.gold { background: #33291A; color: #E2C28F; }
html[data-theme=dark] .list .ico.call { background: #19304A; } html[data-theme=dark] .list .ico.email { background: #22284A; color: #9AA8E0; }
html[data-theme=dark] .list .ico.text { background: #163330; color: #7CC6B4; } html[data-theme=dark] .list .ico.quote { background: #33281A; color: #E2B57A; }
html[data-theme=dark] .list .ico.appointment { background: #15301F; }
html[data-theme=dark] .alert.warn { color: #F1CF95; } html[data-theme=dark] .alert.bad { color: #F4ABA1; } html[data-theme=dark] .alert.info { background: #172C42; color: #BFD3EA; }
html[data-theme=dark] .cal-col.today .cal-head { background: #2A2416; }
html[data-theme=dark] .secret { background: #262116; }
html[data-theme=dark] .modal .mf { background: var(--soft); }
html[data-theme=dark] .overlay { background: rgba(0,0,0,.55); }
html[data-theme=dark] .btn:hover { border-color: #3A5068; }
html[data-theme=dark] .seg button.on { background: var(--hover); color: var(--navy); }
html[data-theme=dark] .goal i { background: #5B8FD0; }

/* v7: grouped form sections and responsibility checkboxes */
.fhead { font-size: 13px; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.fhead small { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); margin-top: 3px; font-size: 12px; }
div.f { margin-bottom: 12px; }
div.f > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
div.f > small { display: block; color: var(--muted); margin-top: 2px; font-size: 12px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 14px; }
.checks .check { margin-bottom: 6px; }

/* v8: Half / Zero circles, typed quote count, pause state, steady clock width */
.dots { display: inline-flex; gap: 4px; padding-right: 2px; }
.tally .dots button.dot2, .dots .dot2 { width: auto; height: 26px; border-radius: 99px; padding: 0 9px 0 5px; display: inline-flex; align-items: center; gap: 5px;
  background: var(--line-2); color: var(--ink); font-size: 12.5px; font-weight: 600; border: 0; cursor: pointer; }
.dot2 i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--faint); background: transparent; box-sizing: border-box; }
.dot2.on { background: rgba(46,125,79,.14); color: var(--good); }
.dot2.on i { border-color: var(--good); background: var(--good); box-shadow: inset 0 0 0 2px var(--paper); }
.dots.big { margin-top: 12px; gap: 8px; }
.dots.big .dot2 { height: 34px; padding: 0 14px 0 9px; font-size: 14px; }
.dots.big .dot2 i { width: 18px; height: 18px; }
.tally .dots { margin-left: 2px; }
input.qnum { width: 58px; height: 26px; border: 1px solid var(--line); border-radius: 99px; text-align: center; font-weight: 700; font-size: 14px; color: var(--ink); background: var(--soft); padding: 0 4px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
input.qnum::-webkit-outer-spin-button, input.qnum::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input.qnum.big { width: 110px; height: 52px; font-size: 30px; border-radius: 12px; font-family: var(--serif); }
label.tally { cursor: text; padding-right: 3px; }
.tally.locked .dot2, .tally.locked input.qnum { opacity: .55; }
.good-txt { color: var(--good); }
.clock .txt { font-variant-numeric: tabular-nums; min-width: 168px; white-space: nowrap; }
.clock.paused .dot { background: var(--gold); box-shadow: 0 0 0 4px rgba(184,138,68,.18); }
.clock.paused .txt { color: var(--muted); }
.clock .btn + .btn { margin-left: -4px; }
.fhead.sub { font-size: 12.5px; text-transform: none; letter-spacing: 0; font-weight: 600; border-top: 0; padding-top: 0; margin-top: 4px; }
/* keep the top bar on one row: icon-only labels for the inbox circles */
.tally .tl.icon-only { margin-right: 2px; }
.tally .dots .dot2 { padding: 0 8px 0 4px; font-size: 12px; height: 24px; }
/* Top bar: title + clock on the first row, the work counters on a steady second row. */
.top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; row-gap: 10px; }
.top .quick { grid-column: 1 / -1; flex-wrap: wrap; align-items: center; }
@media (max-width: 860px) { .top .quick { flex-wrap: nowrap; overflow-x: auto; } .top .clock .txt { min-width: 0; } }
/* single goal circle */
.tally .dot2.solo, .dot2.solo { width: 26px; height: 26px; padding: 0; justify-content: center; border-radius: 50%; background: var(--line-2); margin-left: 2px; }
.dot2.solo i { width: 16px; height: 16px; }
.dot2.solo.big { width: auto; height: 36px; padding: 0 14px 0 10px; border-radius: 99px; gap: 8px; margin-top: 12px; font-size: 14px; }
.dot2.solo.big i { width: 18px; height: 18px; }
.tally.locked .dot2 { opacity: .55; }
.dot2 { border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-family: inherit; font-weight: 600; color: var(--ink); background: var(--line-2); }
.dot2 i { flex: none; display: block; }
.dot2.solo.on { background: rgba(46,125,79,.14); color: var(--good); }
.dot2.solo:not(.big) i { width: 16px; height: 16px; }
.tally .dot2.solo { width: 28px; height: 28px; min-width: 28px; }
.dot2 { font-family: var(--sans); white-space: nowrap; }
/* Call-now alert */
.btn.danger-solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.danger-solid:hover { filter: brightness(1.08); }
.callnow { text-align: center; padding: 6px 0 2px; }
.callnow .cn-name { font-family: var(--serif); font-size: 24px; color: var(--ink); margin-bottom: 14px; }
.callnow .cn-phone { display: inline-flex; align-items: center; gap: 10px; font-size: 28px; font-weight: 700; color: var(--good); text-decoration: none;
  background: var(--good-bg); padding: 10px 22px; border-radius: 14px; font-variant-numeric: tabular-nums; }
.callnow .cn-phone svg { width: 24px; height: 24px; }
