:root {
  --brand: #AF272F;
  --accent: #8F1516;
  --charcoal: #545454;
  --ink: #262626;
  --ink-2: #454545;
  --muted: #767676;
  --line: #e4e4e4;
  --line-2: #d2d2d2;
  --bg: #f5f5f4;
  --panel: #ffffff;
  --soft: #f7f8fb;
  --ok: #17733a;
  --ok-bg: #e3f6ea;
  --warn: #8a5a00;
  --warn-bg: #fff3d6;
  --bad: #b02a1b;
  --bad-bg: #fde8e6;
  --info: #1d5fa8;
  --info-bg: #e5effb;
  --internal: #fffaf0;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 Calibri, Carlito, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { padding: 60px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.r { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 14px; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--brand); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side .brand { padding: 20px 20px 18px; display: flex; align-items: center; gap: 10px; min-height: 72px; }
.side .brand img { max-height: 34px; max-width: 150px; object-fit: contain; background: #fff; border-radius: 6px; padding: 4px 6px; }
.side .brand .name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.side .brand .sub { font-size: 11px; opacity: .7; text-transform: uppercase; letter-spacing: .08em; }
.nav { padding: 8px 10px; display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: rgba(255,255,255,.82); text-decoration: none; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.active { background: rgba(255,255,255,.14); color: #fff; }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.side .me { margin-top: auto; padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.12); display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.side .me .who { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; }
.side .me .who div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .me button { background: none; border: 0; color: rgba(255,255,255,.75); cursor: pointer; padding: 4px; border-radius: 6px; }
.side .me button:hover { color: #fff; background: rgba(255,255,255,.1); }
.main { min-width: 0; }
.topbar { display: none; }
.page { padding: 28px 32px 60px; max-width: 1400px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 700; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); border-radius: 8px; padding: 7px 13px; font-weight: 600; font-size: 13.5px; cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.4; }
.btn:hover { background: var(--soft); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand); filter: brightness(1.12); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent); filter: brightness(1.08); }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-bg); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: rgba(0,0,0,.05); }
.btn-sm { padding: 4px 9px; font-size: 12.5px; }
.btn-icon { padding: 5px; width: 30px; height: 30px; }
.btn:disabled { opacity: .5; cursor: default; }
.field { display: block; }
.field > span, .label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.input, .field input:not([type=checkbox]):not([type=color]):not([type=file]), .field select, .field textarea, select.input {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; outline: none; transition: border-color .12s, box-shadow .12s;
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
textarea { resize: vertical; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.search { position: relative; }
.search input { padding-left: 34px; min-width: 240px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }

/* ---------- panels & tables ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 15px; font-weight: 650; }
.card-body { padding: 20px; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #fafbfd; }
.tbl .num-col { font-variant-numeric: tabular-nums; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 16px; margin-bottom: 6px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.badge.draft { background: #eef0f3; color: #4b5563; }
.badge.sent { background: var(--info-bg); color: var(--info); }
.badge.viewed { background: #efe8fd; color: #5b3cc4; }
.badge.accepted { background: var(--ok-bg); color: var(--ok); }
.badge.declined, .badge.lost { background: var(--bad-bg); color: var(--bad); }
.badge.expired { background: var(--warn-bg); color: var(--warn); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { padding: 16px 18px; }
.kpi .k { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi .v { font-size: 24px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .count { font-size: 11px; background: var(--soft); border-radius: 99px; padding: 1px 7px; margin-left: 4px; color: var(--muted); }
.seg { display: inline-flex; background: #e9ecf1; border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 6px; font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.seg button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,35,.45); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .12s; }
.modal { background: #fff; border-radius: 14px; width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(900px, 100%); }
.modal-head { padding: 18px 22px 0; display: flex; align-items: center; }
.modal-head h3 { font-size: 17px; flex: 1; }
.modal-body { padding: 18px 22px; overflow: auto; }
.modal-foot { padding: 14px 22px 18px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
@keyframes fade { from { opacity: 0; } }
#toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 200; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-weight: 500; max-width: 380px; animation: fade .15s; }
.toast.err { background: var(--bad); }
.toast.ok { background: var(--ok); }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #000)); }
.auth .card { width: min(420px, 100%); padding: 32px; }
.auth h1 { font-size: 22px; margin-bottom: 4px; }
.auth .err { color: var(--bad); font-size: 13px; min-height: 18px; }

/* ---------- proposal editor ---------- */
.ed-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.ed-head .back { margin-top: 2px; }
.ed-title { flex: 1; min-width: 260px; }
.ed-title .num { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.ed-title input { font-size: 22px; font-weight: 700; border: 1px solid transparent; border-radius: 8px; padding: 2px 8px; margin-left: -9px; width: 100%; background: transparent; }
.ed-title input:hover { border-color: var(--line); }
.ed-title input:focus { border-color: var(--brand); background: #fff; outline: none; }
.save-state { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.save-state.dirty { color: var(--warn); }
.save-state.err { color: var(--bad); }
.lock-banner { background: var(--ok-bg); color: var(--ok); border: 1px solid #c9ead3; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; font-weight: 500; }
.locked input, .locked select, .locked textarea, .locked [contenteditable] { pointer-events: none; }
.locked .lock-hide { display: none !important; }
.ed-layout > * { min-width: 0; }
.ed-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 20px; align-items: start; }
.ed-aside { position: sticky; top: 20px; }
.ed-aside .card + .card { margin-top: 14px; }
.sumline { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-variant-numeric: tabular-nums; }
.sumline span:first-child { color: var(--muted); }
.sumline.big { font-weight: 700; font-size: 16px; padding-top: 8px; margin-top: 6px; border-top: 1px solid var(--line); }
.sumline.big span:first-child { color: var(--ink); }
.gp-low { color: var(--bad) !important; }
.gp-ok { color: var(--ok) !important; }

/* rich text */
.rte { border: 1px solid var(--line-2); border-radius: 8px; background: #fff; }
.rte:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.rte-bar { display: flex; gap: 2px; padding: 5px; border-bottom: 1px solid var(--line); flex-wrap: wrap; background: var(--soft); border-radius: 8px 8px 0 0; }
.rte-bar button { background: none; border: 0; min-width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-weight: 700; color: var(--ink-2); font-size: 13px; padding: 0 6px; }
.rte-bar button:hover { background: #e7ebf0; }
.rte-body { min-height: 110px; padding: 12px 14px; outline: none; line-height: 1.6; }
.rte-body:empty::before { content: attr(data-placeholder); color: #a0a8b3; }
.rte-body p { margin: 0 0 10px; }
.rte-body ul, .rte-body ol { margin: 0 0 10px; padding-left: 22px; }
.rte-body h3 { font-size: 16px; margin: 12px 0 6px; }

/* sections */
.sec-card { margin-bottom: 16px; }
.sec-card .card-head { gap: 8px; }
.sec-card .sec-title { font-weight: 650; font-size: 15px; border: 1px solid transparent; border-radius: 6px; padding: 4px 8px; flex: 1; min-width: 120px; background: transparent; }
.sec-card .sec-title:hover { border-color: var(--line); }
.sec-card .sec-title:focus { border-color: var(--brand); outline: none; background: #fff; }
.sec-num { font-size: 12px; font-weight: 700; color: var(--accent); }
.sec-media { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.thumb { position: relative; width: 108px; height: 80px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--soft) center/cover no-repeat; display: grid; place-items: center; font-size: 11px; color: var(--muted); font-weight: 700; }
.thumb .x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 13px; line-height: 1; display: none; }
.thumb:hover .x { display: block; }
.add-tile { width: 108px; height: 80px; border: 1.5px dashed var(--line-2); border-radius: 8px; display: grid; place-items: center; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 600; text-align: center; background: #fff; }
.add-tile:hover { border-color: var(--brand); color: var(--brand); }

/* media library */
.drop { border: 2px dashed var(--line-2); border-radius: 12px; padding: 28px; text-align: center; background: #fff; color: var(--muted); transition: .15s; }
.drop.over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, #fff); color: var(--brand); }
.drop strong { color: var(--ink); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 18px; }
.media-card { overflow: hidden; }
.media-card .pic { height: 150px; background: var(--soft) center/cover no-repeat; display: grid; place-items: center; position: relative; border-bottom: 1px solid var(--line); }
.media-card .pic.contain { background-size: contain; background-color: #fff; }
.media-card .pic .ext { font-size: 20px; font-weight: 800; color: var(--muted); }
.media-card .pic .cover-flag { position: absolute; top: 8px; left: 8px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.media-card .pic .hidden-flag { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.media-card .body { padding: 12px; display: grid; gap: 8px; }
.media-card .fname { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-card .input { padding: 6px 9px; font-size: 13px; }
.upload-progress { margin-top: 10px; font-size: 13px; color: var(--brand); font-weight: 600; }

/* costing grid */
.cost-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.fx-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12.5px; }
.fx-chip { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 2px 4px 2px 9px; }
.fx-chip b { font-weight: 600; color: var(--ink-2); }
.fx-chip input { width: 70px; border: 0; padding: 3px 4px; text-align: right; outline: none; background: transparent; font-variant-numeric: tabular-nums; }
.cost-wrap { overflow-x: auto; }
table.cost { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 1260px; font-size: 13px; }
.cost th { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap; position: sticky; top: 0; }
.cost th.r { text-align: right; }
.cost td { padding: 4px 3px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cost td.int, .cost th.int { background: var(--internal); }
.cost input, .cost select, .cost textarea { width: 100%; border: 1px solid transparent; border-radius: 6px; padding: 5px 6px; background: transparent; outline: none; font-variant-numeric: tabular-nums; }
.cost input:hover, .cost select:hover, .cost textarea:hover { border-color: var(--line-2); background: #fff; }
.cost input:focus, .cost select:focus, .cost textarea:focus { border-color: var(--brand); background: #fff; }
.cost input.num { text-align: right; }
.cost textarea { resize: none; min-height: 30px; line-height: 1.4; overflow: hidden; }
.cost .calc { text-align: right; padding: 6px 6px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cost .gpcell { text-align: right; padding: 6px 6px; font-size: 12px; white-space: nowrap; }
.cost tr.opt td { background-image: linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.55)); color: var(--muted); }
.cost tr.opt td.int { background-color: var(--internal); }
.cost .fixed { color: var(--accent); }
.cost .row-actions { display: flex; gap: 0; }
.cost .row-actions button { width: 24px; height: 26px; border: 0; background: none; cursor: pointer; color: var(--muted); border-radius: 5px; padding: 0; }
.cost .row-actions button:hover { background: #eceff3; color: var(--ink); }
.cost tr.group-row td { background: #f0f3f7; font-weight: 700; color: var(--brand); padding: 6px 10px; font-size: 12.5px; }
.cost-foot { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-top: 16px; }
.cost-foot .card { padding: 16px 18px; }
.cost-foot h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.inline-num { width: 70px; padding: 3px 6px; border: 1px solid var(--line-2); border-radius: 6px; text-align: right; }
.internal-note { font-size: 12px; color: var(--warn); background: var(--internal); border: 1px solid #f1e3c4; border-radius: 6px; padding: 2px 8px; }

/* share tab */
.link-box { display: flex; gap: 8px; }
.link-box input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--soft); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.timeline li::after { content: ""; position: absolute; left: 7.5px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.accepted::before { background: var(--ok); }
.timeline li.declined::before { background: var(--bad); }
.timeline li.viewed::before { background: #5b3cc4; }
.timeline .when { color: var(--muted); font-size: 12px; }
.sig { max-width: 260px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-bottom: 4px; }
.steps div { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 26px; position: relative; }
.steps div::before { content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--line-2); z-index: 1; }
.steps div::after { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--line-2); }
.steps div:first-child::after { display: none; }
.steps div.done { color: var(--ink); }
.steps div.done::before { background: var(--brand); border-color: var(--brand); }
.steps div.done::after { background: var(--brand); }

/* picker */
.pick-list { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.pick-list label { display: grid; grid-template-columns: 22px 1fr auto 70px; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pick-list label:hover { background: var(--soft); }
.pick-list label:last-child { border-bottom: 0; }
.pick-list .meta { font-size: 12px; color: var(--muted); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pick-grid .thumb { width: 100%; cursor: pointer; }
.pick-grid .thumb.sel { outline: 3px solid var(--brand); outline-offset: 1px; }

.cover-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.cover-pick .thumb { cursor: pointer; width: 96px; height: 68px; }
.cover-pick .thumb.sel { outline: 3px solid var(--accent); outline-offset: 1px; }
.cover-pick .none { background: #fff; }

.settings-nav { position: sticky; top: 20px; display: grid; gap: 2px; }
.settings-nav a { padding: 7px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.settings-nav a:hover { background: #e9ecf1; }
.logo-prev { height: 64px; min-width: 120px; border: 1px dashed var(--line-2); border-radius: 8px; display: grid; place-items: center; padding: 8px; background: #fff; }
.logo-prev img { max-height: 48px; max-width: 220px; }
.swatch { width: 40px; height: 36px; padding: 2px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; cursor: pointer; }

/* mobile */
.menu-btn { display: none; }
@media (max-width: 1100px) {
  .ed-layout { grid-template-columns: 1fr; }
  .ed-aside { position: static; }
  .cost-foot { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .shell.nav-open .side { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 40; }
  .topbar button { background: none; border: 0; color: #fff; padding: 4px; cursor: pointer; }
  .page { padding: 18px 16px 50px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .search input { min-width: 0; width: 100%; }
  .page-head .search { flex: 1; }
  .kpi .v { font-size: 19px; }
}

/* ---------- menus, chips ---------- */
.pop { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(16,24,40,.14); padding: 6px; min-width: 220px; z-index: 30; display: grid; }
.pop button { text-align: left; background: none; border: 0; padding: 8px 12px; border-radius: 6px; cursor: pointer; font-weight: 500; }
.pop button:hover { background: var(--soft); }
.pop button.danger { color: var(--bad); }
.btn-ok { color: var(--ok); }
.btn-ok:hover { background: var(--ok-bg); }
.chip { display: inline-block; font-size: 11px; font-weight: 600; background: var(--soft); border: 1px solid var(--line); border-radius: 99px; padding: 0 7px; color: var(--ink-2); vertical-align: middle; }
.chip.chip-role { background: var(--info-bg); color: var(--info); border-color: transparent; }  /* v1.41.0 */
.cc-pick { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; }
.cc-pick .check { font-size: 13px; }
.badge.cs-prospect { background: #fff3d6; color: #8a5a00; }
.badge.cs-customer { background: var(--ok-bg); color: var(--ok); }
.badge.cs-partner { background: var(--info-bg); color: var(--info); }
.badge.cs-inactive { background: #eef0f3; color: #6b7280; }
.due { font-size: 12px; font-weight: 600; color: var(--muted); }
.due.today { color: var(--warn); }
.due.overdue { color: var(--bad); }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; background: var(--soft); color: var(--brand); }
.kpis-6 { grid-template-columns: repeat(6, minmax(0,1fr)); }
.kpis-6 .kpi .v { font-size: 20px; }
.card-head .count { font-size: 11px; background: var(--soft); border-radius: 99px; padding: 1px 8px; color: var(--muted); font-weight: 600; }

/* ---------- pipeline board ---------- */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; min-height: 60vh; }
.col { flex: 0 0 272px; background: #eaedf2; border-radius: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 260px); border: 2px solid transparent; transition: border-color .1s, background .1s; }
.col.over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, #eaedf2); }
.col-won { background: #e6f4ea; }
.col-lost { background: #f7eceb; }
.col-head { padding: 12px 12px 8px; }
.col-head .count { font-size: 11px; background: rgba(255,255,255,.8); border-radius: 99px; padding: 0 7px; font-weight: 700; color: var(--ink-2); }
.col-body { padding: 4px 8px 10px; overflow-y: auto; display: grid; gap: 8px; align-content: start; min-height: 80px; }
.col-empty { font-size: 12px; color: var(--muted); text-align: center; padding: 18px 6px; border: 1.5px dashed #cdd3db; border-radius: 8px; }
.deal { background: #fff; border-radius: 9px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(16,24,40,.08); cursor: pointer; border: 1px solid transparent; display: grid; gap: 4px; }
.deal:hover { border-color: var(--line-2); }
.deal.dragging { opacity: .45; }
.deal-title { font-weight: 650; line-height: 1.3; }
.deal-co { font-size: 12.5px; color: var(--muted); }
.deal-row { display: flex; align-items: center; gap: 6px; }
.av { width: 22px; height: 22px; border-radius: 50%; background: var(--soft); color: var(--brand); font-size: 10px; font-weight: 700; display: grid; place-items: center; }

/* ---------- deal stage chevrons ---------- */
.chevrons { display: flex; margin: 10px 0 18px; overflow-x: auto; }
.chevrons button { flex: 1; min-width: 110px; border: 0; background: #e6e9ee; color: var(--ink-2); font-weight: 600; font-size: 12.5px; padding: 9px 18px 9px 22px; cursor: pointer; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%); margin-right: -6px; white-space: nowrap; }
.chevrons button:first-child { clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); border-radius: 8px 0 0 8px; }
.chevrons button:hover:not(:disabled) { background: #d8dde5; }
.chevrons button.done { background: color-mix(in srgb, var(--brand) 22%, #fff); color: var(--brand); }
.chevrons button.cur { background: var(--brand); color: #fff; }
.chevrons button.end { cursor: default; }
.chevrons button.end.won { background: var(--ok); color: #fff; }
.chevrons button.end.lost { background: var(--bad); color: #fff; }

/* ---------- activity feed & tasks ---------- */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.f-ic { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-size: 14px; }
.f-won .f-ic { background: var(--ok-bg); }
.f-declined .f-ic { background: var(--bad-bg); color: var(--bad); }
.f-stage .f-ic, .f-quote .f-ic { background: var(--info-bg); color: var(--info); }
.f-body { flex: 1; min-width: 0; }
.f-head { font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.f-when { color: var(--muted); font-size: 12px; margin-left: auto; }
.f-text { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; overflow-wrap: anywhere; }
.feed-del { padding: 0 6px; opacity: 0; }
.feed li:hover .feed-del { opacity: 1; }
.tasks { list-style: none; margin: 0; padding: 0; }
.tasks li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tasks li:last-child { border-bottom: 0; }
.tasks input[type=checkbox] { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--ok); cursor: pointer; flex: none; }
.tasks .t-body { flex: 1; min-width: 0; }
.tasks .t-title { font-weight: 500; }
.tasks li.done .t-title { text-decoration: line-through; color: var(--muted); }
.tasks .t-meta { font-size: 12px; color: var(--muted); }
.tasks .btn { opacity: .6; }
.contact { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.contact:last-child { border-bottom: 0; }

/* ---------- charts ---------- */
.viz { --series-1: #2a78d6; --series-2: #eb6834; --grid: #e6e9ee; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.lg.s1 { background: #2a78d6; }
.lg.s2 { background: #eb6834; }
.hbar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 76px; align-items: center; gap: 10px; padding: 6px 0; }
.hb-label { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { height: 12px; background: var(--grid); border-radius: 4px; overflow: hidden; }
.hb-fill { height: 100%; background: var(--series-1); border-radius: 0 4px 4px 0; min-width: 2px; }
.hb-fill.s2 { background: var(--series-2); }
.hb-val { text-align: right; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hbar:hover .hb-fill { filter: brightness(.9); }
.vbars { display: flex; align-items: stretch; gap: 6px; height: 220px; border-bottom: 1px solid var(--line-2); padding-top: 8px; background: repeating-linear-gradient(to top, transparent 0 54px, var(--grid) 54px 55px); }
.vb-col { flex: 1; display: flex; flex-direction: column; min-width: 18px; cursor: default; }
.vb-pair { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.vb { width: 42%; max-width: 18px; border-radius: 4px 4px 0 0; min-height: 0; }
.vb.s1 { background: var(--series-1); }
.vb.s2 { background: var(--series-2); }
.vb-col:hover .vb-pair { background: rgba(0,0,0,.04); border-radius: 4px 4px 0 0; }
.vb-lbl { font-size: 10.5px; color: var(--muted); text-align: center; margin: 6px 0 -22px; white-space: nowrap; transform: translateY(0); height: 16px; }
.vbars + details { margin-top: 30px; }
.tbl-toggle summary { font-size: 12.5px; color: var(--muted); cursor: pointer; }
.tbl-toggle .tbl { margin-top: 8px; font-size: 13px; }
.viz-tip { position: fixed; z-index: 300; display: none; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(16,24,40,.16); border-radius: 8px; padding: 8px 12px; font-size: 12.5px; pointer-events: none; color: var(--ink-2); max-width: 280px; }
.viz-tip .vt-h { font-weight: 700; color: var(--ink); margin-bottom: 2px; }
@media (max-width: 1100px) { .kpis-6 { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 820px) { .kpis-6 { grid-template-columns: repeat(2, minmax(0,1fr)); } .settings-grid { grid-template-columns: 1fr !important; } .settings-nav { display: none; } .col { flex-basis: 250px; } }

.cost td.desc-cell { min-width: 260px; }
.cost select { padding-right: 2px; }
.grid > * { min-width: 0; }
@media (max-width: 820px) {
  .card-head { flex-wrap: wrap; }
  .ed-head .row.wrap { width: 100%; }
}

/* ================= One80 brand theme ================= */
h1, h2, h3, h4 { letter-spacing: 0; }
.page-head h1 { font-size: 26px; color: var(--ink); }
.side { background: #fff; color: var(--charcoal); border-right: 1px solid var(--line); box-shadow: inset 0 4px 0 var(--accent); }
.side .brand { flex-direction: column; align-items: flex-start; gap: 6px; padding: 26px 22px 20px; min-height: 0; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.side .brand img { max-height: 38px; max-width: 170px; background: none; padding: 0; border-radius: 0; }
.side .brand .name { color: var(--charcoal); font-size: 17px; }
.side .brand .sub { color: var(--brand); opacity: 1; font-weight: 700; font-size: 11px; letter-spacing: .14em; }
.nav a { color: var(--charcoal); font-weight: 500; font-size: 15px; border-radius: 6px; position: relative; }
.nav a:hover { background: #f4f4f4; color: var(--ink); }
.nav a.active { background: #faeced; color: var(--brand); font-weight: 700; }
.nav a.active::before { content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.side .me { border-top: 1px solid var(--line); }
.side .me .avatar { background: #faeced; color: var(--brand); }
.side .me .who div:last-child { color: var(--muted); opacity: 1 !important; }
.side .me button { color: var(--muted); }
.side .me button:hover { color: var(--brand); background: #faeced; }
.avatar { background: #faeced; color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); filter: none; }
.btn-accent { background: var(--accent); border-color: var(--accent); }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.card-head h3 { font-size: 16px; }
.kpi .v { color: var(--ink); }
.auth { background: #f4f4f4; box-shadow: inset 0 5px 0 var(--accent); }
.auth .card { border-top: 0; }
.auth h1 { color: var(--brand); }
.lock-banner { font-weight: 600; }
.sec-num { color: var(--brand); }
.rte-body h3 { color: var(--brand); }
@media (max-width: 820px) {
  .topbar { background: #fff; color: var(--charcoal); border-bottom: 1px solid var(--line); box-shadow: inset 0 3px 0 var(--accent); }
  .topbar button { color: var(--charcoal); }
  .topbar img { max-height: 26px; }
  .topbar .sub { margin-left: auto; color: var(--brand); font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
}
/* single-series bars follow the brand; the two-series won/lost chart keeps the validated blue/orange pair */
.hb-fill, .hb-fill.s2 { background: var(--brand); }
.hb-track { background: #ececec; }
.ms-btn { width: 100%; padding: 11px; gap: 10px; font-size: 15px; background: #fff; border: 1px solid #8c8c8c; color: #262626; }
.ms-btn:hover { background: #f3f3f3; }

/* settings categories */
.settings-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-nav { position: sticky; top: 20px; display: grid; gap: 4px; }
.settings-nav a { display: block; padding: 10px 14px; border-radius: 8px; color: var(--ink-2); text-decoration: none; border: 1px solid transparent; }
.settings-nav a strong { display: block; font-size: 15px; font-weight: 700; }
.settings-nav a span { display: block; font-size: 12.5px; color: var(--muted); }
.settings-nav a:hover { background: #fff; border-color: var(--line); }
.settings-nav a.active { background: #fff; border-color: var(--line); box-shadow: inset 3px 0 0 var(--brand); }
.settings-nav a.active strong { color: var(--brand); }
#setDirty { color: var(--warn); font-weight: 600; }
@media (max-width: 820px) {
  .settings-grid { grid-template-columns: 1fr !important; }
  .settings-nav { display: flex !important; position: static; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .settings-nav a { white-space: nowrap; padding: 8px 12px; }
  .settings-nav a span { display: none; }
}

/* ---------- v1.6: user rights, projects, employee zone ---------- */
.prog { height: 8px; background: #ececec; border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.prog > div { height: 100%; background: var(--ok); border-radius: 99px; min-width: 2px; transition: width .3s; }
.prog.warn > div { background: var(--warn); }
.prog.bad > div { background: var(--bad); }
.kpi .prog { margin-top: 8px; }

table.rights td, table.rights th { padding: 8px 10px; }
table.rights th.rc { text-align: center; white-space: normal; min-width: 92px; line-height: 1.25; cursor: help; }
table.rights td.rc { text-align: center; }
table.rights tr.inactive td { opacity: .55; }
.lvl { display: inline-block; min-width: 64px; padding: 3px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.lvl-sel { appearance: none; -webkit-appearance: none; border: 1px solid transparent; border-radius: 99px; padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; text-align: center; text-align-last: center; min-width: 78px; font-family: inherit; }
.lvl-sel:hover, .lvl-sel:focus { border-color: var(--line-2); outline: none; }
.lvl.l0, .lvl-sel.l0 { background: #f1f1f1; color: #9a9a9a; }
.lvl.l1, .lvl-sel.l1 { background: var(--info-bg); color: var(--info); }
.lvl.l2, .lvl-sel.l2 { background: var(--ok-bg); color: var(--ok); }
.lvl.l3, .lvl-sel.l3 { background: #efe8fd; color: #5b3cc4; }
.lvl-sel.changed { box-shadow: 0 0 0 2px var(--warn); }

.phase .card-head { gap: 8px; flex-wrap: wrap; }
.phase .ms-check { width: 18px; height: 18px; accent-color: var(--ok); cursor: pointer; }
.phase.ph-done .card-head h3 { color: var(--muted); text-decoration: line-through; }
.tasks li a { color: inherit; }

.ann.pinned { border-left: 4px solid var(--accent); }
.ann .card-head { flex-wrap: wrap; }
.rte-view p { margin: 0 0 10px; }
.rte-view ul, .rte-view ol { margin: 0 0 10px; padding-left: 20px; }
.rte-view h3 { font-size: 15px; margin: 12px 0 6px; }

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.person { padding: 16px; cursor: pointer; display: grid; gap: 10px; align-content: start; }
.person:hover { border-color: var(--line-2); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.avatar.lg { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; background: #faeced; color: var(--brand); }
.person-contact { display: grid; gap: 2px; }
.person-contact a { color: var(--ink); }
@media (max-width: 820px) {
  table.rights th.rc { min-width: 70px; font-size: 11px; }
}
.tbl th.r { text-align: right; }

/* profile photos */
.avatar.has-photo, .av.has-photo { padding: 0; overflow: hidden; background: #eee; }
.avatar.has-photo img, .av.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar.xl { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 24px; flex: none; background: #faeced; color: var(--brand); }

/* purchasing */
.po-lines td { padding: 6px 8px; vertical-align: top; }
.po-lines .input { padding: 6px 8px; font-size: 13px; }
.po-lines textarea.input { resize: vertical; min-height: 34px; }
.input.r { text-align: right; }

/* ---------- tasks v1.8: type, checklist, notes, reminders ---------- */
.badge.tt-int { background: #eef0f3; color: #4b5563; font-size: 11px; padding: 1px 8px; }
.badge.tt-ext { background: var(--info-bg); color: var(--info); font-size: 11px; padding: 1px 8px; }
.tasks .t-title .badge { vertical-align: 1px; margin-left: 4px; }
.tasks .t-link { color: inherit; text-decoration: none; }
.tasks .t-link:hover { color: var(--brand); text-decoration: underline; }
.tasks li.done .t-link { color: var(--muted); }
.t-prog.full { color: var(--ok); font-weight: 600; }
.t-bar { width: 120px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.t-bar > div { height: 100%; background: var(--ok); border-radius: 99px; transition: width .2s; }
.struck { text-decoration: line-through; color: var(--muted); }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist input[type=checkbox] { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--ok); cursor: pointer; flex: none; }
.checklist .ci-body { flex: 1; min-width: 0; }
.checklist .ci-title { cursor: text; overflow-wrap: anywhere; }
.checklist .ci-title .input { padding: 4px 8px; }
.checklist li.done .ci-title { text-decoration: line-through; color: var(--muted); }
.checklist .ci-tools { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.checklist li:hover .ci-tools, .checklist li:focus-within .ci-tools { opacity: 1; }
.checklist .t-meta { font-size: 12px; color: var(--muted); }
#tkAddItem .input { flex: 1; }
#remBox { position: fixed; right: 16px; bottom: 16px; z-index: 900; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 32px)); }
.rem-pop { background: var(--panel); border: 1px solid var(--line-2); border-left: 4px solid var(--warn); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(16,24,40,.18); padding: 12px 14px; animation: remIn .25s ease-out; }
.rem-pop .rem-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--warn); }
.rem-pop .rem-head .btn { margin-left: auto; padding: 0 6px; }
.rem-pop .rem-title { display: block; font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; margin-top: 4px; overflow-wrap: anywhere; }
.rem-pop .rem-title:hover { color: var(--brand); }
.rem-pop .t-meta { font-size: 12px; color: var(--muted); }
#tmRemQuick { gap: 10px; }
@keyframes remIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 700px) { .checklist .ci-tools { opacity: 1; } }

/* ---------- Finance Desk (v1.10.0) ---------- */
.viz { --series-1b: #a9c9f0; --series-2b: #f5bd9f; }
.lg.s1b { background: #a9c9f0; }
.lg.s2b { background: #f5bd9f; }
.lg.fd-lg-dash { height: 3px; border-radius: 0; background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px); }
.lg.s1b.fd-lg-dash { color: #6a9fe0; }
.lg.s2b.fd-lg-dash { color: #ef9a6e; }
.vb.s1b { background: var(--series-1b); }
.vb.s2b { background: var(--series-2b); }
.fd-bars .vb-col { cursor: pointer; }
.fd-bars .vb-col.fd-sel .vb-pair { background: rgba(0,0,0,.06); border-radius: 4px 4px 0 0; }
.fd-bars .vb-col.fd-sel .vb-lbl { color: var(--ink); font-weight: 700; }
.fd-bars .vb-col.fd-future { cursor: default; }
.fd-bars .vb-col.fd-future .vb-lbl { opacity: .5; }
.fd-bars { margin-bottom: 26px; }
.fd-line { width: 100%; height: auto; display: block; overflow: visible; }
.fd-grid { stroke: var(--grid); stroke-width: 1; }
.fd-axis { font-size: 10.5px; fill: var(--muted); }
.fd-ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fd-ln.dash { stroke-dasharray: 5 4; }
.fd-ln.s1, .fd-dot.s1 { stroke: var(--series-1); } .fd-dot.s1 { fill: var(--series-1); }
.fd-ln.s2, .fd-dot.s2 { stroke: var(--series-2); } .fd-dot.s2 { fill: var(--series-2); }
.fd-ln.s1b { stroke: #6a9fe0; } .fd-dot.s1b { fill: #fff; stroke: #6a9fe0; stroke-width: 1.5; }
.fd-ln.s2b { stroke: #ef9a6e; } .fd-dot.s2b { fill: #fff; stroke: #ef9a6e; stroke-width: 1.5; }
.fd-dot { stroke: #fff; stroke-width: 2; }
.fd-hit { fill: transparent; }
.fd-hit:hover { fill: rgba(0,0,0,.04); }
.fd-good { color: var(--ok); }
.fd-bad { color: var(--bad); }
.fd-delta { font-weight: 600; white-space: nowrap; }
.fd-h { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.fd-sync { padding: 12px 16px; margin-bottom: 18px; }
.fd-dot-status { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); display: inline-block; }
.fd-dot-status.ok { background: var(--ok); }
.fd-dot-status.err { background: var(--bad); }
.fd-tbl tfoot th { border-top: 2px solid var(--line-2); }
.fd-tbl a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--line-2); }
.fd-tbl a:hover { color: var(--brand); border-bottom-color: var(--brand); }
.fd-row-sel td { background: var(--soft); font-weight: 600; }
.viz .hb-fill.fd-s1 { background: #2a78d6; }
.viz .hb-fill.fd-s2 { background: #eb6834; }
.fd-tbl .num-col { white-space: nowrap; }
@media (max-width: 820px) { .fd-bars .vb-col:nth-child(even) .vb-lbl { visibility: hidden; } .fd-bars .vb-lbl { font-size: 9.5px; } }

/* v1.12.0 landing page + grouped menu */
.nav { overflow-y: auto; min-height: 0; flex: 1 1 auto; align-content: start; }
.nav-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--brand); padding: 14px 12px 4px; }
.nav-gap { height: 8px; }
.hub-tiles { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-bottom: 22px; }
.hub-tile { padding: 20px 22px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, box-shadow .15s, transform .15s; border-top: 3px solid var(--brand); }
.hub-tile:hover, .hub-tile:focus-visible { border-color: var(--brand); box-shadow: 0 6px 18px rgba(16,24,40,.08); transform: translateY(-1px); outline: none; }
.hub-tile-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.hub-ico { width: 42px; height: 42px; border-radius: 10px; background: #faeced; color: var(--brand); display: grid; place-items: center; }
.hub-ico svg { width: 22px; height: 22px; }
.hub-go { color: var(--muted); transform: rotate(180deg); }
.hub-go svg { width: 18px; height: 18px; }
.hub-tile:hover .hub-go { color: var(--brand); }
.hub-tile h2 { font-size: 19px; font-weight: 700; color: var(--ink); }
.hub-tile p { font-size: 13.5px; line-height: 1.45; margin: 0; }
.hub-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hub-links a { font-size: 12.5px; font-weight: 600; color: var(--charcoal); background: var(--soft); border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; text-decoration: none; }
.hub-links a:hover { color: var(--brand); border-color: var(--brand); background: #fff; }
.hub-extras { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 1100px) { .hub-tiles { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .hub-tiles { grid-template-columns: 1fr; } }

/* ---------- v1.13.0: audit trail ---------- */
.audit-diff { border-collapse: collapse; font-size: 12.5px; width: 100%; }
.audit-diff td { padding: 2px 6px 2px 0; vertical-align: top; word-break: break-word; }
.audit-diff .k { color: var(--muted); white-space: nowrap; width: 1%; padding-right: 10px; }
.audit-diff .old { color: var(--bad); text-decoration: line-through; text-decoration-color: rgba(176,42,27,.35); }
.audit-diff .new { color: var(--ok); }
.audit-diff .arr { color: var(--muted); width: 1%; }
.audit-diff .old, .audit-diff .new { width: 48%; }
.audit-line { font-size: 12.5px; padding: 1px 0; }
.audit-line.old { color: var(--bad); }
.audit-line.new { color: var(--ok); }
.audit-tbl td { vertical-align: top; }
.audit-feed .f-ic { width: auto; min-width: 70px; background: none; }

/* ---------- v1.13.0: project timeline ---------- */
.gantt { --gl: 210px; position: relative; overflow-x: auto; }
.gantt-row { display: grid; grid-template-columns: var(--gl) 1fr; align-items: center; min-height: 40px; border-bottom: 1px solid var(--line); min-width: 640px; }
.gantt-row:last-child { border-bottom: 0; }
.gantt-head { min-height: 28px; border-bottom: 1px solid var(--line-2); }
.gantt-label { padding: 6px 12px 6px 0; min-width: 0; }
.gantt-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt-track { position: relative; height: 100%; min-height: 28px; }
.gantt-tick { position: absolute; top: 6px; font-size: 11px; color: var(--muted); transform: translateX(-50%); white-space: nowrap; }
.gantt-bar { position: absolute; top: 50%; height: 16px; margin-top: -8px; border-radius: 4px; background: var(--info); opacity: .85; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gantt-bar span { color: #fff; font-size: 10.5px; font-weight: 700; }
.gantt-bar.guessed { opacity: .45; }
.gantt-bar.done { background: var(--ok); }
.gantt-bar.late { background: var(--bad); }
.gantt-ms { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; background: var(--ink-2); transform: rotate(45deg); }
.gantt-ms.done { background: var(--ok); } .gantt-ms.late { background: var(--bad); }
.gantt-dot { position: absolute; top: 50%; width: 7px; height: 7px; margin: 9px 0 0 -3.5px; border-radius: 50%; background: var(--charcoal); border: 1px solid #fff; }
.gantt-dot.done { background: var(--ok); } .gantt-dot.late { background: var(--bad); }
.gantt-today, .gantt-due { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--bad); z-index: 1; pointer-events: none; }
.gantt-due { border-left: 2px dashed var(--ink-2); }
@media (max-width: 700px) { .gantt { --gl: 130px; } }

/* v1.25.0: live clock on the home pages */
.hub-now { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hub-clock { font-size: 22px; font-weight: 700; color: var(--ink, #262626); font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* v1.30.0 global search, notification bell, management dashboard */
.side-tools { display: flex; gap: 8px; padding: 0 16px 10px; }
.gs-open { flex: 1; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--soft, #f6f6f6); color: var(--muted, #666); border-radius: 8px; padding: 7px 10px; cursor: pointer; font: inherit; font-size: 13px; text-align: left; }
.gs-open svg { width: 15px; height: 15px; flex: none; }
.gs-open span { flex: 1; }
.gs-open:hover { border-color: var(--brand); color: var(--charcoal, #222); }
kbd { font: 11px/1 inherit; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; color: var(--muted, #777); background: #fff; }
.bell { position: relative; border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 36px; display: grid; place-items: center; cursor: pointer; color: var(--charcoal, #333); }
.bell svg { width: 17px; height: 17px; }
.bell-n { position: absolute; top: -6px; right: -6px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.top-tools { display: flex; gap: 4px; }
.top-tools button { background: none; border: 0; color: inherit; padding: 6px; position: relative; width: auto; display: grid; place-items: center; }
.top-tools svg { width: 20px; height: 20px; }
.top-tools .bell-n { top: -2px; right: -2px; }
.topbar .spacer { flex: 1; }
.gs-bg { position: fixed; inset: 0; background: rgba(20,20,20,.35); z-index: 200; display: flex; justify-content: center; align-items: flex-start; padding: 10vh 12px 12px; }
.gs { width: 640px; max-width: 100%; background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden; display: flex; flex-direction: column; max-height: 75vh; }
.gs-in { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.gs-in svg { width: 18px; height: 18px; color: var(--muted, #888); flex: none; }
.gs-in input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 17px; background: none; min-width: 0; }
.gs-res { overflow-y: auto; padding: 6px 0 10px; }
.gs-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #888); padding: 10px 16px 4px; }
.gs-item { display: block; padding: 8px 16px; color: inherit; text-decoration: none; border-left: 3px solid transparent; }
.gs-item strong { display: block; font-weight: 600; }
.gs-item span { display: block; font-size: 12px; color: var(--muted, #777); }
.gs-item.on, .gs-item:hover { background: var(--soft, #f4f4f4); border-left-color: var(--brand); }
.gs-item mark { background: #ffe58a; color: inherit; border-radius: 2px; }
.gs-hint { padding: 16px; color: var(--muted, #777); font-size: 13px; }
.bell-pop { position: fixed; z-index: 150; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.18); max-height: 70vh; display: flex; flex-direction: column; }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.bell-list { overflow-y: auto; }
.bell-item { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 13px; }
.bell-item:hover { background: var(--soft, #f6f6f6); }
.bell-item strong { display: block; font-weight: 500; }
.bell-item span { display: block; color: var(--muted, #666); margin-top: 2px; }
.bell-item em { display: block; font-style: normal; font-size: 11px; color: var(--muted, #999); margin-top: 3px; }
.bell-item.unread { background: #fff7f7; border-left: 3px solid var(--brand); }
.bell-item.unread strong { font-weight: 700; }
.mgmt .kpis a.kpi { color: inherit; text-decoration: none; }
.mgmt .kpi.warn .v { color: var(--bad, #b00020); }
.mg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; margin-top: 16px; }
.mg-grid > * { min-width: 0; }
.mg-wide { grid-column: 1 / -1; }
.mg-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; color: inherit; text-decoration: none; }
.mg-row em, .mg-link em { font-style: normal; color: var(--muted, #888); font-size: 12px; margin-left: 4px; }
.mg-row b { font-weight: 600; text-align: right; }
.mg-link { display: block; font-size: 13px; padding: 4px 0; color: inherit; }
a.mg-row.mg-link { display: flex; padding: 6px 0; }
a.mg-row:hover { color: var(--brand); }
.mg-bar { height: 6px; background: var(--soft, #eee); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.mg-bar > div { height: 100%; background: var(--brand); border-radius: 3px; }
.mg-bar.hot > div { background: #d9822b; }
.mg-foot { margin-top: 10px; font-size: 12px; color: var(--muted, #777); }
.mg-cols { display: flex; gap: 10px; align-items: flex-end; height: 170px; margin-top: 8px; }
.mg-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; font-size: 11px; }
.mg-colbar { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.mg-colbar > div { width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; opacity: .85; }
.mg-col b { font-weight: 600; }
.mg-col span { color: var(--muted, #777); }
@media (max-width: 760px) { .mg-grid { grid-template-columns: 1fr; } .gs-bg { padding-top: 12px; } }

/* v1.31.0 Dispatch */
.dp-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.dp-tools .seg button { min-width: 34px; }
.dp-wrap { display: grid; grid-template-columns: 250px 1fr; gap: 14px; align-items: start; }
.dp-queue { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; max-height: 75vh; overflow-y: auto; position: sticky; top: 12px; }
.dp-q { margin-bottom: 8px; }
.dp-q small { display: block; color: var(--muted, #888); font-size: 11px; margin: 2px 0 0 4px; }
.dp-grid-wrap { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; max-height: 75vh; }
.dp-grid { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 900px; font-size: 12px; }
.dp-grid th { position: sticky; top: 0; z-index: 2; background: #fafafa; border-bottom: 1px solid var(--line); padding: 8px 6px; font-weight: 600; text-align: left; white-space: nowrap; }
.dp-grid th.today { color: var(--brand); }
.dp-grid td { border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); vertical-align: top; padding: 4px; }
.dp-who { position: sticky; left: 0; z-index: 1; background: #fff; min-width: 150px; max-width: 170px; border-left: 0 !important; }
.dp-grid th.dp-who { z-index: 3; }
.dp-who strong { display: block; font-size: 12.5px; }
.dp-who span { display: block; color: var(--muted, #888); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-sec td { background: #f4f4f4; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #777); padding: 6px 8px; position: sticky; left: 0; }
.dp-cell { min-width: 110px; height: 46px; }
.dp-cell.we, .dp-grid th.we { background: #fbfbfb; }
.dp-cell.today { background: #fff8f8; }
.dp-cell.busy { box-shadow: inset 0 0 0 2px #f2c46d; }
.dp-cell.over, .dp-cell.clash { box-shadow: inset 0 0 0 2px #e0645c; }
.dp-cell.over-drop { background: #eef6ff !important; box-shadow: inset 0 0 0 2px #4a90d9; }
.dp-h { font-size: 10px; color: var(--muted, #888); text-align: right; }
.dp-chip { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 6px; padding: 4px 6px; margin-bottom: 4px; cursor: grab; font-size: 11.5px; line-height: 1.25; display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; }
.dp-chip b { font-weight: 600; flex: 1 1 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dp-chip span { color: var(--muted, #777); font-size: 10.5px; }
.dp-chip i { font-style: normal; font-size: 11px; }
.dp-chip.t-assessment { border-left-color: #2f80c1; }
.dp-chip.t-task { border-left-color: #8a8a8a; background: #fafafa; }
.dp-chip.t-order { border-left-color: #6b4fbb; }
.dp-chip.crew { border-left-style: dashed; opacity: .85; }
.dp-chip.late { border-left-color: #c0392b; }
.dp-chip.dragging { opacity: .4; }
.dp-chip:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.dp-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.dp-check { font-size: 13px; }
.dp-check em { font-style: normal; color: var(--muted, #888); font-size: 11px; }
.dp-qgroup { padding: 12px 16px 4px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #777); }
@media (max-width: 900px) { .dp-wrap { grid-template-columns: 1fr; } .dp-queue { position: static; max-height: 260px; } }

/* v1.35.0 Marketing: campaigns, block email builder, reports */
.mk code { font-size: 12px; background: var(--soft); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.mk-note { border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; font-size: 13.5px; background: var(--info-bg); color: var(--info); }
.mk-note.warn { background: var(--warn-bg); color: var(--warn); }
.mk-note ul { margin: 6px 0 0; padding-left: 20px; }
.mk-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.mk-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mk-row > .input { flex: 1; min-width: 160px; }
.mk-two { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
.mk-missing { color: var(--bad); font-weight: 600; }
.mk-steps { list-style: none; margin: 0 0 18px; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; counter-reset: s; }
.mk-steps button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 14px 6px 6px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.mk-steps button span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font-size: 12px; color: var(--muted); }
.mk-steps button.done span { background: var(--ok-bg); color: var(--ok); }
.mk-steps button.active { border-color: var(--brand); color: var(--brand); }
.mk-steps button.active span { background: var(--brand); color: #fff; }
.mk-steps button:disabled { opacity: .45; cursor: default; }
.mk-stepnav { display: flex; gap: 10px; margin-top: 18px; }
.mk-channel { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line-2); border-radius: 10px; padding: 14px; cursor: pointer; }
.mk-channel.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.mk-channel input { margin-top: 3px; accent-color: var(--brand); }
.mk-channel p { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.mk-channel small { display: block; margin-top: 4px; color: var(--warn); font-size: 12px; }
/* audience */
.mk-aud { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.mk-aud .card-head .check h3 { margin: 0; }
.mk-off { opacity: .45; pointer-events: none; }
.mk-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-pill { border: 1px solid var(--line-2); border-radius: 99px; padding: 4px 11px 4px 8px; font-size: 13px; background: #fff; }
.mk-pill:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, #fff); }
.mk-pill input { width: 14px; height: 14px; }
.mk-pill em { font-style: normal; color: var(--muted); font-size: 12px; }
.mk-count { position: sticky; top: 12px; }
.mk-big { font-size: 36px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; line-height: 1.1; }
.mk-person { padding: 5px 0; border-bottom: 1px solid var(--line); }
.mk-person:last-child { border-bottom: 0; }
.mk-person strong { display: block; font-weight: 600; }
.mk-person span { display: block; color: var(--muted); font-size: 12px; }
/* builder */
.mk-design, .mk-review { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.mk-dtools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; }
.mk-dtools input[type=color] { width: 34px; height: 26px; padding: 0; border: 1px solid var(--line-2); border-radius: 6px; background: none; cursor: pointer; }
.mk-blocks { display: grid; gap: 10px; min-height: 60px; }
.mk-empty { border: 2px dashed var(--line-2); border-radius: 10px; padding: 28px; text-align: center; color: var(--muted); }
.mk-block { background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); position: relative; }
.mk-block.sel { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.mk-block.dragging { opacity: .4; }
.mk-block.drop-before::before, .mk-block.drop-after::after { content: ''; position: absolute; left: 0; right: 0; height: 3px; background: var(--brand); border-radius: 2px; }
.mk-block.drop-before::before { top: -7px; }
.mk-block.drop-after::after { bottom: -7px; }
.mk-bhead { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; }
.mk-block.collapsed .mk-bhead { border-bottom: 0; }
.mk-block.collapsed .mk-bbody { display: none; }
.mk-bhead b { font-size: 13px; white-space: nowrap; }
.mk-sum { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-grip { cursor: grab; color: var(--muted); font-size: 16px; line-height: 1; padding: 2px 4px; border-radius: 4px; }
.mk-grip:hover { background: var(--soft); color: var(--ink); }
.mk-bact { display: flex; gap: 2px; }
.mk-bact button { border: 0; background: none; width: 26px; height: 26px; border-radius: 6px; cursor: pointer; color: var(--ink-2); font-size: 13px; }
.mk-bact button:hover:not(:disabled) { background: var(--soft); }
.mk-bact button:disabled { opacity: .3; cursor: default; }
.mk-bact button.danger:hover { background: var(--bad-bg); color: var(--bad); }
.mk-bbody { padding: 12px 14px 14px; }
.mk-hin { font-size: 17px; font-weight: 700; }
.mk-seg button { padding: 4px 10px; font-size: 12px; }
.mk-img { display: flex; gap: 12px; align-items: flex-start; }
.mk-thumb { width: 84px; height: 60px; flex: none; border: 1px solid var(--line); border-radius: 8px; background: var(--soft) center/cover; display: grid; place-items: center; overflow: hidden; }
.mk-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mk-thumb span { font-size: 11px; color: var(--muted); }
.mk-cols .mk-img { flex-direction: column; }
.mk-cols .mk-thumb { width: 100%; height: 80px; }
.mk-cols .rte-body { min-height: 80px; }
.mk-bbody input[type=range] { width: 100%; accent-color: var(--brand); }
.mk-bbody input[type=color] { width: 34px; height: 26px; padding: 0; border: 1px solid var(--line-2); border-radius: 6px; background: none; cursor: pointer; }
.mk-palette { margin-top: 12px; padding: 12px 14px; }
.mk-pal { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 8px; }
.mk-palitem { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px dashed var(--line-2); background: #fff; border-radius: 8px; padding: 10px 6px; font-weight: 600; font-size: 12.5px; color: var(--ink-2); cursor: grab; }
.mk-palitem i { font-style: normal; font-size: 18px; color: var(--brand); }
.mk-palitem:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, #fff); }
/* preview */
.mk-preview { position: sticky; top: 12px; overflow: hidden; }
.mk-ptools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.mk-frame-wrap { background: #e9e9e9; display: flex; justify-content: center; overflow: auto; }
.mk-frame-wrap iframe { width: 600px; max-width: 100%; height: 72vh; border: 0; background: #fff; transition: width .2s; display: block; }
.mk-modal-frame iframe { height: 65vh; width: 100%; }
.mk-inbox { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.mk-inbox span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-inbox span b { color: var(--ink); font-weight: 600; }
.mk-sendbtn { padding: 11px 18px; font-size: 15px; width: 100%; }
.mk-consent { align-items: flex-start; background: var(--soft); border-radius: 8px; padding: 10px 12px; }
.mk-consent input { margin-top: 2px; flex: none; }
/* report */
.mk-subj { margin: -12px 0 16px; }
.mk-prog { margin-bottom: 16px; }
.mk-progbar { height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.mk-progbar > div { height: 100%; background: var(--brand); border-radius: 4px; transition: width .4s; }
.mk-repgrid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; align-items: start; }
.mk-url { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-filt { flex-wrap: wrap; margin-bottom: 10px; }
.mk-err { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) {
  .mk-design, .mk-review, .mk-repgrid, .mk-two { grid-template-columns: minmax(0, 1fr); }
  .mk-preview { position: static; }
}
@media (max-width: 820px) {
  .mk-aud { grid-template-columns: minmax(0, 1fr); }
  .mk-count { position: static; order: -1; }
  .mk-frame-wrap iframe { height: 60vh; }
  .mk-bhead .mk-sum { display: none; }
}

/* v1.39.0 marketing consent */
.consent-box { border-top: 1px solid var(--line, #e2e2e2); padding-top: 12px; margin-top: 4px; }
.consent-box .consent-detail { margin-top: 10px; }

/* v1.45.0 client page: credit limit from Sage */
.kpis-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.credit-kpi .pct { font-size: 13px; font-weight: 600; color: var(--ok); white-space: nowrap; }
.credit-kpi .pct.warn { color: var(--warn); }
.credit-kpi .pct.bad { color: var(--bad); }
@media (max-width: 1300px) { .kpis-5 { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 820px) { .kpis-5 { grid-template-columns: repeat(2, minmax(0,1fr)); } .kpis-5 > .kpi:last-child { grid-column: span 2; } }

/* v1.48.0 management: credit limit usage */
.mg-bar.ok > div { background: var(--ok); }
.mg-bar.warn > div { background: var(--warn); }
.mg-bar.bad > div { background: var(--bad); }
.mg-row b.mg-cr-warn { color: var(--warn); }
.mg-row b.mg-cr-bad { color: var(--bad); }

/* v1.51.0 Sales dropdown in the side menu */
.nav-dd-head { display: flex; align-items: center; gap: 2px; }
.nav-dd-head .nav-dd-name { flex: 1; min-width: 0; }
.nav button.nav-dd-name { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; background: none; font: inherit; font-weight: 600; font-size: 15px; color: var(--charcoal); border-radius: 6px; cursor: pointer; text-align: left; }
.nav a.nav-dd-name, .nav button.nav-dd-name { font-weight: 600; }
.nav button.nav-dd-name:hover { background: #f4f4f4; }
.nav-dd-tog { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: 6px; cursor: pointer; }
.nav-dd-tog:hover { background: #f4f4f4; color: var(--ink); }
.nav-dd-tog svg { width: 18px; height: 18px; transition: transform .18s ease; }
.nav-dd.open .nav-dd-tog svg { transform: rotate(180deg); }
.nav-dd-items { display: none; gap: 2px; margin: 2px 0 4px 14px; padding-left: 8px; border-left: 1px solid var(--line); }
.nav-dd.open .nav-dd-items { display: grid; }
.nav-dd-items a { font-size: 14px; padding: 7px 10px; }
.nav-dd-items a.active::before { left: -9px; }
.nav-dd.has-active:not(.open) .nav-dd-name { color: var(--brand); }

/* v1.51.0 Sales overview page */
a.so-kpi { color: inherit; text-decoration: none; transition: border-color .15s; }
a.so-kpi:hover { border-color: var(--brand); }
.so-kpi.warn .v { color: var(--warn); }
.so-up { color: var(--ok); font-weight: 600; }
.so-down { color: var(--bad); font-weight: 600; }
.so-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; margin-top: 16px; }
.so-card { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; color: inherit; text-decoration: none; border-top: 3px solid var(--brand); transition: box-shadow .15s, transform .15s; }
.so-card:hover, .so-card:focus-visible { box-shadow: 0 6px 18px rgba(16,24,40,.08); transform: translateY(-1px); outline: none; }
.so-card-head { display: flex; align-items: center; gap: 10px; }
.so-card-head h3 { margin: 0; font-size: 16px; flex: 1; }
.so-ico { width: 32px; height: 32px; border-radius: 8px; background: #faeced; color: var(--brand); display: grid; place-items: center; flex: 0 0 auto; }
.so-ico svg { width: 17px; height: 17px; }
.so-go { width: 18px; color: var(--muted); transform: rotate(180deg); display: grid; }
.so-go svg { width: 18px; height: 18px; }
.so-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.so-stat b { display: block; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1.2; overflow-wrap: anywhere; }
.so-stat span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.3; }
.so-stat.so-warn b { color: var(--warn); }
.so-stat.so-bad b { color: var(--bad); }
.so-note { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin-top: auto; }
.so-att { border-left: 3px solid transparent; padding-left: 10px !important; }
.so-att-bad { border-left-color: var(--bad); }
.so-att-warn { border-left-color: var(--warn); }
.so-att-info { border-left-color: var(--line); }
.so-att-bad b { color: var(--bad); }
.so-att-warn b { color: var(--warn); }
@media (max-width: 760px) { .so-stat b { font-size: 16px; } }
/* v1.49.0 Tasks from email */
.t-mail svg { width: 13px; height: 13px; vertical-align: -2px; color: var(--muted); }
.mail-connect { text-align: center; padding: 34px 20px; display: flex; flex-direction: column; align-items: center; }
.mail-connect-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--info-bg); color: var(--info); display: grid; place-items: center; margin-bottom: 12px; }
.mail-connect-ic svg { width: 24px; height: 24px; }
.mail-bar { display: flex; flex-direction: column; gap: 10px; }
.mail-bar-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mail-bar-opts { display: flex; flex-wrap: wrap; gap: 6px 22px; padding-top: 10px; border-top: 1px solid var(--line); }
.mail-list { list-style: none; margin: 0; padding: 0; }
.mail-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mail-row:last-child { border-bottom: 0; }
.mail-main { flex: 1; min-width: 0; }
.mail-top { display: flex; align-items: baseline; gap: 6px; }
.mail-from { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-when { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.mail-subj { font-size: 14px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-prev { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.mail-row.unread .mail-from, .mail-row.unread .mail-subj { font-weight: 700; }
.mail-row.unread { box-shadow: inset 3px 0 0 var(--info); padding-left: 10px; }
.mail-flag { color: var(--bad); font-size: 13px; }
.mail-imp { color: var(--bad); font-weight: 800; font-size: 13px; }
.mail-act { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.mail-src { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
@media (max-width: 640px) {
  .mail-row { flex-direction: column; gap: 6px; }
  .mail-main { width: 100%; overflow: hidden; }
  .mail-act { align-self: flex-end; }
}
#olFind input { width: 100%; min-width: 0; }

/* v1.50.0 mark email done */
.mail-done { position: relative; display: inline-block; }
.mail-menu { display: none; position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(16,24,40,.12); padding: 4px; min-width: 150px; }
.mail-done.open .mail-menu { display: block; }
.mail-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 6px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink); }
.mail-menu button:hover { background: var(--soft); }
.mail-row.is-done .mail-main { opacity: .55; }
/* v1.45.0 Tech Central dashboards (Aruba Central, FortiAnalyzer, Meraki) */
.v-aruba { --v: #ff8300; } .v-forti { --v: #da291c; } .v-meraki { --v: #049fd9; }
.vlogo { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--v); color: #fff; font-weight: 800; font-size: 16px; flex: none; }
.tcm-mrow .vlogo { width: 26px; height: 26px; font-size: 13px; border-radius: 7px; }
.vchip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 1px 8px 1px 6px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); white-space: nowrap; box-shadow: inset 3px 0 0 var(--v); }
.vchip b { color: var(--bad); }
.vdot { width: 7px; height: 7px; border-radius: 50%; background: #c6c9cf; display: inline-block; }
.vdot.ok { background: var(--ok); } .vdot.down { background: var(--warn); } .vdot.err { background: var(--bad); }
.tcm-sec { margin-bottom: 26px; }
.tcm-sec + .tcm-sec { border-top: 1px solid var(--line); padding-top: 22px; }
.tcm-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.tcm-head h2 { font-size: 17px; margin: 0; }
.tcm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 14px; }
.tcm-grid > .card { margin: 0; }
.tcm-sec .card { margin-bottom: 14px; }
.tcm-type { margin-bottom: 12px; }
.tcm-bar { display: flex; height: 8px; border-radius: 99px; background: #eef0f3; overflow: hidden; margin-top: 5px; }
.tcm-bar.thin { height: 5px; grid-column: 1 / -1; margin-top: 4px; }
.tcm-bar i { display: block; height: 100%; }
.tcm-bar .up { background: var(--ok); } .tcm-bar .down { background: var(--bad); } .tcm-bar .oth { background: #c6c9cf; }
.tcm-top .tr { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 10px; padding: 6px 0; border-bottom: 1px solid var(--soft); }
.tcm-top .tr:last-child { border-bottom: 0; }
.tcm-top .val { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
.tcm-top .tcm-bar .up { background: var(--v, var(--info)); }
.tcm-sec[data-ven=aruba] { --v: #ff8300; } .tcm-sec[data-ven=fortianalyzer] { --v: #da291c; } .tcm-sec[data-ven=meraki] { --v: #049fd9; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.tcm-sparks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; border-top: 1px solid var(--soft); padding-top: 12px; margin-top: 4px; }
.tcm-spark svg { width: 100%; height: 44px; display: block; margin: 4px 0; }
.tcm-spark .ln { fill: none; stroke: var(--info); stroke-width: 2; vector-effect: non-scaling-stroke; }
.tcm-spark .area { fill: var(--info-bg); stroke: none; }
.tcm-spark .pt { fill: var(--info); }
.tcm-spark .ln.bad { stroke: var(--bad); } .tcm-spark .area.bad { fill: var(--bad-bg); } .tcm-spark .pt.bad { fill: var(--bad); }
.tcm-alerts li { align-items: flex-start; }
.sev { flex: none; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 7px; margin-right: 10px; background: #eef0f3; color: #4b5563; min-width: 54px; text-align: center; }
.sev.bad { background: var(--bad-bg); color: var(--bad); } .sev.warn { background: var(--warn-bg); color: var(--warn); } .sev.info { background: var(--info-bg); color: var(--info); }
.dstat { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.dstat::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #c6c9cf; }
.dstat.up { color: var(--ok); } .dstat.up::before { background: var(--ok); }
.dstat.down { color: var(--bad); } .dstat.down::before { background: var(--bad); }
.dstat.alerting { color: var(--warn); } .dstat.alerting::before { background: var(--warn); }
.tcm-err { border-color: var(--bad-bg); background: #fff8f7; margin-bottom: 14px; }
.tcm-warn { margin: -4px 0 10px; } .tcm-warn summary { cursor: pointer; }
.tcm-mrow { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.tcm-mrow.on { border-color: var(--line-2); }
.tcm-mrow .row { gap: 10px; }
.tcm-mfields { margin-top: 12px; }
.tcm-help { background: var(--soft); border-radius: 8px; padding: 8px 10px; }
@media (max-width: 1100px) { .kpis-5 { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 820px) { .kpis-5 { grid-template-columns: repeat(2, minmax(0,1fr)); } .tcm-grid { grid-template-columns: 1fr; } }
.vchips { display: flex; flex-wrap: wrap; gap: 4px; min-width: 140px; }

/* v1.53.0 Service Desk (Tech Central) */
.sd-pri { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .02em; padding: 1px 7px; border-radius: 6px; background: #eef0f3; color: #4b5563; vertical-align: middle; }
.sd-pri.sd-P1 { background: var(--bad); color: #fff; }
.sd-pri.sd-P2 { background: #fde3cf; color: #9a3d00; }
.sd-pri.sd-P3 { background: var(--info-bg); color: var(--info); }
.sd-st { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 99px; background: #eef0f3; color: #4b5563; white-space: nowrap; vertical-align: middle; }
.sd-st-new { background: #efe8fd; color: #5b3cc4; }
.sd-st-open { background: var(--info-bg); color: var(--info); }
.sd-st-pending_client, .sd-st-pending_vendor { background: var(--warn-bg); color: var(--warn); }
.sd-st-resolved { background: var(--ok-bg); color: var(--ok); }
.sd-sla { display: inline-block; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.sd-sla.warn { color: var(--warn); } .sd-sla.bad { color: var(--bad); } .sd-sla.ok { color: var(--ok); } .sd-sla.paused { color: var(--muted); font-style: italic; }
.sd-esc { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px; background: var(--bad-bg); color: var(--bad); vertical-align: middle; }
.sd-count-bad { background: var(--bad-bg) !important; color: var(--bad) !important; }
.sd-dotnew { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--info); vertical-align: middle; }
.sd-tbl .sd-subj { max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-tbl tr.sd-awaiting .sd-subj { font-weight: 700; color: var(--info); }
.sd-tn { white-space: nowrap; }
.sd-views button { padding: 5px 10px; }
.sd-qnote { padding: 8px 20px; background: var(--soft); border-bottom: 1px solid var(--line); }
.sd-mailbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; font-size: 13.5px; }
.sd-mailbar.err { border-color: #f3c2bc; background: #fffafa; }
.sd-kpis .sd-k { cursor: pointer; } .sd-kpis .sd-k:hover { border-color: var(--line-2); box-shadow: 0 2px 6px rgba(16,24,40,.08); }
.sd-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sd-grid > .stack > .card { margin: 0; }
@media (max-width: 1100px) { .sd-grid { grid-template-columns: 1fr; } }
.sd-alerts { max-height: 420px; overflow-y: auto; }
.sd-alert { display: flex; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; align-items: flex-start; }
.sd-alert:last-child { border-bottom: 0; }
.sd-alert:hover { background: #fafbfd; }
.sd-al-ic { flex: none; width: 14px; text-align: center; font-size: 12px; line-height: 20px; }
.sd-alert.bad .sd-al-ic { color: var(--bad); } .sd-alert.warn .sd-al-ic { color: #c98300; } .sd-alert.info .sd-al-ic { color: var(--info); }
.sd-al-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sd-al-kind { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sd-alert.bad .sd-al-kind { color: var(--bad); } .sd-alert.warn .sd-al-kind { color: var(--warn); }
.sd-al-txt { font-size: 13.5px; }
.sd-alcount { font-size: 11.5px; font-weight: 700; border-radius: 99px; padding: 1px 8px; }
.sd-alcount.bad { background: var(--bad-bg); color: var(--bad); } .sd-alcount.warn { background: var(--warn-bg); color: var(--warn); } .sd-alcount.info { background: var(--info-bg); color: var(--info); }
.sd-bars { height: 190px; gap: 3px; }
.sd-bars .vb-col { min-width: 6px; }
.sd-bars .vb { width: 46%; }
.sd-line { width: 100%; height: auto; display: block; }
.sd-area.s1 { fill: color-mix(in srgb, var(--series-1) 14%, transparent); stroke: none; }
.sd-target { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; }
.hbar.sd-click { cursor: pointer; }
.hb-fill.sd-hb-P1, .hb-fill.sd-hb-bad { background: var(--bad); }
.hb-fill.sd-hb-P2, .hb-fill.sd-hb-mid { background: #eb8a34; }
.hb-fill.sd-hb-P3 { background: var(--series-1); }
.hb-fill.sd-hb-P4, .hb-fill.sd-hb-un { background: #9aa3af; }
.hb-fill.sd-hb-ok { background: var(--ok); }
.sd-heat { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 10.5px; color: var(--muted); }
.sd-heat .hx { text-align: left; }
.sd-heat .hy { line-height: 18px; }
.sd-heat .hc { height: 18px; border-radius: 3px; background: color-mix(in srgb, var(--series-1) calc(var(--a) * 100%), #f1f3f6); }
.sd-matrix .sd-lv { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sd-matrix .sd-lv b { flex: none; width: 30px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: var(--soft); border: 1px solid var(--line); font-size: 12px; }
.sd-rules { margin: 6px 0 12px; padding-left: 18px; } .sd-rules li { margin: 3px 0; }
.sd-users { max-height: 170px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; display: flex; flex-direction: column; gap: 4px; }
.sd-hint { display: block; margin: 2px 0 0 24px; font-size: 12px; }
.sd-clocks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sd-clock { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--info); border-radius: var(--radius); padding: 10px 14px; }
.sd-clock.warn { border-left-color: #e0a100; } .sd-clock.bad { border-left-color: var(--bad); } .sd-clock.ok { border-left-color: var(--ok); } .sd-clock.paused { border-left-color: #9aa3af; }
.sd-clock.bad strong { color: var(--bad); } .sd-clock.warn strong { color: var(--warn); } .sd-clock.ok strong { color: var(--ok); }
.sd-clk-l { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sd-prog { height: 5px; background: #eef0f3; border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.sd-prog i { display: block; height: 100%; background: var(--info); }
.sd-clock.warn .sd-prog i { background: #e0a100; } .sd-clock.paused .sd-prog i { background: #9aa3af; }
@media (max-width: 700px) { .sd-clocks { grid-template-columns: 1fr; } }
.sd-thread { padding: 6px 20px 16px; }
.sd-msg { border: 1px solid var(--line); border-radius: 10px; margin-top: 12px; overflow: hidden; }
.sd-msg-h { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: var(--soft); border-bottom: 1px solid var(--line); }
.sd-msg-h .avatar { width: 28px; height: 28px; font-size: 11px; }
.sd-msg-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sd-msg-who .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
.sd-msg-b { padding: 12px 14px; overflow-wrap: anywhere; overflow-x: auto; }
.sd-msg-b p { margin: 0 0 8px; } .sd-msg-b p:last-child { margin-bottom: 0; }
.sd-msg-b blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--line); color: var(--muted); }
.sd-msg-b table { border-collapse: collapse; max-width: 100%; } .sd-msg-b td, .sd-msg-b th { padding: 2px 6px; }
.sd-msg.out { border-color: #e9c9cb; } .sd-msg.out .sd-msg-h { background: #fbf1f1; }
.sd-msg.note { border-color: #eedfb5; } .sd-msg.note .sd-msg-h, .sd-msg.note .sd-msg-b { background: var(--internal); }
.sd-msg.staffin .sd-msg-h { background: #f3f5f8; }
.sd-sys { margin-top: 12px; font-size: 12.5px; color: var(--ink-2); padding: 6px 12px; border-left: 3px solid var(--line-2); background: var(--soft); border-radius: 0 8px 8px 0; }
.sd-sys p, .sd-sys ul { margin: 0; display: inline; } .sd-sys ul { display: block; padding-left: 18px; }
.sd-files { padding: 0 14px 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.sd-files a { font-size: 12.5px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); text-decoration: none; }
.sd-files a:hover { border-color: var(--line-2); background: var(--soft); }
.sd-mailerr { padding: 8px 14px; background: var(--bad-bg); color: var(--bad); font-size: 12.5px; }
.sd-compose.note .card-body { background: var(--internal); }
.sd-props .field { margin-bottom: 8px; } .sd-props .field > span { font-size: 11.5px; margin-bottom: 3px; }
.sd-props .input { padding: 6px 9px; font-size: 13px; }
.sd-mini { display: flex; align-items: center; gap: 6px; padding: 4px 0; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.sd-mini:last-child { border-bottom: 0; } .sd-mini .ell { flex: 1; min-width: 0; }
.sd-time { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.sd-time a { color: var(--muted); text-decoration: none; }
.sd-events { max-height: 260px; overflow-y: auto; } .sd-events > div { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.sd-escopt { align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; width: 100%; }
.sd-canned { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sd-canned > div:first-child { min-width: 0; }
.sd-tc-count { display: inline-block; min-width: 22px; text-align: center; font-weight: 700; font-size: 12px; padding: 1px 7px; border-radius: 99px; background: var(--info-bg); color: var(--info); text-decoration: none; }

/* v2.1.0 Service Desk: choose the client on calls the Hub couldn't match */
.sd-clbox { border-color: #f1d48a; background: var(--warn-bg); transition: box-shadow .3s; }
.sd-clbox .card-head h3 { color: var(--warn); }
.sd-clbox.flash { box-shadow: 0 0 0 3px #f1d48a; }
.sd-clopts .check { display: flex; gap: 6px; align-items: baseline; margin: 3px 0; }
.sd-clsug { background: #fff; }
.sd-noclient-off { padding: 2px 4px; }
