:root {
  --bg: #f6f7f4; --panel: #ffffff; --ink: #14211d; --muted: #5d6b66; --line: #e3e7e2;
  --brand: #0f5c4d; --brand-2: #e7f1ee; --accent: #c8781e; --danger: #b3372f; --ok: #2f7d4f;
  --radius: 10px; --shadow: 0 1px 2px rgba(20,33,29,.06), 0 4px 16px rgba(20,33,29,.05);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1513; --panel: #17201d; --ink: #e8eeeb; --muted: #95a39e; --line: #26322e; --brand: #4fb39b; --brand-2: #1c2d28; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 14px; line-height: 1.45; }
a { color: var(--brand); }
h1, h2, h3 { margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* layout */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.logo { font-weight: 700; font-size: 17px; padding: 4px 10px 18px; display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.logo i { width: 22px; height: 22px; border-radius: 6px; background: url(/shared/icon.svg) center / cover no-repeat; display: inline-block; position: relative; }
.nav a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; margin-bottom: 2px; }
.nav a:hover { background: var(--bg); }
.nav a.active { background: var(--brand-2); color: var(--brand); font-weight: 600; }
.side .foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--line); }
main { padding: 26px 30px 60px; max-width: 1200px; width: 100%; min-width: 0; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat .n { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }

/* controls */
button, .btn { font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 7px 12px; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; justify-content: center; }
button:hover, .btn:hover { border-color: var(--muted); }
.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.primary:hover { filter: brightness(1.08); border-color: var(--brand); }
.danger { color: var(--danger); }
.link { border: 0; background: none; padding: 0; color: var(--brand); }
input, select, textarea { font: inherit; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); border-color: var(--brand); }
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > * { flex: 1; }
.row > .shrink { flex: 0 0 auto; }

/* tables & lists */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--bg); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.sent { background: #fff4e5; color: #8a5210; border-color: #f2d6ad; }
.pill.paid, .pill.done { background: #e6f4ec; color: var(--ok); border-color: #bfe1cc; }
.pill.draft { background: var(--bg); }
.pill.overdue { background: #fbeae8; color: var(--danger); border-color: #f0c3bf; }
.list > div { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.list > div:last-child { border-bottom: 0; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* kanban */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--brand-2); border-radius: var(--radius); padding: 10px; min-height: 300px; }
.col h3 { font-size: 13px; display: flex; justify-content: space-between; }
.col.over { outline: 2px dashed var(--brand); }
.jobcard { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; cursor: grab; box-shadow: var(--shadow); }
.jobcard b { display: block; margin-bottom: 2px; }

/* tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 0 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { border: 0; border-radius: 0; background: none; padding: 10px 12px; white-space: nowrap; border-bottom: 2px solid transparent; color: var(--muted); }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; padding: 4px; }
.bubble { max-width: 75%; padding: 9px 12px; border-radius: 12px; background: var(--bg); white-space: pre-wrap; }
.bubble.me { align-self: flex-end; background: var(--brand); color: #fff; }
.bubble .meta { font-size: 11px; opacity: .7; margin-top: 3px; }

/* modal & toast */
.modal-bg { position: fixed; inset: 0; background: rgba(10,20,17,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border-radius: 14px; padding: 20px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; }
#toast.show { opacity: 1; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth .card { width: 100%; max-width: 400px; padding: 28px; }

.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 20px; text-align: center; color: var(--muted); cursor: pointer; }
.drop.over { border-color: var(--brand); color: var(--brand); }
.progress { height: 6px; background: var(--line); border-radius: 9px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand); }

.menu-btn { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 30% 0 0; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; }
  .menu-btn { display: inline-flex; }
  main { padding: 16px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g2 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}

@media print { .noprint { display: none !important; }
  .side, .head .row.shrink, .menu-btn, #toast { display: none !important; }
  .shell { display: block; } main { padding: 0; } .card { box-shadow: none; border: 0; }
  body, :root { background: #fff; color: #000; }
}

/* ---------- v0.2 ---------- */
.block { width: 100%; justify-content: center; margin-top: 6px; padding: 10px; }
.secure { margin-top: 16px; text-align: center; }
.logo img { display: block; }
code.key { display: block; font-size: 15px; letter-spacing: .08em; padding: 8px 10px; background: var(--bg); border-radius: 8px; border: 1px solid var(--line); margin-bottom: 6px; word-break: break-all; }
.pill.locked { background: #fbeae8; color: var(--danger); border-color: #f0c3bf; }
.pill.ok { background: #e6f4ec; color: var(--ok); border-color: #bfe1cc; }
.pill.warn { background: #fff4e5; color: #8a5210; border-color: #f2d6ad; }
.pill.info { background: var(--brand-2); color: var(--brand); border-color: transparent; }
.sub-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.sub-tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; } .kv > :nth-child(odd) { color: var(--muted); }
.copy { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--bg); padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); word-break: break-all; }
.note { background: var(--brand-2); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.note.warn { background: #fff4e5; color: #6b4210; }
@media (prefers-color-scheme: dark) { .note.warn { background: #3a2a14; color: #f1d4a8; } }

/* timeline */
.tl { display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; padding: 4px; }
.tl .ev { max-width: 80%; padding: 9px 12px; border-radius: 12px; background: var(--bg); white-space: pre-wrap; border: 1px solid var(--line); }
.tl .ev.out { align-self: flex-end; background: var(--brand-2); border-color: transparent; }
.tl .ev .meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.ch { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; margin-right: 6px; }
.ch.sms { color: #1f6feb; } .ch.email { color: #8250df; } .ch.voice { color: #bf8700; } .ch.fax { color: #57606a; } .ch.portal { color: var(--brand); }
.compose .chan { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.compose .chan button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal .dow { font-size: 11px; color: var(--muted); padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-transform: uppercase; }
.cal .day { min-height: 104px; padding: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; background: var(--panel); }
.cal .day:hover { background: var(--bg); }
.cal .day.other { opacity: .45; } .cal .day.today .n { background: var(--brand); color: #fff; border-radius: 99px; padding: 0 6px; }
.cal .n { font-size: 12px; font-weight: 600; display: inline-block; margin-bottom: 2px; }
.cal .e { display: block; font-size: 11px; padding: 2px 5px; border-radius: 4px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 0; width: 100%; text-align: left; cursor: pointer; }
.e.appt { background: var(--brand); color: #fff; } .e.pending { background: #fff4e5; color: #8a5210; }
.e.bday { background: #fde7f3; color: #9a1b5e; } .e.due { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
@media (max-width: 860px) { .cal .day { min-height: 64px; } .cal .e { font-size: 10px; } }

/* signing */
.steps-bar { display: flex; gap: 6px; margin-bottom: 14px; } .steps-bar span { flex: 1; text-align: center; font-size: 12px; padding: 6px; border-radius: 8px; background: var(--bg); color: var(--muted); }
.steps-bar span.on { background: var(--brand); color: #fff; font-weight: 600; } .steps-bar span.done { background: var(--brand-2); color: var(--brand); }
.pdf { width: 100%; height: 60vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.sigpad { width: 100%; height: 160px; border: 2px dashed var(--line); border-radius: 10px; background: #fff; touch-action: none; display: block; }
.q { padding: 12px 0; border-bottom: 1px solid var(--line); } .q:last-child { border-bottom: 0; }
.q label.opt { display: flex; gap: 10px; align-items: center; color: var(--ink); font-size: 14px; margin: 6px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.q label.opt input { width: auto; } .q label.opt:has(input:checked) { border-color: var(--brand); background: var(--brand-2); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.slots button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.swatch { width: 38px; height: 38px; padding: 2px; flex: 0 0 auto; }
.row > input[type=checkbox], .row > input[type=radio], .row > input[type=color] { flex: 0 0 auto; }
.copy { display: block; margin: 2px 0 8px; }
.bubble, .tl .ev { white-space: normal; } .bubble .body, .tl .ev .body { white-space: pre-wrap; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
a.card { text-decoration: none; color: inherit; }

/* marketing */
.mk-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.mk-editor .card { margin-bottom: 12px; }
.mk-block textarea { resize: vertical; }
.mk-preview { position: sticky; top: 16px; }
.mk-preview iframe { width: 100%; max-width: 600px; height: calc(100vh - 140px); min-height: 480px; border: 1px solid var(--line); border-radius: var(--radius); background: #f4f6f5; display: block; margin: 0 auto; }
.sms-bubble { background: #e9e9eb; color: #111; border-radius: 18px; padding: 10px 14px; max-width: 280px; white-space: pre-wrap; font-size: 14px; margin: 8px 0 12px; }
@media (max-width: 900px) { .mk-editor { grid-template-columns: 1fr; } .mk-preview { position: static; } .mk-preview iframe { height: 560px; } }
/* proposals and organizers */
.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; width: 90px; display: inline-block; vertical-align: middle; margin-right: 6px; }
.bar i { display: block; height: 100%; background: var(--brand); }
.qrow { border-top: 1px solid var(--line); padding: 10px 0 4px; margin-top: 8px; }
.qrow .row.small input, .qrow .row.small select { font-size: 12px; padding: 6px 8px; margin-top: 6px; }
.card.click { cursor: pointer; } .card.click:hover { border-color: var(--brand); }
.nav a.active { color: var(--brand); }
@media (prefers-color-scheme: dark) { .nav a.active { color: #8fd9c6; } }
/* dark mode: the firm's brand colour is often dark, so text in that colour switches to a light tint */
@media (prefers-color-scheme: dark) { a, .link, .tabs button.on, .pill.info { color: #8fd9c6; } }
/* automation builder */
.flow-start { border-color: var(--brand); background: var(--brand-2); margin-bottom: 0; }
.flow-line { width: 2px; height: 14px; background: var(--line); margin: 0 auto; }
.mk-editor .flow-line + .card { margin-top: 0; }
/* shared inbox */
.ibx { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 14px; align-items: start; }
.ibx-list { padding: 6px; max-height: calc(100vh - 200px); overflow: auto; }
.ibx-item { padding: 10px; border-radius: 8px; cursor: pointer; border-bottom: 1px solid var(--line); }
.ibx-item:hover { background: var(--bg); } .ibx-item.on { background: var(--brand-2); }
.msg-body { white-space: pre-wrap; margin: 14px 0; padding: 12px; background: var(--bg); border-radius: 8px; max-height: 360px; overflow: auto; }
.ai-btn { color: #6b4fbb; } @media (prefers-color-scheme: dark) { .ai-btn { color: #b9a6f2; } }
@media (max-width: 900px) { .ibx { grid-template-columns: 1fr; } }
/* report bars */
.bars { display: grid; gap: 6px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 8px; align-items: center; font-size: 12px; }
.bar-row .bl { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bt { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; } .bar-row .bt i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.bar-row .bv { font-variant-numeric: tabular-nums; }
.nav-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 10px 4px; }
.side { overflow-y: auto; }
.nav a { padding: 6px 10px; }
/* subscription */
.sub-banner { background: var(--brand-2); border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 14px; }
.sub-banner.warn-b { background: #fff4e5; color: #6b4210; } .sub-banner.danger-b { background: #fbeae8; color: #7a1f17; }
@media (prefers-color-scheme: dark) { .sub-banner.warn-b { background: #3a2a14; color: #f1d4a8; } .sub-banner.danger-b { background: #3a1714; color: #f3c1bb; } }
.nav a .lock { font-size: 10px; opacity: .6; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } @media (max-width: 900px) { .g3 { grid-template-columns: 1fr; } }
.plan-amt { font-size: 28px; font-weight: 700; margin: 6px 0; } .plan-amt small { font-size: 13px; font-weight: 400; color: var(--muted); }
.cur-plan { border: 2px solid var(--brand); }
.bill-toggle { display: inline-flex; gap: 4px; background: var(--line); padding: 4px; border-radius: 99px; }
.bill-toggle button { border: 0; border-radius: 99px; background: none; padding: 6px 12px; font-size: 13px; } .bill-toggle button.on { background: var(--panel); box-shadow: var(--shadow); font-weight: 600; }

/* v1.0 horizontal result bars (surveys, sources) */
.hbar { display: grid; grid-template-columns: minmax(70px, 30%) 1fr 44px; gap: 8px; align-items: center; font-size: 13px; margin: 4px 0; }
.hbar > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.hbar > div { background: var(--bg); border-radius: 99px; height: 10px; overflow: hidden; }
.hbar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.hbar b { text-align: right; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; margin-right: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
/* phones: wide tables scroll sideways inside their card instead of hiding the last columns (actions) */
@media (max-width: 700px) { .card table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; } .card table td, .card table th { min-width: 0; } }
.split2 { grid-template-columns: minmax(220px, 320px) 1fr; }
@media (max-width: 700px) { .split2 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .head > .row.shrink, .head > .row.shrink > .row.shrink { flex: 1 1 100%; min-width: 0; } }
.hide { display: none !important; }

.drop.disabled { opacity: .5; }
.tree a { display: flex; justify-content: space-between; padding: 4px 8px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 13px; cursor: pointer; }
.tree a:hover { background: var(--bg); }
.tree a.on { background: var(--brand-2); color: var(--brand); font-weight: 600; }
.tree .sec { font-weight: 600; margin: 10px 0 2px; font-size: 13px; }
.tree .yr { margin: 6px 0 2px 8px; font-size: 12px; color: var(--muted); }
.tree .f { margin-left: 16px; }
.split-docs { display: grid; grid-template-columns: 260px 1fr; gap: 14px; }
@media (max-width: 800px) { .split-docs { grid-template-columns: 1fr; } }

/* tax return workflow (plan B) */
.wf-steps { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 14px; }
.wf-steps li { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); padding: 3px 0; }
.wf-steps li.done { color: var(--ink); }
.wf-steps li.current { color: var(--ink); font-weight: 600; }
.wf-steps li.skipped { opacity: .55; text-decoration: line-through; }
.wf-dot { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); display: inline-grid; place-items: center; font-size: 11px; line-height: 1; }
.wf-dot.done { background: var(--brand); border-color: var(--brand); color: #fff; }
.wf-dot.cur { border-color: var(--brand); box-shadow: inset 0 0 0 3px var(--panel), inset 0 0 0 9px var(--brand); }
.wf-ret { margin-bottom: 12px; }
.wf-board .col { min-width: 210px; }
.jobcard.overdue { border-left: 3px solid var(--danger); }
.jobcard.done { opacity: .6; }
/* portal tracker */
.tracker { list-style: none; margin: 14px 0 0; padding: 0; }
.tracker li { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 0 0 16px; color: var(--muted); }
.tracker li::before { content: ''; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.tracker li:last-child::before { display: none; }
.tracker li.done::before { background: var(--brand); }
.tracker li.done, .tracker li.current { color: var(--ink); }
.tracker li.current { font-weight: 600; }
.tracker .wf-dot { flex: 0 0 22px; width: 22px; height: 22px; background: var(--panel); position: relative; z-index: 1; }
.tracker .wf-dot.done { background: var(--brand); }
.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 8px 0 4px; }
.progress > i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }

/* softphone (plan E) */
#phone-fab { position: fixed; right: 18px; bottom: 18px; width: 48px; height: 48px; border-radius: 50%; font-size: 20px; z-index: 40; box-shadow: var(--shadow); background: var(--panel); padding: 0; }
#phone-fab.ready { border-color: var(--brand); color: var(--brand); }
#phone-fab.live { background: var(--brand); color: #fff; border-color: var(--brand); }
#phone-fab.ringing { background: var(--accent); color: #fff; border-color: var(--accent); animation: phring 1s infinite; }
@keyframes phring { 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { #phone-fab.ringing { animation: none; } }
#phone { position: fixed; right: 18px; bottom: 76px; width: 320px; max-width: calc(100vw - 24px); max-height: calc(100vh - 100px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.18); z-index: 45; padding: 12px; }
.ph-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ph-head .ph-st { flex: 1; color: var(--muted); } .ph-st.ready { color: var(--ok); } .ph-st.offline { color: var(--danger); }
.ph-tabs { margin-bottom: 10px; }
.ph-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.ph-pad button { padding: 12px 0; font-size: 17px; }
.ph-who { font-size: 19px; font-weight: 700; margin: 2px 0; }
.ph-pop { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 10px 0; background: var(--bg); }
.ph-client { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); margin-bottom: 6px; }
.ph-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 6px 0; } .ph-facts span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ph-last { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; display: grid; gap: 4px; }
.ph-ctl { gap: 6px; margin-bottom: 8px; } .ph-ctl button { flex: 1; padding: 7px 4px; font-size: 13px; } .ph-ctl button.on { background: var(--brand-2); border-color: var(--brand); color: var(--brand); }
#ph-note { margin-bottom: 8px; }
.ph-row { padding: 8px 0; border-bottom: 1px solid var(--line); } .ph-row .link { padding: 0; text-align: left; }
.ph-m { display: block; padding: 6px 0; text-align: left; width: 100%; }
.ph-x { display: grid; gap: 6px; margin-bottom: 8px; }
body.phone-only .shell, body.phone-only #phone-fab { display: none; }
body.phone-only #phone { position: static; width: auto; max-width: none; max-height: none; border: 0; box-shadow: none; border-radius: 0; min-height: 100vh; }

/* secret keys in Settings → Integrations: masked text, never a password field (browsers would autofill the sign-in) */
input.masked { -webkit-text-security: disc; text-security: disc; font-family: monospace; }
