/* Pebbles CRM. Light and dark via prefers-color-scheme; no external fonts, no third-party requests. */
:root {
  --bg: #f4f5f9; --panel: #ffffff; --panel-2: #f8fafc; --line: #e6e8ef; --ink: #0f172a; --ink-2: #475569; --muted: #94a3b8;
  --accent: #4f46e5; --accent-ink: #ffffff; --accent-soft: #eef2ff; --danger: #dc2626; --danger-soft: #fee2e2; --ok: #16a34a; --ok-soft: #dcfce7;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -12px rgba(15, 23, 42, .18);
  --radius: 14px; --sidebar: 232px;
  --s-lead: #0ea5e9; --s-qualified: #8b5cf6; --s-proposal: #f59e0b; --s-negotiation: #f97316; --s-won: #16a34a; --s-lost: #94a3b8;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b1020; --panel: #121a2e; --panel-2: #0f1628; --line: #1f2a44; --ink: #e5e9f5; --ink-2: #aab4cc; --muted: #6b7794;
    --accent: #818cf8; --accent-ink: #0b1020; --accent-soft: #1b2142; --danger: #f87171; --danger-soft: #3b1420; --ok: #4ade80; --ok-soft: #122a1c;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 30px -14px rgba(0,0,0,.7); }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
h1 { font-size: 24px; letter-spacing: -.02em; margin: 0; font-weight: 700; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 650; letter-spacing: -.01em; }
.muted { color: var(--ink-2); }
.dim { color: var(--muted); }
small, .small { font-size: 12.5px; }
[hidden] { display: none !important; }

/* Controls */
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder { color: var(--muted); }
button { cursor: pointer; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 9px 14px; font-weight: 600; transition: transform .05s, background .15s, border-color .15s; white-space: nowrap; }
button:hover { background: var(--panel-2); }
button:active { transform: translateY(1px); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.primary:hover { filter: brightness(1.07); background: var(--accent); }
button.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
button.ghost:hover { background: var(--accent-soft); color: var(--accent); }
button.danger { color: var(--danger); }
button.danger:hover { background: var(--danger-soft); border-color: var(--danger-soft); }
button.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
button:disabled { opacity: .55; cursor: default; }
button svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
button svg + * , button.primary svg { margin-right: 2px; }
.side .foot button svg { width: 18px; height: 18px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
form.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
form.grid .wide { grid-column: 1 / -1; }
.error { color: var(--danger); font-size: 13.5px; }

/* Auth screens */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 10% -10%, var(--accent-soft), transparent 60%), radial-gradient(900px 500px at 110% 110%, #fef3c7aa, transparent 60%); }
@media (prefers-color-scheme: dark) { .auth { background: radial-gradient(1200px 600px at 10% -10%, #1b2142, transparent 60%), radial-gradient(900px 500px at 110% 110%, #2a1f0a, transparent 60%); } }
.auth .box { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
.auth .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth .brand img { width: 40px; height: 40px; border-radius: 10px; }
.auth .brand strong { font-size: 18px; letter-spacing: -.02em; }
.auth form { display: grid; gap: 14px; }
.auth p { margin: 0 0 6px; color: var(--ink-2); font-size: 14px; }

/* App shell */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 18px 14px; border-right: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; gap: 6px; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; }
.side .brand img { width: 30px; height: 30px; border-radius: 8px; }
.side .brand strong { font-size: 16px; letter-spacing: -.02em; }
.side a.nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-weight: 550; }
.side a.nav svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side a.nav:hover { background: var(--panel-2); color: var(--ink); }
.side a.nav.active { background: var(--accent-soft); color: var(--accent); }
.side .spacer { flex: 1; }
.side .foot { padding: 8px 10px; display: flex; gap: 8px; align-items: center; }
.main { padding: 26px 32px 60px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar .grow { flex: 1; }
.search { position: relative; max-width: 420px; flex: 1; }
.search input { padding-left: 36px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 2; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; bottom: 0; top: auto; height: auto; width: 100%; flex-direction: row; justify-content: space-around; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); z-index: 5; }
  .side .brand, .side .spacer, .side .nav span { display: none; }
  .side a.nav { padding: 10px 14px; }
  .side .foot { padding: 0; }
  .main { padding: 18px 16px 90px; }
}

/* Cards and tables */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 16px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .cols { grid-template-columns: 1fr; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .l { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.kpi .v { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.kpi .d { font-size: 12.5px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--panel-2); }
tbody tr.link { cursor: pointer; }
td .name { font-weight: 600; }
.table-wrap { overflow-x: auto; }
.empty { padding: 36px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink-2); font-weight: 600; margin-bottom: 4px; }

/* Avatars, pills */
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 12.5px; font-weight: 700; color: #fff; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.row { display: flex; align-items: center; gap: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill[data-stage="lead"] { color: var(--s-lead); } .pill[data-stage="qualified"] { color: var(--s-qualified); } .pill[data-stage="proposal"] { color: var(--s-proposal); }
.pill[data-stage="negotiation"] { color: var(--s-negotiation); } .pill[data-stage="won"] { color: var(--s-won); } .pill[data-stage="lost"] { color: var(--s-lost); }
.kind { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); flex: none; }
.kind svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Pipeline board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.col { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 240px; scroll-snap-align: start; transition: background .15s, border-color .15s; }
.col.over { border-color: var(--accent); background: var(--accent-soft); }
.col h3 { margin: 4px 6px 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.col h3 .dot { width: 8px; height: 8px; border-radius: 50%; }
.col h3 .n { margin-left: auto; color: var(--muted); font-weight: 600; }
.col .sum { margin: 0 6px 10px; font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.deal { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; margin-bottom: 8px; cursor: grab; box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: box-shadow .15s, transform .15s; }
.deal:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.deal.dragging { opacity: .45; }
.deal .t { font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
.deal .m { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.deal .v { font-weight: 700; color: var(--ink); }
.deal .actions { display: none; gap: 6px; margin-top: 8px; }
.deal:hover .actions, .deal:focus-within .actions { display: flex; }
.deal select { padding: 4px 8px; font-size: 12.5px; border-radius: 8px; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.timeline .h strong { font-weight: 600; }
.timeline .b { color: var(--ink-2); white-space: pre-wrap; }
ul.files { list-style: none; margin: 0; padding: 0; }
ul.files li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.files li:last-child { border-bottom: 0; }
ul.files .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop { border: 1.5px dashed var(--line); border-radius: 12px; padding: 16px; text-align: center; color: var(--muted); font-size: 13.5px; transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.notice { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
@media (prefers-color-scheme: dark) { .notice { background: #2a1f0a; border-color: #4a3410; color: #fcd34d; } }

/* Toast, modal */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow); z-index: 20; max-width: 90vw; }
.toast.bad { background: var(--danger); color: #fff; }
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: grid; place-items: center; padding: 20px; z-index: 10; backdrop-filter: blur(2px); }
.modal .card { width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; }
.modal .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal .head h2 { margin: 0; font-size: 17px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.pagehead .sub { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13.5px; margin-bottom: 10px; }
.back:hover { color: var(--accent); }
.details dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0; }
.details dt { color: var(--muted); font-size: 13px; }
.details dd { margin: 0; }

/* Password fields with show/hide */
.pw { position: relative; display: block; }
.pw input { padding-right: 42px; }
.pw .eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); padding: 6px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; }
.pw .eye:hover { color: var(--ink); background: var(--panel-2); }
.pw .eye svg { width: 18px; height: 18px; margin: 0; vertical-align: 0; }
.auth h2 { font-size: 20px; margin: 0 0 4px; letter-spacing: -.02em; }
.auth .switch { margin: 16px 0 0; font-size: 14px; text-align: center; color: var(--ink-2); }
.auth button.primary { padding: 11px; }
.side .foot { flex-direction: column; align-items: stretch; gap: 4px; }
.side .foot .user { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: transparent; padding: 8px; border-radius: 10px; }
.side .foot .user:hover { background: var(--panel-2); }
.side .foot .user .avatar { width: 30px; height: 30px; font-size: 11px; }
.side .foot .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.side .foot .who strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .foot .who small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .foot #logout { align-self: flex-start; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
label.check input { width: auto; }
@media (max-width: 860px) {
  .side .foot { flex-direction: row; align-items: center; }
  .side .foot .who { display: none; }
  .side .foot .user { padding: 6px; }
}

/* Salesforce-style additions: stepper, segmented filters, task lists, charts, link buttons */
a.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font-weight: 600; }
a.btn:hover { background: var(--panel-2); }
a.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.topbar #topbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.topbar #topbar-actions select { width: auto; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.seg button { border: 0; border-radius: 0; padding: 7px 12px; font-size: 13.5px; color: var(--ink-2); background: transparent; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent-soft); color: var(--accent); }
.h2row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.h2row h2 { margin: 0; }
.late { color: var(--danger); font-weight: 600; }
.pill.hot { color: var(--danger); }
.pill[data-stage="s-new"] { color: var(--s-lead); } .pill[data-stage="s-working"] { color: var(--s-proposal); } .pill[data-stage="s-qualified"] { color: var(--s-won); } .pill[data-stage="s-unqualified"] { color: var(--s-lost); }
.avatar.xs { width: 22px; height: 22px; font-size: 9px; }
a.kpi { color: inherit; display: block; }
a.kpi:hover { border-color: var(--accent); }
.kpi .v.late { color: var(--danger); }
.notice.ok { background: var(--ok-soft); border-color: var(--ok-soft); color: var(--ok); }
ul.plainlist { list-style: none; margin: 0; padding: 0; }
ul.plainlist li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
ul.plainlist li:last-child { border-bottom: 0; }
ul.plainlist .grow { flex: 1; min-width: 0; }
ul.plainlist .right { text-align: right; }
a.deal { display: block; color: inherit; }
a.deal:hover .t { color: var(--accent); }
.deal .m + .m { margin-top: 6px; }

/* Deal stage stepper */
.stepper { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; }
.step { flex: 1; min-width: 96px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; text-transform: capitalize; color: var(--ink-2); position: relative; }
.step.done { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.step.cur { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.step.cur.won { background: var(--ok); color: #fff; border-color: var(--ok); }
.step.cur.lost { background: var(--danger); color: #fff; border-color: var(--danger); }
.step:disabled { opacity: .5; }

/* Tasks */
ul.tasks { list-style: none; margin: 0; padding: 0; }
ul.tasks li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
ul.tasks li:last-child { border-bottom: 0; }
ul.tasks li.done .t { text-decoration: line-through; color: var(--muted); }
ul.tasks input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
ul.tasks .grow { flex: 1; min-width: 0; }
ul.tasks .t { font-weight: 600; }

/* Charts: one hue, direct labels, hover titles */
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.bar .l { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: capitalize; }
.bar .track { height: 14px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.bar .fill { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; transition: width .3s; }
.bar .v { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 64px; text-align: right; }
.cols-chart { display: flex; align-items: stretch; gap: 10px; height: 180px; padding-top: 18px; }
.col-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.col-bar .track { flex: 1; width: 100%; max-width: 48px; display: flex; align-items: flex-end; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.col-bar .fill { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; }
.col-bar .v { font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.col-bar .l { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
@media (max-width: 860px) { .bar { grid-template-columns: 80px 1fr auto; } .stepper .step { min-width: 80px; } }

/* Sales Cloud additions: guidance, lines, roles, calendar, confetti, path editor */
.guidance { border-left: 3px solid var(--accent); margin-bottom: 16px; }
.guidance p { margin: 0; white-space: pre-wrap; }
.pill.primary { color: var(--accent); }
.pill.primary svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.pill[data-stage="f-pipeline"] { color: var(--s-lead); } .pill[data-stage="f-best_case"] { color: var(--s-proposal); } .pill[data-stage="f-commit"] { color: var(--s-negotiation); } .pill[data-stage="f-closed"] { color: var(--s-won); } .pill[data-stage="f-omitted"] { color: var(--s-lost); }
.pill[data-stage="c-active"] { color: var(--s-won); } .pill[data-stage="c-planned"] { color: var(--s-lead); } .pill[data-stage="c-completed"] { color: var(--s-qualified); } .pill[data-stage="c-aborted"] { color: var(--s-lost); }
table.lines td, table.lines th { padding: 7px 8px; }
select.sm { width: auto; padding: 4px 8px; font-size: 13px; border-radius: 8px; }
ul.plainlist li select.sm { margin-left: 6px; }
.dup { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: 8px 12px; font-size: 13.5px; }
@media (prefers-color-scheme: dark) { .dup { background: #2a1f0a; border-color: #4a3410; color: #fcd34d; } }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 8px; overflow-x: auto; }
.day { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; min-height: 220px; display: flex; flex-direction: column; gap: 6px; }
.day.today { border-color: var(--accent); }
.day .dh { display: flex; justify-content: space-between; align-items: baseline; color: var(--ink-2); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.day.today .dh strong { color: var(--accent); }
.day .dh strong { font-size: 18px; color: var(--ink); }
.ev { display: block; width: 100%; text-align: left; background: var(--accent-soft); color: var(--ink); border: 0; border-radius: 8px; padding: 6px 8px; font-size: 12.5px; line-height: 1.3; font-weight: 500; }
.ev .t { font-weight: 700; color: var(--accent); }
.ev.task { background: var(--panel-2); color: var(--ink-2); display: flex; align-items: center; gap: 5px; }
.ev.task svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.ev.task.done { text-decoration: line-through; opacity: .6; }
.day .addday { margin-top: auto; align-self: flex-start; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall 2.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); opacity: .2; } }
@media (max-width: 860px) {
  .side { overflow-x: auto; justify-content: flex-start; gap: 0; }
  .side a.nav { padding: 10px 12px; flex: none; }
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; }
}

/* Round 3: bell, feed, documents, cases, admin nav */
.side { overflow-y: auto; }
.navhead { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 10px 4px; }
.bell { position: relative; }
.bell .badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.bell .dropdown { position: absolute; right: 0; top: 44px; width: min(380px, 90vw); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 10px; z-index: 15; max-height: 70vh; overflow: auto; }
.bell .note { display: block; padding: 8px; border-radius: 8px; color: var(--ink); font-size: 13.5px; }
.bell .note.unread { background: var(--accent-soft); }
.bell .note:hover { background: var(--panel-2); }
.bell .note span { display: block; }
.feed form.post { display: grid; gap: 8px; margin-bottom: 12px; }
.feed .postitem { padding: 10px 0; border-top: 1px solid var(--line); }
.feed .postitem .b { white-space: pre-wrap; margin-top: 2px; }
.feed .comments { margin: 8px 0 0 44px; display: grid; gap: 8px; }
.feed .comment-form input { flex: 1; }
.mention { color: var(--accent); font-weight: 600; }
.splitbar { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; margin: 8px 0 4px; }
.splitbar span { display: block; height: 100%; background: var(--accent); }
.pill[data-stage="q-draft"], .pill[data-stage="o-draft"] { color: var(--s-lead); } .pill[data-stage="q-sent"] { color: var(--s-proposal); } .pill[data-stage="q-accepted"], .pill[data-stage="o-activated"], .pill[data-stage="o-fulfilled"] { color: var(--s-won); } .pill[data-stage="q-rejected"], .pill[data-stage="q-expired"], .pill[data-stage="o-cancelled"] { color: var(--s-lost); }
table .right { text-align: right; color: var(--ink-2); }
table tfoot td { border-bottom: 0; }
table tfoot tr.total td { border-top: 2px solid var(--line); }
pre.code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; overflow-x: auto; }
code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
@media print {
  .side, .topbar, .back, .toast, .bell, button { display: none !important; }
  .shell { grid-template-columns: 1fr; }
  .main { padding: 0; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  body { background: #fff; color: #000; }
}

/* Round 4: reach buttons, lead generation, forms */
.reach { white-space: nowrap; }
.reach button, .reach .btn-ico { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; margin-right: 4px; border-radius: 8px; font-weight: 700; font-size: 12px; color: var(--ink-2); border: 1px solid var(--line); background: var(--panel); }
.reach button:hover, .reach .btn-ico:hover { color: var(--accent); border-color: var(--accent); }
input.inline { padding: 4px 8px; font-size: 13px; border-radius: 6px; min-width: 120px; }
ul.plain { list-style: none; padding: 0; margin: 6px 0 0; } ul.plain li { padding: 3px 0; }
.forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; }
.formcard { display: flex; gap: 18px; align-items: flex-start; }
.formcard img { border: 1px solid var(--line); border-radius: 10px; background: #fff; flex: none; }
.formcard .row { flex-wrap: wrap; gap: 6px; }
a.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
@media (max-width: 600px) { .forms { grid-template-columns: 1fr; } .formcard { flex-direction: column; } }

.dial { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font-weight: 700; font-size: 16px; }
.dial svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

a.brand { color: inherit; } a.brand:hover strong { color: var(--accent); }
.qr-card img { background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.qr-ok svg { width: 18px; height: 18px; stroke: var(--ok); fill: none; stroke-width: 2; }

.hero-qr { display: flex; gap: 24px; align-items: center; }
.hero-qr img { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px; flex: none; }
.hero-qr h2 { font-size: 20px; }
@media (max-width: 700px) { .hero-qr { flex-direction: column; align-items: stretch; text-align: center; } .hero-qr img { margin: 0 auto; } .hero-qr .row { justify-content: center; } }

.more-forms { margin-top: 18px; } .more-forms summary { cursor: pointer; } .more-forms .forms { margin-top: 12px; }
