:root {
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', system-ui, Roboto, sans-serif;
  --ink: #1d1d1f; --sec: #3a3a3c; --muted: #6e6e73; --faint: #86868b; --place: #a1a1a6;
  --line: #e8e8ed; --line2: #f0f0f2; --hair: rgba(0,0,0,0.06); --bg: #f5f5f7; --card: #fff;
  --blue: #0071e3; --blue-d: #0a3d91; --navy: #0060df; --blue-l: #0a84ff;
  --green: #1d8a52; --green2: #34c759; --red: #c0392b; --red2: #ff3b30; --lost: #ff453a;
  --amber: #e08600; --amber2: #ff9f0a; --purple: #5e5ce6; --teal: #1399a6;
  --u-si: #1399a6; --u-di: #5e5ce6; --u-hw: #e08600; --u-ops: #86868b;
  --r: 18px; --r2: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 10px 30px rgba(0,0,0,0.035);
  --shadow-hover: 0 2px 6px rgba(0,0,0,0.08), 0 16px 40px rgba(0,0,0,0.07);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #d6d6db; border-radius: 8px; border: 2px solid var(--bg); }
svg { display: block; }

/* ── layout ── */
.app { display: grid; grid-template-columns: 248px 1fr; height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--hair); display: flex; flex-direction: column; padding: 18px 14px; }
.org { display: flex; gap: 11px; align-items: center; padding: 8px 10px 18px; }
.org .ava { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(160deg,#0a84ff,#0060df); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.org .nm { font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; } .org .bu { color: var(--faint); font-size: 11.5px; margin-top: 1px; }
.nav { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px; color: var(--sec); font-weight: 500; font-size: 14px; }
.nav a:hover { background: #f4f4f6; }
.nav a.active { background: #fff; color: var(--blue); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.nav a svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 19px; }
.userfoot { display: flex; gap: 10px; align-items: center; padding: 12px 10px 4px; border-top: 1px solid var(--hair); }
.userfoot .ava { width: 32px; height: 32px; border-radius: 50%; background: #d2d2d7; color: #1d1d1f; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.userfoot .nm { font-weight: 600; font-size: 13px; } .userfoot .ro { color: var(--faint); font-size: 11px; }

.mainwrap { display: flex; flex-direction: column; overflow: hidden; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 0 28px; height: 62px; border-bottom: 1px solid var(--hair); background: #fff; flex: 0 0 auto; }
.topbar .ttl { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.search { flex: 1; max-width: 460px; margin: 0 auto; position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 11px; stroke: var(--faint); fill: none; stroke-width: 1.8; width: 16px; height: 16px; }
.search input { width: 100%; padding: 8px 12px 8px 34px; border: none; background: rgba(0,0,0,0.045); border-radius: 9px; font-size: 13.5px; color: var(--ink); }
.search input::placeholder { color: var(--place); }
.search input:focus { outline: none; box-shadow: 0 0 0 3px rgba(0,113,227,.12); background: #fff; }
.topbar .right { display: flex; align-items: center; gap: 14px; }
.sync { color: var(--faint); font-size: 12.5px; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.sync .d { width: 7px; height: 7px; border-radius: 50%; background: var(--green2); box-shadow: 0 0 0 3px rgba(52,199,89,.15); }
.bell { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.045); cursor: pointer; }
.bell svg { width: 18px; height: 18px; stroke: var(--sec); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bell:hover { background: rgba(0,0,0,.08); }
main#view { overflow-y: auto; padding: 26px 30px 70px; }

/* topbar Create */
.create-wrap { position: relative; }
.create-btn { background: var(--blue); color: #fff; border: none; padding: 8px 13px; border-radius: 9px; font-size: 13.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.create-btn svg { stroke: #fff; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.create-menu { position: absolute; top: 44px; left: 0; background: #fff; border-radius: 13px; box-shadow: 0 8px 30px rgba(0,0,0,0.16),0 2px 8px rgba(0,0,0,0.08); padding: 7px; min-width: 190px; z-index: 70; display: none; }
.create-menu.on { display: block; }
.create-menu button { display: flex; align-items: center; gap: 11px; width: 100%; border: none; background: none; padding: 9px 11px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--ink); cursor: pointer; text-align: left; }
.create-menu button:hover { background: #f4f4f6; }
.create-menu .sq { width: 8px; height: 8px; border-radius: 3px; flex: 0 0 8px; }
.create-menu .div { height: 1px; background: rgba(0,0,0,0.07); margin: 6px 4px; }

/* ── headings / controls ── */
.page-h { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; gap: 16px; flex-wrap: wrap; }
h1 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
.sub { color: var(--faint); margin: 3px 0 0; font-size: 14.5px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spacer { flex: 1; }
.section-sub { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: -.01em; margin: 0 2px 12px; }
.btn { background: var(--blue); color: #fff; border: none; padding: 9px 15px; border-radius: 9px; font-size: 13.5px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.btn svg { stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; }
.btn:hover { background: #0064c8; }
.seg { display: inline-flex; background: rgba(0,0,0,0.05); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: none; background: transparent; padding: 7px 15px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
.seg button svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.chip { padding: 6px 13px; border: 1px solid var(--line); border-radius: 20px; background: #fff; cursor: pointer; font-size: 13px; color: var(--sec); }
.chip.on { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ── delta pill (rounded rect, text) ── */
.delta { border-radius: 6px; padding: 2px 7px; font-size: 11.5px; font-weight: 600; }
.delta.up { background: rgba(29,138,82,0.10); color: var(--green); }
.delta.dn { background: rgba(192,57,43,0.10); color: var(--red); }
.delta.flat { background: rgba(0,0,0,0.05); color: var(--muted); }

/* ── KPI cards (4-row) ── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; margin-bottom: 24px; }
.kpi { background: var(--card); border-radius: var(--r); padding: 18px 19px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 11px; }
.kpi.link { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.kpi.link:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.kpi .label { color: var(--faint); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.kpi .value { font-size: 30px; font-weight: 600; letter-spacing: -.025em; line-height: 1; color: var(--ink); }
.kpi.warn .value { color: var(--red); }
.kpi .drow { display: flex; align-items: center; gap: 7px; }
.kpi .fmeta { color: var(--faint); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi .spark { width: 100%; height: 22px; margin-top: -2px; }

/* ── forecast strip ── */
.fstrip { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 1px; background: var(--hair); border-radius: 18px; overflow: hidden; margin-bottom: 24px; box-shadow: var(--shadow); }
.ftile { background: #fff; padding: 20px 22px; cursor: pointer; }
.ftile .fl { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.ftile .fv { font-size: 24px; font-weight: 600; letter-spacing: -.02em; line-height: 1; margin: 9px 0 5px; }
.ftile .fs { font-size: 12px; color: var(--faint); }
.ftile.hero { background: linear-gradient(135deg,#0a3d91,#0071e3); color: #fff; }
.ftile.hero .fl { color: rgba(255,255,255,.85); } .ftile.hero .fv { font-size: 32px; letter-spacing: -.025em; } .ftile.hero .fs { color: rgba(255,255,255,.8); }
.ftile.green .fv { color: var(--green); }

/* ── panels / charts ── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: 1.7fr 1fr; gap: 16px; }
.panel { background: var(--card); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 16px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel h3 { margin: 0 0 14px; font-size: 14px; font-weight: 600; }
.panel .ph { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.panel .ph h3 { margin: 0; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 84px; align-items: center; gap: 12px; margin: 9px 0; font-size: 13px; }
.bar-row .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-bg { background: rgba(0,0,0,0.06); border-radius: 6px; height: 9px; }
.bar { height: 9px; border-radius: 6px; background: var(--blue); }
.bar-row .amt { text-align: right; color: var(--muted); }

/* revenue vs target */
.revpanel .ph .r { text-align: right; }
.revbars { display: flex; align-items: flex-end; gap: 12px; height: 132px; position: relative; margin-top: 8px; }
.revbars .rb { flex: 1; max-width: 38px; background: #cdd9ec; border-radius: 7px 7px 3px 3px; }
.revbars .rb.last { background: var(--blue); }
.revlabels { display: flex; gap: 12px; margin-top: 6px; } .revlabels span { flex: 1; max-width: 38px; text-align: center; font-size: 11px; color: var(--faint); }
.target-line { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--red); }
.target-line span { position: absolute; right: 0; top: -16px; background: #fff; font-size: 10px; font-weight: 600; color: var(--red); padding: 0 3px; }

/* quota donut */
.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.donut { width: 128px; height: 128px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; }
.donut .hole { width: 92px; height: 92px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut .pct { font-size: 26px; font-weight: 600; letter-spacing: -.02em; } .donut .cap { font-size: 11px; color: var(--faint); }
.donut-foot { display: flex; width: 100%; border-top: 1px solid var(--hair); padding-top: 12px; }
.donut-foot > div { flex: 1; text-align: center; } .donut-foot > div + div { border-left: 1px solid var(--hair); }
.donut-foot .v { font-size: 15px; font-weight: 600; } .donut-foot .c { font-size: 11px; color: var(--faint); }

/* deals closing soon */
.dcs-h, .dcs-r { display: grid; grid-template-columns: 1.9fr 1.1fr 0.9fr 1fr; gap: 12px; align-items: center; }
.dcs-h { background: rgba(0,0,0,0.025); padding: 9px 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--faint); }
.dcs-r { padding: 13px 20px; border-top: 1px solid rgba(0,0,0,0.05); font-size: 13px; cursor: pointer; }
.dcs-r:hover { background: rgba(0,113,227,0.035); }
.dcs-r .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.winbar { display: inline-flex; align-items: center; gap: 7px; }
.winbar .t { width: 38px; height: 5px; border-radius: 3px; background: rgba(0,0,0,0.08); overflow: hidden; }
.winbar .t > div { height: 100%; }

/* BU cards */
.bucards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 15px; margin-bottom: 26px; }
.bucard { background: #fff; border-radius: 18px; padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 17px; }
.bucard .bh { display: flex; align-items: center; gap: 9px; }
.bucard .bdot { width: 11px; height: 11px; border-radius: 4px; }
.bucard .bnm { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }
.bucard .bkey { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; margin-left: auto; }
.bustats { display: flex; gap: 18px; } .bustats > div { } .bustats .sv { font-size: 21px; font-weight: 600; letter-spacing: -.02em; } .bustats .sc { font-size: 11.5px; color: var(--faint); }
.bushare { height: 6px; border-radius: 4px; background: rgba(0,0,0,0.06); overflow: hidden; } .bushare > div { height: 100%; }

/* attention center */
.attn { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 15px; }
.attncard { background: #fff; border-radius: 18px; padding: 18px 19px; box-shadow: var(--shadow); }
.attncard .ah { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.attncard .at { font-size: 13.5px; font-weight: 600; } .attncard .ac { font-size: 11px; font-weight: 600; color: var(--muted); background: rgba(0,0,0,0.05); min-width: 20px; text-align: center; border-radius: 20px; padding: 2px 7px; margin-left: auto; }
.attn-item { display: flex; gap: 10px; padding: 11px 0; border-top: 1px solid var(--hair); }
.attn-item .sev { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; flex: 0 0 7px; }
.attn-item .it { font-size: 13px; font-weight: 500; letter-spacing: -.01em; } .attn-item .im { font-size: 11.5px; color: var(--faint); margin-top: 1px; }
.attn-item .iu { font-size: 10.5px; font-weight: 700; margin-left: auto; white-space: nowrap; }

/* ── tables ── */
.tablewrap { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--faint); padding: 11px 20px; background: rgba(0,0,0,0.025); }
td { padding: 13px 20px; border-top: 1px solid rgba(0,0,0,0.05); font-size: 13.5px; vertical-align: middle; }
tbody tr.clk:hover { background: rgba(0,113,227,0.035); cursor: pointer; }
.num { text-align: right; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 9px; vertical-align: middle; }
.chev { color: #c7c7cc; text-align: right; }
.chev svg { display: inline-block; width: 16px; height: 16px; stroke: #c7c7cc; fill: none; stroke-width: 2; }
.av { width: 24px; height: 24px; border-radius: 50%; background: #e8e8ed; color: var(--sec); display: inline-flex; align-items: center; justify-content: center; font-size: 9.5px; font-weight: 600; margin-right: 8px; vertical-align: middle; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 11.5px; background: rgba(0,0,0,0.05); color: var(--muted); font-weight: 600; }
.cnt-pill { display: inline-block; min-width: 20px; text-align: center; padding: 1px 7px; border-radius: 20px; background: rgba(0,0,0,0.05); color: var(--muted); font-size: 11px; font-weight: 600; }
.muted { color: var(--muted); } .faint { color: var(--faint); }

/* stage summary strip (sales, table view only) */
.stagecards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 11px; margin-bottom: 18px; }
.stagecard { background: var(--card); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.stagecard .n { font-size: 24px; font-weight: 600; letter-spacing: -.02em; } .stagecard .s { color: var(--faint); font-size: 11.5px; margin-top: 3px; }
.phasecards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.phasecard { background: #fff; border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; }
.phasecard .pd { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.phasecard .pl { font-size: 12.5px; color: var(--muted); } .phasecard .pv { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; }
.viewsbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.viewsbar .vlabel { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); margin-right: 4px; }
.viewsbar .vchip { padding: 6px 13px; border-radius: 9px; background: rgba(0,0,0,0.05); color: var(--sec); font-size: 13px; font-weight: 500; cursor: pointer; border: none; }
.viewsbar .vchip.on { background: var(--blue); color: #fff; }
.viewsbar .vsave { padding: 6px 13px; border-radius: 9px; border: 1px dashed var(--c7,#c7c7cc); background: none; color: var(--muted); font-size: 13px; cursor: pointer; }
.fsel { padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 13px; color: var(--ink); font-family: inherit; cursor: pointer; }
.iconbtn { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.iconbtn svg { width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 1.9; }

/* pager */
.pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 14px; color: var(--muted); font-size: 13px; }
.pager button { padding: 6px 12px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; }
.pager button:disabled { opacity: .4; cursor: default; }

/* ── sales board (flat) ── */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 13px; overflow-x: auto; align-items: start; padding-bottom: 12px; }
.bcol { background: rgba(0,0,0,0.025); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.bcol-h { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }
.bcol-h .cv { margin-left: auto; font-size: 11px; color: var(--faint); }
.bcard { background: #fff; border-radius: 12px; padding: 13px 14px; box-shadow: 0 1px 2px rgba(0,0,0,0.05),0 4px 14px rgba(0,0,0,0.04); cursor: grab; display: flex; flex-direction: column; gap: 9px; border-left: 3px solid var(--blue); }
.bcard .bn { font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
.bcard .ba { font-size: 11.5px; color: var(--faint); }
.bcard .bf { display: flex; align-items: center; justify-content: space-between; }
.bcard .bf .bv { font-size: 13.5px; font-weight: 600; }
.boardphases { display: flex; flex-direction: column; gap: 18px; }
.bphase-head { display: flex; align-items: center; gap: 9px; margin: 0 2px 10px; cursor: pointer; }
.bphase-head .bchev { color: var(--faint); font-size: 10px; width: 12px; transition: transform .15s; }
.bphase.collapsed .bphase-head .bchev { transform: rotate(-90deg); }
.bphase-head b { font-size: 14px; font-weight: 600; }
.bphase-head .bptotal { margin-left: auto; font-size: 13px; color: var(--muted); }
.bphase.collapsed .bcols { display: none; }
.bcols { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.boardphases .bcol { width: 240px; flex: 0 0 240px; }

/* ── accounts card-grid ── */
.acct-h, .acct-r { display: grid; grid-template-columns: 2fr 1.1fr 1fr 1.4fr 0.7fr 1fr; gap: 14px; align-items: center; }
.acct-h { background: rgba(0,0,0,0.025); padding: 11px 22px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--faint); }
.acct-r { padding: 14px 22px; border-top: 1px solid rgba(0,0,0,0.05); font-size: 13.5px; cursor: pointer; }
.acct-r:hover { background: rgba(0,113,227,0.035); }
.acct-id { display: flex; align-items: center; gap: 11px; min-width: 0; }
.acct-id .a { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: 0 0 36px; }
.acct-id .nm { font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-id .su { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rollups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.rollup { background: #fff; border-radius: 16px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04),0 8px 24px rgba(0,0,0,.03); }
.rollup .l { font-size: 12px; color: var(--faint); margin-bottom: 6px; } .rollup .v { font-size: 23px; font-weight: 600; letter-spacing: -.02em; }

/* ── drawer ── */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.28); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(540px, 96vw); background: var(--bg); box-shadow: -22px 0 60px rgba(0,0,0,.18); transform: translateX(100%); transition: transform .24s cubic-bezier(.4,0,.2,1); z-index: 50; overflow-y: auto; }
.drawer.on { transform: translateX(0); }
.dwr-top { background: #fff; padding: 22px 26px 0; border-bottom: 1px solid rgba(0,0,0,0.07); }
.dwr-head { display: flex; gap: 14px; align-items: flex-start; }
.dwr-head .ava { width: 48px; height: 48px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex: 0 0 48px; }
.dwr-head h2 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dwr-x { margin-left: auto; width: 32px; height: 32px; border-radius: 8px; background: rgba(0,0,0,0.05); border: none; cursor: pointer; font-size: 15px; color: var(--muted); flex: 0 0 32px; }
.tabs { display: flex; gap: 20px; padding-top: 16px; overflow-x: auto; }
.tabs button { border: none; background: none; padding: 8px 0 12px; font-size: 13.5px; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; display: flex; gap: 7px; align-items: center; white-space: nowrap; }
.tabs button.on { color: var(--blue); font-weight: 600; border-bottom-color: var(--blue); }
.tabs .cnt-pill { background: rgba(0,0,0,0.06); }
.dwr-body { padding: 22px 26px 70px; display: flex; flex-direction: column; gap: 22px; }
.dwr-body .panel, .dwr-body .editbox, .dwr-body .card { box-shadow: none; }
.minikpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.minikpi { background: #fff; border-radius: 14px; padding: 14px 16px; }
.minikpi .k { color: var(--faint); font-size: 11.5px; } .minikpi .v { font-size: 20px; font-weight: 600; margin-top: 4px; letter-spacing: -.01em; }
.editbox { background: #fff; border-radius: 16px; padding: 18px 20px; }
.editbox .eh { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--faint); text-transform: uppercase; margin-bottom: 14px; }
.frow { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; padding: 9px 0; }
.frow .fk { color: var(--muted); font-size: 13px; }
.frow .fv { font-size: 13.5px; font-weight: 500; }
.field-edit { width: 100%; padding: 9px 11px; border: 1px solid rgba(0,0,0,0.14); border-radius: 9px; font-size: 13.5px; font-weight: 500; background: #fff; color: var(--ink); }
.field-edit:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,113,227,0.12); }
.dollar-wrap { position: relative; } .dollar-wrap span { position: absolute; left: 12px; top: 9px; color: var(--faint); } .dollar-wrap input { padding-left: 24px; }
.section-block { background: #fff; border-radius: 16px; padding: 18px 20px; }
.section-block > h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }

/* timeline / activity */
.tl-item { display: flex; gap: 11px; padding: 11px 0; border-top: 1px solid var(--line2); }
.tl-item:first-child { border-top: none; }
.tl-item .ic { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: 0 0 34px; background: rgba(0,0,0,0.04); }
.tl-item .ic svg { width: 17px; height: 17px; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tl-item .t { font-size: 13.5px; font-weight: 600; } .tl-item .m { color: var(--faint); font-size: 12.5px; margin-top: 2px; }
.tl-item .tm { margin-left: auto; font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.dwr-deal-card { background: #fff; border-radius: 14px; padding: 14px 16px; border-left: 3px solid var(--blue); display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.composer { width: 100%; min-height: 62px; border: 1px solid rgba(0,0,0,0.14); border-radius: 12px; padding: 12px; font-family: inherit; font-size: 13.5px; resize: vertical; }
.composer:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,113,227,0.12); }

/* ── projects ── */
.psection { margin-bottom: 26px; }
.psec-h { display: flex; align-items: center; gap: 11px; margin: 6px 2px 14px; }
.psec-ic { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex: 0 0 34px; }
.psec-ic.d { background: rgba(29,138,82,.12); color: #1d8a52; } .psec-ic.i { background: rgba(0,0,0,.05); color: #6e6e73; }
.psec-t { font-size: 15.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; } .psec-s { font-size: 12.5px; color: var(--faint); margin-top: 1px; }
.projcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; }
.projcard { background: var(--card); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; gap: 16px; transition: box-shadow .15s; }
.projcard:hover { box-shadow: 0 1px 2px rgba(0,0,0,0.06),0 14px 40px rgba(0,0,0,0.09); }
.projcard .tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.projcard .pn { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.projcard .pmeta { color: var(--faint); font-size: 12.5px; margin-top: -8px; }
.tag { font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: rgba(0,0,0,0.05); color: var(--muted); }
.tag.unit { font-weight: 700; }
.acct-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted); max-width: 140px; }
.acct-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-chip svg { width: 11px; height: 11px; stroke: var(--faint); fill: none; stroke-width: 1.8; flex: 0 0 11px; }
.prog-h { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.prog-h b { font-weight: 600; color: var(--ink); }
.prog { height: 7px; border-radius: 5px; background: rgba(0,0,0,0.06); overflow: hidden; } .prog > div { height: 100%; border-radius: 5px; }
.ministats { display: flex; gap: 8px; border-top: 1px solid var(--hair); padding-top: 15px; }
.ministats > div { flex: 1; } .ministats .sv { font-size: 18px; font-weight: 600; } .ministats .sl { font-size: 11px; color: var(--faint); }
.teamrow { display: flex; align-items: center; }
.tavatar { width: 27px; height: 27px; border-radius: 50%; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 10px; font-weight: 600; margin-left: -7px; }
.tavatar:first-child { margin-left: 0; }
.riskdot { width: 9px; height: 9px; border-radius: 50%; margin-left: auto; }
/* milestone rows */
.mgroup-h { display: flex; align-items: center; gap: 11px; padding: 11px 0; cursor: pointer; }
.mcheck { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #d2d2d7; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; flex: 0 0 20px; }
.mcheck.on { background: var(--green); border-color: var(--green); }
.mrow { display: flex; align-items: center; gap: 11px; padding: 9px 0 9px 31px; }
.mrow .cb { width: 19px; height: 19px; border-radius: 6px; border: 1.6px solid #d2d2d7; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; flex: 0 0 19px; cursor: pointer; }
.mrow .cb.on { background: var(--blue); border-color: var(--blue); }
.mrow .mn { flex: 1; font-size: 13px; } .mrow.done .mn { color: #c7c7cc; text-decoration: line-through; }
.mrow .md { font-size: 11.5px; color: var(--faint); }
.linkbox { display: flex; align-items: center; gap: 11px; background: #f5f5f7; border-radius: 12px; padding: 10px 13px; }
.linkbox .tile { width: 30px; height: 30px; border-radius: 8px; background: #e3e8f0; color: var(--blue); display: flex; align-items: center; justify-content: center; flex: 0 0 30px; }

/* reports */
.band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.bandcard { background: #fff; border-radius: 16px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(0,0,0,0.04),0 8px 24px rgba(0,0,0,0.03); border-left: 3px solid var(--blue); }
.bandcard .l { font-size: 12px; color: var(--faint); margin-bottom: 6px; } .bandcard .v { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.stacked-row { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.stacked-row .sn { width: 92px; font-size: 12.5px; font-weight: 500; flex: 0 0 92px; }
.stacked-bar { flex: 1; height: 24px; border-radius: 7px; background: rgba(0,0,0,0.04); overflow: hidden; display: flex; }
.stacked-bar > div { height: 100%; }
.stacked-row .st { width: 64px; text-align: right; font-size: 12.5px; color: var(--muted); flex: 0 0 64px; }
.legend { display: flex; gap: 14px; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); } .legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--hair); }
.lb-row:first-child { border-top: none; }
.lb-row .a { width: 30px; height: 30px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex: 0 0 30px; }
.lb-row .nm { font-size: 13.5px; font-weight: 500; width: 130px; }
.lb-row .b { flex: 1; height: 5px; border-radius: 3px; background: rgba(0,0,0,0.06); overflow: hidden; } .lb-row .b > div { height: 100%; background: var(--blue); }
.lb-row .v { font-size: 14px; font-weight: 600; width: 70px; text-align: right; } .lb-row .s { font-size: 11px; color: var(--faint); width: 96px; text-align: right; }
.actbars { display: flex; align-items: flex-end; gap: 10px; height: 128px; margin-top: 10px; }
.actbars .ab { flex: 1; background: linear-gradient(180deg,#0a84ff,#0071e3); border-radius: 7px 7px 3px 3px; min-height: 4px; }

/* tasks */
.taskwrap { max-width: 840px; }
.tgroup { margin-bottom: 22px; }
.tgroup-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tgroup-h .gd { width: 8px; height: 8px; border-radius: 50%; }
.tgroup-h .gn { font-size: 15px; font-weight: 600; letter-spacing: -.01em; } .tgroup-h .gc { font-size: 12.5px; color: var(--faint); }
.taskcard { background: #fff; border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.trow { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid rgba(0,0,0,0.05); }
.trow:first-child { border-top: none; }
.trow .cb { width: 22px; height: 22px; border-radius: 7px; border: 1.6px solid #d2d2d7; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; cursor: pointer; flex: 0 0 22px; }
.trow .cb.on { background: var(--blue); border-color: var(--blue); }
.trow .tn { flex: 1; font-size: 14px; font-weight: 500; letter-spacing: -.01em; } .trow.done .tn { color: #c7c7cc; text-decoration: line-through; }
.trow .tp { font-size: 12px; color: var(--faint); } .trow .tu { font-size: 10.5px; font-weight: 700; width: 26px; } .trow .td { font-size: 12.5px; color: var(--faint); width: 86px; text-align: right; }

/* settings */
.settings { display: grid; grid-template-columns: 236px 1fr; gap: 26px; align-items: start; max-width: 1080px; }
.set-rail .sg { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); margin: 14px 6px 6px; }
.set-rail button { display: block; width: 100%; text-align: left; border: none; background: none; padding: 9px 13px; border-radius: 10px; font-size: 13.5px; color: var(--sec); cursor: pointer; }
.set-rail button.on { background: #fff; color: var(--blue); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.set-content h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 16px; }
.set-panel { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 16px; }
.fx-row, .tg-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line2); }
.fx-row:first-child, .tg-row:first-child { border-top: none; }
.fx-row .cur { width: 60px; font-weight: 600; } .fx-row .usd { color: var(--faint); font-size: 13px; }
.fx-input { width: 140px; padding: 8px 11px; border: 1px solid rgba(0,0,0,0.14); border-radius: 9px; font-size: 13.5px; font-family: inherit; }
.fx-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,113,227,0.12); }
.tg-row .sq { width: 10px; height: 10px; border-radius: 3px; } .tg-row .k { font-weight: 600; width: 130px; } .tg-row .ach { color: var(--faint); font-size: 13px; flex: 1; }
.tg-bar { width: 120px; height: 8px; border-radius: 5px; background: rgba(0,0,0,0.06); overflow: hidden; } .tg-bar > div { height: 100%; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line2); }
.member-row:first-child { border-top: none; }
.member-row .a { width: 36px; height: 36px; border-radius: 50%; background: #e8e8ed; color: var(--sec); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; }
.member-row .nm { font-size: 14px; font-weight: 500; } .member-row .em { font-size: 12px; color: var(--faint); }
.rolebadge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 6px; margin-left: auto; }

.loading { color: var(--muted); padding: 50px; text-align: center; }
.empty { color: var(--muted); padding: 26px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; font-size: 13px; }
/* ── login gate ── */
.login-screen { position: fixed; inset: 0; background: var(--bg); align-items: center; justify-content: center; z-index: 100; display: none; }
body.login .login-screen { display: flex; }
body:not(.authed) .app { display: none; }
.login-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 30px; width: 360px; max-width: 92vw; display: flex; flex-direction: column; gap: 12px; }
.login-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; }
.login-brand .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--blue); }
.login-card h2 { margin: 6px 0 0; font-size: 20px; font-weight: 600; }
.login-card input { padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; font-family: inherit; }
.login-card input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,113,227,.12); }
.login-err { color: var(--red); font-size: 13px; min-height: 16px; }
.userfoot .logout { margin-left: auto; background: none; border: none; color: var(--muted); font-size: 16px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.userfoot .logout:hover { background: #f0f0f3; }
.save-bar { position: sticky; bottom: 0; display: none; align-items: center; gap: 12px; background: #fff; border-top: 1px solid var(--line); padding: 14px 0 4px; margin-top: 6px; }
.save-bar.on { display: flex; }
.save-bar span { flex: 1; font-size: 13px; color: var(--amber); font-weight: 600; }
.btn-ghost { background: #f0f0f3; color: var(--ink); border: none; padding: 9px 15px; border-radius: 9px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.burger { display: none; background: none; border: none; font-size: 20px; color: var(--sec); cursor: pointer; padding: 4px 6px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #1d1d1f; color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .25s; z-index: 80; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── responsive ── */
@media (max-width: 1100px) { .grid3 { grid-template-columns: 1fr; } .fstrip { grid-template-columns: 1fr 1fr; } .rollups { grid-template-columns: 1fr 1fr; } .band { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 244px; z-index: 60; transform: translateX(-100%); transition: transform .24s cubic-bezier(.4,0,.2,1); box-shadow: 2px 0 24px rgba(0,0,0,.14); }
  .sidebar.open { transform: translateX(0); }
  .burger { display: inline-block; }
  .grid2 { grid-template-columns: 1fr; }
  .search { display: none; }
  .topbar { padding: 0 16px; gap: 10px; } .topbar .right .sync { display: none; }
  main#view { padding: 18px 16px 70px; }
  .stagecards { grid-template-columns: repeat(5, minmax(120px,1fr)); overflow-x: auto; }
  .dcs-h, .dcs-r { grid-template-columns: 1.6fr 1fr 1fr; } .dcs-h span:nth-child(4), .dcs-r > *:nth-child(4) { display: none; }
  .settings { grid-template-columns: 1fr; } .set-rail { display: flex; flex-wrap: wrap; gap: 6px; }
  .tablewrap { overflow-x: auto; } .tablewrap table { min-width: 640px; }
  .acct-grid { min-width: 720px; }
}
@media (max-width: 600px) {
  .fstrip { grid-template-columns: 1fr; } .rollups { grid-template-columns: 1fr 1fr; } .band { grid-template-columns: 1fr; }
  .drawer { width: 100vw; } .minikpis { grid-template-columns: 1fr; }
  .projcards { grid-template-columns: 1fr; }
}

/* ── Leads pipeline (Lead → Account journey) ── */
.subtabs { display: flex; align-items: flex-end; border-bottom: 1px solid var(--line); margin: 4px 0 20px; }
.subtabs button { background: none; border: none; padding: 9px 2px; margin-right: 26px; font-size: 14.5px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 8px; }
.subtabs button.on { color: var(--blue); border-bottom-color: var(--blue); }
.subtabs button.on .cnt-pill { background: rgba(0,113,227,0.1); color: var(--blue); }
.lpboard { display: flex; gap: 16px; overflow-x: auto; padding: 2px 2px 16px; align-items: stretch; min-height: 320px; }
.lpcol { background: rgba(0,0,0,0.025); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 11px; min-width: 290px; width: 290px; flex: 0 0 auto; max-height: calc(100vh - 250px); transition: background .12s, box-shadow .12s; }
.lpcol.over { background: rgba(0,113,227,0.07); box-shadow: inset 0 0 0 2px rgba(0,113,227,0.35); }
.lpcol.over .lpcol-b::after { content: 'Drop here'; display: block; text-align: center; color: var(--blue); font-size: 12.5px; font-weight: 600; padding: 14px 0; border: 1.5px dashed rgba(0,113,227,0.4); border-radius: 12px; }
.lpcol-h { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; padding: 2px 2px 0; flex: 0 0 auto; }
.lpcol-h .cv { margin-left: auto; font-size: 11.5px; color: var(--faint); font-weight: 600; }
.lpcol-b { display: flex; flex-direction: column; gap: 11px; flex: 1 1 auto; min-height: 80px; overflow-y: auto; padding-right: 2px; }
.lpcard { background: #fff; border-radius: 14px; padding: 15px 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 6px 18px rgba(0,0,0,0.05); cursor: grab; display: flex; flex-direction: column; gap: 10px; border-left: 4px solid var(--blue); }
.lpcard:active { cursor: grabbing; }
.lpcard.dragging { opacity: .45; }
.lpcard .lp-t { font-size: 15px; font-weight: 650; letter-spacing: -.01em; line-height: 1.25; }
.lpcard .lp-sub { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.lpcard .lp-sub svg { width: 14px; height: 14px; fill: none; stroke: var(--faint); stroke-width: 1.8; flex: 0 0 auto; }
.lpcard .lp-mid { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
.lpcard .lp-stage { color: var(--faint); }
.lpcard .lp-amt { font-weight: 700; font-size: 15px; }
.lpcard .lp-prog { height: 6px; border-radius: 6px; background: rgba(0,0,0,0.07); overflow: hidden; }
.lpcard .lp-prog > div { height: 100%; border-radius: 6px; }
.lpcard .lp-foot { display: flex; align-items: center; justify-content: space-between; }
.lpcard .lp-src { font-size: 11.5px; font-weight: 600; color: var(--muted); background: rgba(0,0,0,0.05); padding: 4px 10px; border-radius: 20px; }
.lpempty { color: var(--faint); font-size: 12.5px; text-align: center; padding: 14px 0; }
@media (max-width: 760px) { .lpcol { min-width: 82vw; width: 82vw; } }

/* ── Settings: Fields & Picklists editor ── */
.fld-head { display: grid; grid-template-columns: 1fr 76px 76px 124px; align-items: center; gap: 8px; padding: 0 2px 8px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.fld-head .ctr { text-align: center; }
.fld-row { display: grid; grid-template-columns: 1fr 76px 76px 124px; align-items: center; gap: 8px; padding: 10px 2px; border-top: 1px solid var(--line2); }
.fld-row .ctr { display: flex; justify-content: center; }
.fld-main { min-width: 0; }
.fld-l { display: flex; align-items: center; gap: 8px; }
.fld-label { font-size: 13.5px; font-weight: 600; border: 1px solid transparent; border-radius: 8px; padding: 5px 8px; background: transparent; max-width: 230px; }
.fld-label:hover { border-color: var(--line); }
.fld-label:focus { border-color: var(--blue); background: #fff; outline: none; }
.fld-type { font-size: 11px; color: var(--muted); background: rgba(0,0,0,0.05); padding: 2px 8px; border-radius: 20px; }
.tag.sys { background: rgba(0,0,0,0.05); color: #86868b; }
.tag.cust { background: rgba(0,113,227,0.1); color: #0071e3; }
.tgl { width: 38px; height: 22px; border-radius: 20px; background: #d7d7db; position: relative; cursor: pointer; transition: background .15s; flex: 0 0 auto; }
.tgl::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform .15s; }
.tgl.on { background: var(--green, #34c759); }
.tgl.on::after { transform: translateX(16px); }
.fld-act { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.iconbtn.sm { width: 28px; height: 28px; min-width: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; border-radius: 8px; background: #f0f0f2; color: #3a3a3c; border: none; cursor: pointer; }
.iconbtn.sm:hover { background: #e6e6eb; }
.iconbtn.sm:disabled { opacity: .35; cursor: default; }
.iconbtn.sm.danger { color: #c0392b; }
.iconbtn.sm.danger:hover { background: rgba(192,57,43,0.1); }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.fld-opts { grid-column: 1 / -1; margin: 8px 0 2px; padding: 12px; background: rgba(0,0,0,0.025); border-radius: 12px; }
.opt-list { display: flex; flex-direction: column; gap: 7px; }
.opt-row { display: flex; align-items: center; gap: 8px; }
.opt-row.off { opacity: .5; }
.opt-color { width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; flex: 0 0 auto; }
.opt-label { flex: 1; min-width: 80px; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; background: #fff; }
.opt-prob { width: 58px; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fff; }
.opt-kind { width: 84px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 6px; background: #fff; }
.opt-mv { display: flex; gap: 3px; }
.opt-add { display: flex; gap: 8px; margin-top: 4px; }
.opt-add input { flex: 1; min-width: 80px; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: #fff; }
@media (max-width: 600px) { .fld-head { display: none; } .fld-row { grid-template-columns: 1fr auto; } .fld-row .ctr { justify-content: flex-start; } }
.cat-stat { display: flex; gap: 36px; }
.cat-stat .v { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.cat-stat .l { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── Quotes: deal tab list ── */
.qlist { display: flex; flex-direction: column; gap: 8px; }
.qrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--line2); border-radius: 12px; cursor: pointer; transition: box-shadow .12s, border-color .12s; }
.qrow:hover { border-color: var(--line); box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.qrow .qn { font-weight: 650; font-size: 14px; }
.qrow .qtot { font-weight: 700; font-size: 14px; }
.qstatus { font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 20px; text-transform: capitalize; background: rgba(0,0,0,0.05); color: var(--muted); }
.qstatus.draft { background: rgba(0,0,0,0.06); color: #6e6e73; }
.qstatus.sent { background: rgba(0,113,227,0.12); color: #0071e3; }
.qstatus.accepted { background: rgba(29,138,82,0.13); color: #1d8a52; }
.qstatus.rejected { background: rgba(255,59,48,0.12); color: #c0392b; }

/* ── Quote builder ── */
.dwr-back { width: 34px; height: 34px; min-width: 34px; border: none; background: #f0f0f2; border-radius: 10px; font-size: 22px; line-height: 1; color: #3a3a3c; cursor: pointer; }
.dwr-back:hover { background: #e6e6eb; }
.qstat-sel { font-size: 12px; font-weight: 600; border: 1px solid var(--line); border-radius: 20px; padding: 4px 10px; background: #fff; text-transform: capitalize; cursor: pointer; }
.qstat-sel.sent { background: rgba(0,113,227,0.1); color: #0071e3; border-color: transparent; }
.qstat-sel.accepted { background: rgba(29,138,82,0.12); color: #1d8a52; border-color: transparent; }
.qstat-sel.rejected { background: rgba(255,59,48,0.1); color: #c0392b; border-color: transparent; }
.drawer.wide { width: 680px; max-width: 96vw; }
.qtable-wrap { overflow-x: auto; margin: 0 -2px 12px; }
.qtable { width: 100%; border-collapse: collapse; margin-bottom: 12px; min-width: 540px; }
.qtable th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--faint); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.qtable th.num, .qtable td.num { text-align: right; }
.qtable td { padding: 6px 8px; border-bottom: 1px solid var(--line2); font-size: 13px; vertical-align: middle; }
.qcode { font-size: 11.5px; font-weight: 600; color: var(--muted); background: rgba(0,0,0,0.05); padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
.qcell { border: 1px solid transparent; border-radius: 7px; padding: 5px 7px; font-size: 13px; background: transparent; width: 100%; }
.qcell:hover { border-color: var(--line); } .qcell:focus { border-color: var(--blue); background: #fff; outline: none; }
.qcell.qnum { width: 92px; text-align: right; } .qcell.qqty { width: 64px; text-align: right; } .qdesc { min-width: 120px; }
.qnet { font-weight: 600; white-space: nowrap; }
.qcatalog { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.qsearch { position: relative; }
.qsearch svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: none; stroke: var(--faint); stroke-width: 2; pointer-events: none; }
.qsearch input { width: 100%; padding: 10px 12px 10px 36px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; background: #fff; }
.qresults { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,0.12); z-index: 30; max-height: 320px; overflow-y: auto; display: none; }
.qresults.on { display: block; }
.qres { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 13px; cursor: pointer; border-bottom: 1px solid var(--line2); }
.qres:hover { background: rgba(0,113,227,0.06); }
.qres.empty { color: var(--faint); cursor: default; justify-content: center; }
.qres-c { font-size: 12.5px; font-weight: 600; }
.qres-d { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.qres-p { font-size: 13px; font-weight: 600; white-space: nowrap; }
.qtotals { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.qt-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 2px; font-size: 14px; }
.qt-row.total { font-size: 17px; font-weight: 700; margin-top: 4px; }
.btn-ghost.danger { color: #c0392b; }
.tag.kanban { background: rgba(0,113,227,0.1); color: #0071e3; }
.iconbtn.sm.kbon { background: #0071e3; color: #fff; }
.iconbtn.sm.kbon:hover { background: #0064cf; }

/* ── Projects: milestones + tasks ── */
.pms { background: rgba(0,0,0,0.025); border-radius: 14px; padding: 12px 12px 10px; margin-bottom: 12px; }
.pms-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pms-ic { color: #0071e3; font-size: 12px; flex: 0 0 auto; }
.pms-name { flex: 1; min-width: 60px; font-size: 14px; font-weight: 650; border: 1px solid transparent; border-radius: 8px; padding: 5px 7px; background: transparent; }
.pms-name:hover { border-color: var(--line); } .pms-name:focus { border-color: var(--blue); background: #fff; outline: none; }
.pms-tasks { display: flex; flex-direction: column; gap: 4px; }
.pms-add { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.pms-add .field-edit { padding: 7px 9px; font-size: 13px; }
.ptask { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 9px; }
.ptask:hover { background: rgba(0,0,0,0.03); }
.ptask .cb { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; border: 1.6px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; cursor: pointer; color: #fff; }
.ptask .cb.on { background: #1d8a52; border-color: #1d8a52; }
.ptask-name { flex: 1; min-width: 60px; font-size: 13.5px; border: 1px solid transparent; border-radius: 7px; padding: 5px 7px; background: transparent; }
.ptask-name:hover { border-color: var(--line); } .ptask-name:focus { border-color: var(--blue); background: #fff; outline: none; }
.ptask.done .ptask-name { text-decoration: line-through; color: var(--faint); }
.ptask-due { width: 132px; flex: 0 0 auto; font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; background: #fff; color: var(--muted); }
.ptask-due.over { border-color: #ff3b30; color: #c0392b; }
.ptask-owner { width: 120px; flex: 0 0 auto; font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 6px; background: #fff; }
@media (max-width: 640px) { .ptask { flex-wrap: wrap; } .ptask-due, .ptask-owner { width: auto; flex: 1; } }
/* milestone → subtask sequential timeline */
.ptimeline { position: relative; margin: 4px 0 6px; }
.pnode { position: relative; padding-left: 36px; padding-bottom: 16px; }
.pnode::before { content: ''; position: absolute; left: 14px; top: 7px; bottom: 0; width: 2px; background: var(--line); }
.pnode:last-child::before { display: none; }
.pnode-dot { position: absolute; left: 3px; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); color: var(--blue); font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; z-index: 1; }
.pnode.done .pnode-dot { background: #1d8a52; border-color: #1d8a52; color: #fff; }
.pnode-dot.gen { border-color: var(--line); color: var(--faint); font-size: 18px; }
.pnode-body { background: rgba(0,0,0,0.03); border-radius: 12px; padding: 10px 12px; }
.pnode .pms-h { margin-bottom: 6px; }
.pnode-body .ptask { gap: 7px; padding: 2px 5px; }
.pnode-body .ptask .cb { width: 17px; height: 17px; font-size: 10px; border-radius: 5px; }
.pnode-body .ptask-name { font-size: 12px; }
.pnode-body .ptask-due { width: 116px; font-size: 11.5px; padding: 4px 6px; }
.pnode-body .ptask-owner { width: 104px; font-size: 11.5px; padding: 4px 5px; }
.pnode .pms-add .field-edit, .pnode .pms-add .btn { font-size: 12.5px; }
/* Projects nav accent (green) */
.nav a[data-k="projects"] svg { stroke: #1d8a52; }
.nav a[data-k="projects"]:hover { background: rgba(29,138,82,0.08); }
.nav a[data-k="projects"].active { color: #1d8a52; }
.nav a[data-k="projects"].active svg { stroke: #1d8a52; }

/* ── milestone timeline v2 (polished) ── */
.ptimeline { position: relative; margin: 6px 0 6px; }
.pnode { position: relative; padding-left: 42px; padding-bottom: 18px; }
.pnode::before { content: ''; position: absolute; left: 16px; top: 8px; bottom: -4px; width: 2px; background: linear-gradient(var(--line), var(--line)); }
.pnode:last-child::before { display: none; }
.pnode-dot { position: absolute; left: 2px; top: 4px; width: 30px; height: 30px; border-radius: 50%; border: none; background: conic-gradient(#1d8a52 calc(var(--pct,0)*1%), #e3e3e8 0); display: flex; align-items: center; justify-content: center; z-index: 1; }
.pnode-dot::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: #fff; }
.pnode-dot span { position: relative; z-index: 1; font-size: 12px; font-weight: 700; color: #6e6e73; }
.pnode.done .pnode-dot { background: #1d8a52; }
.pnode.done .pnode-dot::after { display: none; }
.pnode.done .pnode-dot span { color: #fff; }
.pnode-dot.gen { background: #fff; border: 2px dashed var(--line); }
.pnode-dot.gen::after { display: none; }
.pnode-dot.gen span { color: var(--faint); font-size: 17px; }
.pnode-body { background: #fff; border: 1px solid var(--line2); border-radius: 14px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 20px rgba(0,0,0,0.05); }
.pnode-top { display: flex; align-items: center; gap: 8px; }
.pnode-top .pms-name { flex: 1; min-width: 50px; font-size: 14.5px; font-weight: 650; border: 1px solid transparent; border-radius: 8px; padding: 4px 8px; background: transparent; letter-spacing: -.01em; }
.pnode-top .pms-name:hover { border-color: var(--line); } .pnode-top .pms-name:focus { border-color: var(--blue); background: #fff; outline: none; }
.pnode-meta { display: flex; align-items: center; gap: 9px; margin: 6px 0 10px; flex-wrap: wrap; padding-left: 8px; }
.mini-prog { width: 96px; height: 6px; border-radius: 6px; background: rgba(0,0,0,0.08); overflow: hidden; }
.mini-prog > div { height: 100%; background: #1d8a52; border-radius: 6px; transition: width .2s; }
.frac { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.duepill { position: relative; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--muted); background: rgba(0,0,0,0.05); padding: 4px 10px; border-radius: 20px; cursor: pointer; }
.duepill svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.duepill.set { color: #3a3a3c; }
.duepill.soon { color: #b06a00; background: rgba(224,134,0,0.13); }
.duepill.over { color: #c0392b; background: rgba(255,59,48,0.12); }
.duepill input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.duepill.sm { font-size: 11px; padding: 3px 9px; }
.assignee { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.assignee .tavatar { width: 27px; height: 27px; font-size: 10.5px; margin: 0; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.assignee.sm .tavatar { width: 23px; height: 23px; font-size: 9.5px; }
.assign-empty { width: 27px; height: 27px; border-radius: 50%; border: 1.5px dashed #c7c7cc; color: var(--faint); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.assignee.sm .assign-empty { width: 23px; height: 23px; font-size: 14px; }
.assignee select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.pnode-body .ptask, .pnode-gen .ptask { gap: 8px; padding: 5px 6px; border-radius: 9px; }
.pnode-body .ptask:hover, .pnode-gen .ptask:hover { background: rgba(0,0,0,0.035); }
.pnode-body .ptask-name { font-size: 12.5px; }
.ptask-del { opacity: 0; transition: opacity .12s; }
.ptask:hover .ptask-del { opacity: 1; }
.pms-none { font-size: 11.5px; color: var(--faint); padding: 3px 0 6px 6px; }

/* ── Appearance + create forms ── */
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.22); }
.swatch.on { box-shadow: 0 0 0 3px rgba(0,0,0,0.18); }
body.compact { font-size: 13px; }
body.compact .card, body.compact .kpi, body.compact .panel, body.compact .set-panel { padding: 13px !important; }
body.compact .acct-r, body.compact tbody td { padding-top: 7px !important; padding-bottom: 7px !important; }
.cf-in { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font-size: 13.5px; background: #fff; }
.cf-in:focus { border-color: var(--blue); outline: none; }
.cf-acct { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px 9px 34px; font-size: 13.5px; background: #fff; }

/* ── user emoji avatars + profile picker ── */
.av-emoji { background: #eef0f3 !important; color: inherit !important; line-height: 1; }
.userfoot .ava.av-emoji { font-size: 18px; }
.av.av-emoji { font-size: 15px; }
.tavatar.av-emoji { font-size: 15px; }
.member-row .a.av-emoji { font-size: 21px; }
.prof-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.prof-head .ava { width: 56px; height: 56px; border-radius: 50%; background: #e8e8ed; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; flex: 0 0 56px; }
.prof-head .ava.av-emoji { font-size: 32px; }
.prof-head .em { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.ava-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; }
.ava-opt { width: 46px; height: 46px; border-radius: 12px; border: 1.5px solid var(--line2); background: #fff; font-size: 24px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color .12s; }
.ava-opt:hover { border-color: var(--blue); }
.ava-opt.on { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(0,113,227,0.25); }
.ava-opt.initials { font-size: 14px; font-weight: 700; color: var(--muted); background: #f4f4f6; }

/* image (illustrated) avatars + description textarea */
.av-img { position: relative; overflow: hidden; }
.av-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ava-opt.real { padding: 0; overflow: hidden; background: #f4f4f6; }
.ava-opt.real img { width: 100%; height: 100%; object-fit: cover; }
textarea.field-edit { resize: vertical; min-height: 64px; font-family: inherit; line-height: 1.45; width: 100%; }
.frow-area { align-items: flex-start; }
.frow-area .fk { padding-top: 7px; }

/* ── customizable KPI widget grid ── */
.krow { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.wcust { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 6px 14px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.wcust:hover { background: #f4f4f6; }
.wcust.on { background: var(--blue); color: #fff; border-color: transparent; }
.wgrid { display: grid; gap: 14px; align-items: stretch; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 24px; }
.witem { position: relative; min-width: 0; }
.witem > .kpi, .witem > .bandcard { height: 100%; }
.wgrid.editing .witem { outline: 1.5px dashed var(--line2); outline-offset: -1px; border-radius: 16px; cursor: grab; }
.wgrid.editing .witem:hover { outline-color: var(--blue); }
.wgrid.editing .witem > *:not(.wctl) { pointer-events: none; }
.witem.wdragging { opacity: .4; }
.witem.wover { outline: 2px solid var(--blue) !important; }
.wctl { position: absolute; top: 7px; right: 7px; display: flex; align-items: center; gap: 4px; z-index: 3; }
.wctl .wdrag { cursor: grab; color: var(--faint); font-size: 13px; padding: 0 2px; }
.wbtn { width: 24px; height: 24px; border: none; border-radius: 7px; background: rgba(255,255,255,0.95); box-shadow: 0 1px 3px rgba(0,0,0,0.18); color: #3a3a3c; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.wbtn:hover { background: #fff; }
.wbtn.danger { color: #c0392b; }
.wtray { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; padding: 10px 14px; background: rgba(0,113,227,0.05); border: 1px dashed rgba(0,113,227,0.25); border-radius: 12px; }
.wtray-l { font-size: 12px; font-weight: 700; color: var(--muted); }
.wchip { border: 1px dashed var(--line); background: #fff; border-radius: 20px; padding: 5px 12px; font-size: 12px; font-weight: 600; color: var(--blue); cursor: pointer; }
.wchip:hover { background: rgba(0,113,227,0.06); }
.wreset { margin-left: auto; border: none; background: none; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; }

/* ── notification center (bell) ── */
.notif-wrap { position: relative; }
.bell { position: relative; border: none; }
.bell.on { background: rgba(0,113,227,0.12); }
.bell-badge { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px; background: #ff3b30; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #f5f5f7; }
.notif-panel { position: absolute; top: calc(100% + 8px); right: 0; width: 340px; max-width: 90vw; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.18); z-index: 60; display: none; max-height: 72vh; overflow-y: auto; }
.notif-panel.on { display: block; }
.notif-top { font-size: 13px; font-weight: 700; padding: 13px 14px 6px; position: sticky; top: 0; background: #fff; }
.notif-sec { padding: 2px 0 6px; }
.notif-h { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); padding: 6px 14px; }
.notif-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 14px; cursor: pointer; }
.notif-item:hover { background: rgba(0,0,0,0.03); }
.ndot { width: 8px; height: 8px; border-radius: 50%; background: #e08600; margin-top: 5px; flex: 0 0 auto; }
.ndot.over { background: #ff3b30; }
.notif-item .nt { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-item .nm { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-empty { padding: 24px 14px; text-align: center; color: var(--muted); font-size: 13px; }
.notif-all { display: block; padding: 11px 14px; border-top: 1px solid var(--line2); color: var(--blue); font-size: 12.5px; font-weight: 600; text-align: center; position: sticky; bottom: 0; background: #fff; }

/* related entity chips (tasks + notifications) */
.relchip { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: rgba(0,113,227,0.1); color: #0071e3; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relchip.alt { background: rgba(29,138,82,0.1); color: #1d8a52; }
.trow .tp { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-width: 0; }
.notif-item .nm { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; white-space: normal; overflow: visible; }
.notif-item .nm .relchip { font-size: 10.5px; padding: 1px 7px; }

/* ── ⌘K command palette ── */
.cmdk-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.32); z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding-top: 11vh; }
.cmdk-scrim[hidden] { display: none; }
.cmdk { width: min(620px, 92vw); background: var(--card); border-radius: 14px; box-shadow: 0 24px 70px rgba(0,0,0,.32); overflow: hidden; }
.cmdk-top { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line2); }
.cmdk-top svg { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; }
.cmdk-top input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--ink); font-family: var(--font); }
.cmdk-esc { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; }
.cmdk-results { max-height: 56vh; overflow-y: auto; padding: 6px; }
.cmdk-hint { padding: 22px; text-align: center; color: var(--muted); font-size: 13px; }
.cmdk-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; cursor: pointer; }
.cmdk-item.sel { background: var(--line2); }
.cmdk-tag { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; padding: 3px 0; border-radius: 6px; background: var(--line); color: var(--sec); flex: none; width: 66px; text-align: center; }
.cmdk-tag.t-accounts { background: rgba(0,113,227,.12); color: var(--blue); }
.cmdk-tag.t-deals { background: rgba(29,138,82,.12); color: var(--green); }
.cmdk-tag.t-contacts { background: rgba(94,92,230,.12); color: var(--purple); }
.cmdk-tag.t-leads { background: rgba(224,134,0,.14); color: var(--amber); }
.cmdk-tag.t-projects { background: rgba(20,153,166,.14); color: var(--teal); }
.cmdk-title { font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-sub { font-size: 12px; color: var(--muted); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 44%; }

/* ── activity composer + follow-ups ── */
.act-composer { background: var(--bg); border: 1px solid var(--line2); border-radius: 12px; padding: 12px; margin-bottom: 16px; }
.act-types { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.act-type { font-size: 12.5px; font-weight: 500; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; }
.act-type.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.act-composer .composer { width: 100%; min-height: 58px; resize: vertical; }
.act-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 10px; }
.act-due { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.act-due input { font-size: 12.5px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; font-family: var(--font); }
.due-pill { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.due-pill.soon { background: rgba(224,134,0,.14); color: var(--amber); }
.due-pill.over { background: rgba(192,57,43,.12); color: var(--red); }
.tl-item.open { background: rgba(224,134,0,.06); border-radius: 8px; padding: 6px; margin: 2px -6px; }
.act-done { font-size: 12px; font-weight: 600; color: var(--green); background: rgba(29,138,82,.1); border: 0; border-radius: 7px; padding: 5px 10px; cursor: pointer; white-space: nowrap; align-self: center; }
.act-done:hover { background: rgba(29,138,82,.18); }

/* saved-view delete + palette group headers / pin */
.vchip-x { margin-left: 6px; opacity: .5; font-weight: 600; padding: 0 2px; border-radius: 4px; }
.vchip-x:hover { opacity: 1; background: rgba(192,57,43,.14); color: var(--red); }
.cmdk-grp { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--faint); padding: 10px 12px 4px; }
.cmdk-pin { margin-left: auto; border: 0; background: transparent; color: var(--place); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px; opacity: 0; flex: none; }
.cmdk-item:hover .cmdk-pin, .cmdk-item.sel .cmdk-pin, .cmdk-pin.on { opacity: 1; }
.cmdk-pin.on { color: var(--amber); }
.cmdk-item .cmdk-sub { margin-left: auto; }
.cmdk-item .cmdk-pin + .cmdk-sub, .cmdk-item:has(.cmdk-pin) .cmdk-sub { margin-left: 0; }

/* ── Rooms (team coordination) ── */
.roomgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.roomcard { background: var(--card); border: 1px solid var(--line2); border-radius: 14px; padding: 16px; cursor: pointer; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s; }
.roomcard:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.roomcard-h { display: flex; align-items: center; gap: 11px; }
.room-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(20,153,166,.12); color: var(--teal); font-size: 17px; flex: none; }
.rc-name { font-weight: 650; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.rc-foot { margin-top: 14px; }
.rc-ava { display: flex; align-items: center; }
.rc-ava .a.sm { width: 26px; height: 26px; font-size: 10px; font-weight: 600; margin-left: -6px; border: 2px solid var(--card); border-radius: 50%; overflow: hidden; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.rc-ava .a.sm:first-child { margin-left: 0; }
.rc-more { font-size: 11px; color: var(--muted); margin-left: 6px; }
/* recurring task control */
.ptask-rec.on { color: var(--teal); }
.ptask-rec .rectag { font-size: 9px; font-weight: 700; margin-left: 1px; }

/* ── Room board (kanban inside the drawer) ── */
.kboard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kcol { background: var(--bg); border-radius: 12px; padding: 8px; min-height: 140px; display: flex; flex-direction: column; }
.kcol.over { outline: 2px dashed var(--blue); outline-offset: -2px; }
.kcol-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--sec); padding: 4px 6px 8px; }
.kcol-h .cnt-pill { margin-left: auto; }
.kdot { width: 8px; height: 8px; border-radius: 50%; }
.kcol-b { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.kcol-empty { font-size: 11px; color: var(--place); text-align: center; padding: 14px 0; border: 1px dashed var(--line); border-radius: 8px; }
.kcard { background: var(--card); border: 1px solid var(--line2); border-radius: 9px; padding: 9px 10px; box-shadow: var(--shadow-sm); cursor: grab; }
.kcard.dragging { opacity: .5; }
.kc-name { font-size: 12.5px; font-weight: 500; line-height: 1.35; }
.kc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; min-height: 22px; }
.kc-right { display: flex; align-items: center; gap: 5px; }
.kc-due { font-size: 10.5px; color: var(--muted); }
.kc-due.over { color: var(--red); font-weight: 600; }
.kc-rec { font-size: 11px; color: var(--teal); }
.kcard .tavatar { width: 22px; height: 22px; font-size: 9px; }
/* ── Room discussion ── */
.rdisc-compose { background: var(--bg); border: 1px solid var(--line2); border-radius: 12px; padding: 10px; margin-bottom: 14px; }
.rdisc-compose .composer { width: 100%; min-height: 56px; }
.rdisc-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.rment { display: flex; gap: 5px; flex-wrap: wrap; flex: 1; }
.rment-chip { font-size: 11.5px; color: var(--blue); background: rgba(0,113,227,.08); border: 0; border-radius: 6px; padding: 3px 7px; cursor: pointer; }
.rfeed { display: flex; flex-direction: column; gap: 12px; }
.rmsg { display: flex; gap: 10px; }
.rmsg-b { flex: 1; min-width: 0; }
.rmsg-h { display: flex; align-items: baseline; gap: 8px; }
.rmsg-h b { font-size: 13px; font-weight: 600; }
.rmsg-h .faint { font-size: 11px; }
.rmsg-t { font-size: 13px; color: var(--sec); margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.ment { color: var(--blue); font-weight: 600; }
/* ── Room templates bar ── */
.tpl-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }

/* ── Daily digest ── */
.dg-toggle { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--sec); cursor: pointer; line-height: 1.5; }
.dg-toggle input { margin-top: 3px; flex: none; width: 16px; height: 16px; }
.dg-frame { width: 100%; height: 540px; border: 1px solid var(--line2); border-radius: 12px; background: #fff; }

/* ── Room drawer: stylish, team-first ── */
.room-ava { background: rgba(20,153,166,.14) !important; color: var(--teal) !important; font-size: 19px; }
.room-tag { background: rgba(20,153,166,.12); color: var(--teal); }
.room-hero { display: flex; gap: 18px; align-items: center; background: var(--card); border: 1px solid var(--line2); border-radius: 16px; padding: 18px; box-shadow: var(--shadow-sm); }
.room-ring { width: 84px; height: 84px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--teal) calc(var(--pct) * 1%), var(--line) 0); }
.room-ring-in { width: 64px; height: 64px; border-radius: 50%; background: var(--card); display: grid; place-items: center; text-align: center; }
.room-ring-in b { font-size: 18px; font-weight: 700; line-height: 1; } .room-ring-in span { font-size: 10px; color: var(--muted); }
.room-hero-r { flex: 1; min-width: 0; }
.room-stats { display: flex; gap: 20px; margin-bottom: 12px; }
.room-stats div { display: flex; flex-direction: column; }
.room-stats b { font-size: 20px; font-weight: 700; line-height: 1; } .room-stats span { font-size: 11px; color: var(--muted); margin-top: 3px; }
.rt-avas { display: flex; align-items: center; flex-wrap: wrap; }
.rt-ava .a { width: 30px; height: 30px; font-size: 11px; font-weight: 600; margin-left: -6px; border: 2px solid var(--card); border-radius: 50%; overflow: hidden; flex: none; display: inline-flex; align-items: center; justify-content: center; } .rt-ava:first-child .a { margin-left: 0; }
.room-h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin: 24px 0 8px; font-weight: 600; }
.room-up { display: flex; flex-direction: column; gap: 6px; }
.room-up-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--card); border: 1px solid var(--line2); border-radius: 10px; }
.ru-name { flex: 1; font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ru-due { font-size: 11.5px; color: var(--muted); } .ru-due.over { color: var(--red); font-weight: 600; }
.room-allclear { color: var(--green); font-size: 13.5px; background: rgba(29,138,82,.07); border-radius: 10px; padding: 14px; }
.room-desc { font-size: 13.5px; color: var(--sec); line-height: 1.55; margin: 16px 0 0; white-space: pre-wrap; }
/* stylish checklist */
.rlists { display: flex; flex-direction: column; gap: 14px; }
.rlist { background: var(--card); border: 1px solid var(--line2); border-radius: 14px; overflow: hidden; }
.rlist-h { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line2); background: #fbfbfd; }
.rlist-name { flex: 1; border: 0; background: transparent; font-size: 14px; font-weight: 650; color: var(--ink); font-family: var(--font); padding: 2px 0; }
.rlist-name:focus { outline: none; }
.rlist-name.gen { color: var(--muted); }
.rlist-frac { font-size: 11.5px; color: var(--muted); background: var(--bg); border-radius: 20px; padding: 2px 9px; }
.rlist-body { padding: 4px 6px; }
.rlist-empty { font-size: 12px; color: var(--place); padding: 10px; }
.rtask { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; }
.rtask:hover { background: var(--bg); }
.rcheck { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--line); background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; }
.rcheck svg { width: 13px; height: 13px; stroke: #fff; fill: none; stroke-width: 3.5; opacity: 0; }
.rcheck.on { background: var(--green); border-color: var(--green); } .rcheck.on svg { opacity: 1; }
.rtask-name { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 13.5px; color: var(--ink); font-family: var(--font); padding: 3px 0; }
.rtask-name:focus { outline: none; }
.rtask.done .rtask-name { text-decoration: line-through; color: var(--place); }
.rtask-meta { display: flex; align-items: center; gap: 4px; flex: none; }
.rtask .rtask-del { opacity: 0; } .rtask:hover .rtask-del { opacity: 1; }
.rtask-add { display: flex; gap: 8px; padding: 8px; }
.rtask-add input { flex: 1; }
.rlist-newrow { display: flex; gap: 8px; margin-top: 14px; }
