:root {
  --violet: #0E7490; --pink: #0D9488; --honey: #F59E0B; --grad: linear-gradient(135deg, #0284C7, #0D9488);
  --bg: #f5f8fa; --panel: #fff; --ink: #1c1830; --text: #2b2840; --muted: #6b6880; --line: #e3e9ee; --soft: #ecf5f4;
  --ok: #059669; --warn: #d97706; --bad: #dc2626; --info: #2563eb;
  --radius: 12px; --shadow: 0 1px 2px rgba(28,24,48,.06), 0 4px 16px rgba(28,24,48,.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --violet: #22D3EE; --bg: #121019; --panel: #1b1825; --ink: #f4f2fb; --text: #ddd9ea; --muted: #9b97ad; --line: #2e2a3d; --soft: #241f33; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: 'Poppins', 'Inter', sans-serif; color: var(--ink); margin: 0 0 .4em; line-height: 1.2; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 14px; }
a { color: var(--violet); }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { display: grid; place-items: center; height: 100vh; }
.boot img { animation: pulse 1.2s infinite ease-in-out; }
@keyframes pulse { 50% { opacity: .4; transform: scale(.94); } }

/* layout */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.shell > div { min-width: 0; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 18px 'Poppins', sans-serif; color: var(--ink); padding: 4px 8px 16px; text-decoration: none; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--soft); }
.nav a.on { background: var(--soft); color: var(--violet); }
.nav svg { width: 18px; height: 18px; flex: none; }
.side .foot { margin-top: auto; font-size: 12px; color: var(--muted); padding: 8px; display: grid; gap: 6px; }
.meter { height: 5px; background: var(--line); border-radius: 9px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--grad); }
main { padding: 24px 28px 60px; min-width: 0; }
.head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.head h1 { margin: 0; margin-right: auto; }
.topbar { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; position: fixed; inset: 0 30% 0 0; z-index: 30; height: auto; box-shadow: var(--shadow); }
  .side.open { display: flex; }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  main { padding: 16px; }
}

/* parts */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stack { display: grid; gap: 10px; }
.muted { color: var(--muted); } .small { font-size: 12px; }
.spacer { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); border-radius: 9px; padding: 7px 12px; cursor: pointer; font-weight: 500; text-decoration: none; color: var(--text); white-space: nowrap; }
.btn:hover { border-color: var(--violet); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--grad); color: #fff; border: 0; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 4px 8px; font-size: 12px; }
.btn svg { width: 16px; height: 16px; }
input[type=text], input[type=password], input[type=url], input[type=search], input[type=datetime-local], input[type=time], input:not([type]), select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: 9px; padding: 8px 10px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 18%, transparent); }
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
label.f { display: grid; gap: 4px; font-weight: 500; }
label.f > span { font-size: 12px; color: var(--muted); font-weight: 500; }
.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 8px 12px; cursor: pointer; border-bottom: 2px solid transparent; font-weight: 500; color: var(--muted); white-space: nowrap; }
.tabs button.on { color: var(--violet); border-color: var(--violet); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--muted); }
.pill.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.pill.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.pill.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.pill.info { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.err { color: var(--bad); }
.notice { background: var(--soft); border-radius: 10px; padding: 10px 12px; }
.notice.bad { background: color-mix(in srgb, var(--bad) 10%, transparent); color: var(--bad); }
code, pre { font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
pre { background: var(--soft); border-radius: 10px; padding: 12px; overflow-x: auto; margin: 0; white-space: pre-wrap; word-break: break-all; }

/* network badge */
.net { --c: #888; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--c); color: #fff; font: 700 10px/1 'Inter', sans-serif; flex: none; }
.net.lg { width: 36px; height: 36px; border-radius: 10px; font-size: 13px; }
.av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--soft); flex: none; }
.av-wrap { position: relative; display: inline-flex; }
.av-wrap .net { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; font-size: 8px; border-radius: 5px; border: 2px solid var(--panel); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--violet) 18%, transparent), transparent), var(--bg); }
.login .card { width: min(420px, 100%); padding: 28px; display: grid; gap: 14px; }

/* compose */
.compose { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
@media (max-width: 1150px) { .compose { grid-template-columns: 1fr; } }
.picker { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { border: 2px solid transparent; border-radius: 99px; padding: 2px; background: none; cursor: pointer; opacity: .45; filter: grayscale(1); transition: .12s; }
.pick.on { opacity: 1; filter: none; border-color: var(--violet); }
.pick:disabled { cursor: not-allowed; }
.counters { display: flex; gap: 6px; flex-wrap: wrap; }
.counter { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 8px 2px 2px; border-radius: 99px; background: var(--soft); }
.counter .net { width: 18px; height: 18px; font-size: 8px; border-radius: 99px; }
.counter.over { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); font-weight: 600; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--soft); border: 1px solid var(--line); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; line-height: 1; }
.thumb .alt { position: absolute; left: 3px; bottom: 3px; font-size: 10px; padding: 1px 5px; border-radius: 5px; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.thumb .alt.has { background: var(--ok); }
.ai-box { border: 1px dashed color-mix(in srgb, var(--violet) 45%, var(--line)); background: color-mix(in srgb, var(--violet) 4%, var(--panel)); }
.option { border: 1px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; background: var(--panel); text-align: left; width: 100%; }
.option:hover { border-color: var(--violet); }
.option p { margin: 4px 0 0; white-space: pre-wrap; max-height: 110px; overflow: hidden; color: var(--muted); font-size: 13px; }
.problems { margin: 0; padding-left: 18px; color: var(--bad); }
.when { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.when label { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; cursor: pointer; display: flex; gap: 8px; align-items: flex-start; }
.when label:has(input:checked) { border-color: var(--violet); background: var(--soft); }
.when small { display: block; color: var(--muted); }

/* previews (generic, not network look-alikes) */
.previews { display: grid; gap: 12px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; padding-bottom: 8px; }
.pv { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pv-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; }
.pv-head b { display: block; font-size: 13px; color: var(--ink); }
.pv-head small { color: var(--muted); font-size: 12px; }
.pv-title { padding: 0 12px; font-weight: 600; }
.pv-text { padding: 2px 12px 10px; white-space: pre-wrap; word-break: break-word; font-size: 13.5px; }
.pv-text .more { color: var(--muted); }
.pv-text .tag { color: var(--info); }
.pv-media { display: grid; gap: 2px; grid-template-columns: repeat(2, 1fr); }
.pv-media.n1 { grid-template-columns: 1fr; }
.pv-media img, .pv-media video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--soft); }
.pv-media.n1 img, .pv-media.n1 video { aspect-ratio: auto; max-height: 360px; }
.pv-media.vertical img, .pv-media.vertical video { aspect-ratio: 9/16; max-height: 420px; }
.pv-foot { display: flex; gap: 14px; padding: 8px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); gap: 1px; }
.cal .dow { background: var(--panel); padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.day { background: var(--panel); min-height: 118px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.day.week { min-height: 420px; }
.day.out { background: color-mix(in srgb, var(--panel) 60%, var(--bg)); }
.day.out .dnum { opacity: .45; }
.day.today .dnum { background: var(--grad); color: #fff; }
.day.drop { outline: 2px dashed var(--violet); outline-offset: -3px; }
.dnum { font-size: 12px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.day .add { opacity: 0; margin-left: auto; }
.day:hover .add { opacity: 1; }
.chip { display: flex; align-items: center; gap: 5px; border-radius: 7px; padding: 3px 6px; font-size: 12px; background: var(--soft); border-left: 3px solid var(--muted); cursor: grab; min-width: 0; text-align: left; border-top: 0; border-right: 0; border-bottom: 0; width: 100%; }
.chip span.t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip .dots { display: inline-flex; gap: 1px; flex: none; }
.chip .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.chip.scheduled { border-left-color: var(--info); }
.chip.published { border-left-color: var(--ok); cursor: pointer; }
.chip.failed, .chip.partial { border-left-color: var(--bad); }
.chip.draft { border-left-color: var(--muted); border-left-style: dashed; }
@media (max-width: 700px) { .day { min-height: 80px; } .chip span.t { display: none; } }

/* lists */
.post-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.post-row:last-child { border-bottom: 0; }
.post-row .txt { white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.targets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.target { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 8px 2px 2px; border-radius: 99px; background: var(--soft); text-decoration: none; color: inherit; }
.target .net { width: 18px; height: 18px; font-size: 8px; border-radius: 99px; }
.target.failed { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
@media (max-width: 700px) { .post-row { grid-template-columns: 1fr; } }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.mitem { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; text-align: left; padding: 0; }
.mitem.sel { outline: 3px solid var(--violet); }
.mitem img, .mitem video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--soft); }
.mitem div { padding: 6px 8px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop-zone { border: 2px dashed var(--line); border-radius: 12px; padding: 20px; text-align: center; color: var(--muted); }
.drop-zone.over { border-color: var(--violet); background: var(--soft); }

.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.acc { display: flex; align-items: center; gap: 10px; }
.acc .who { min-width: 0; flex: 1; }
.acc .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.add-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.add-net { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); cursor: pointer; text-align: left; }
.add-net:hover:not(:disabled) { border-color: var(--violet); }
.add-net:disabled { opacity: .55; cursor: not-allowed; }
.add-net small { display: block; color: var(--muted); font-size: 11px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.kpi b { display: block; font: 700 24px 'Poppins', sans-serif; color: var(--ink); }
.kpi span { color: var(--muted); font-size: 12px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .axis { fill: var(--muted); font-size: 10px; }
.chart .gridline { stroke: var(--line); }
table.t { width: 100%; border-collapse: collapse; }
table.t th, table.t td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { font-size: 12px; color: var(--muted); font-weight: 600; }
.bar { height: 8px; border-radius: 9px; background: var(--grad); }

.skip-grid { display: grid; grid-template-columns: 140px repeat(7, 1fr); gap: 4px; align-items: center; font-size: 12px; }
.skip-grid .h { font-weight: 600; color: var(--muted); text-align: center; }
.skip-grid label { display: grid; place-items: center; }
.times { display: flex; gap: 6px; flex-wrap: wrap; }
.times .pill { padding: 4px 6px 4px 10px; font-size: 13px; }
.times .pill button { border: 0; background: none; cursor: pointer; color: inherit; padding: 0 2px; }

/* modal + toast */
.modal-bg { position: fixed; inset: 0; background: rgba(15,12,30,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border-radius: 16px; width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.25); display: grid; gap: 12px; }
.modal.wide { width: min(900px, 100%); }
#toasts { position: fixed; bottom: 16px; right: 16px; display: grid; gap: 8px; z-index: 60; }
.toast { background: var(--ink); color: var(--panel); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); max-width: 360px; animation: up .2s; }
.toast.bad { background: var(--bad); color: #fff; }
@keyframes up { from { transform: translateY(8px); opacity: 0; } }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rot .7s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }
@media (max-width: 700px) {
  .cal.wk { grid-template-columns: 1fr; }
  .cal.wk .day { min-height: 0; flex-direction: column; }
  .cal.wk .chip span.t { display: inline; }
}

/* SendBuzzPro additions */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.copy { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.copy code { overflow-wrap: anywhere; background: var(--soft); padding: 2px 6px; border-radius: 6px; }
.rec-ok { color: var(--ok); font-weight: 600; } .rec-missing { color: var(--warn); font-weight: 600; } .rec-wrong { color: var(--bad); font-weight: 600; } .rec-opt { color: var(--muted); font-weight: 600; }
.banner { border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.banner.warn { background: color-mix(in srgb, var(--warn) 14%, var(--panel)); }
.banner.bad { background: color-mix(in srgb, var(--bad) 12%, var(--panel)); }
.switch { position: relative; width: 44px; height: 24px; border-radius: 99px; background: var(--line); border: 0; cursor: pointer; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 3px #0003; }
.switch.on { background: var(--bad); } .switch.on::after { left: 23px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.steps li { counter-increment: s; display: flex; gap: 10px; align-items: center; }
.steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font-weight: 700; font-size: 12px; flex: none; }
.steps li.done::before { content: '✓'; background: var(--ok); color: #fff; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { padding: 4px 0 8px 14px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--violet); }
.st { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--muted); white-space: nowrap; }
.st.sent, .st.queued, .st.sending, .st.scheduled { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.st.delivered, .st.opened, .st.clicked { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.st.bounced, .st.complained, .st.failed, .st.rejected { background: color-mix(in srgb, var(--bad) 13%, transparent); color: var(--bad); }
.st.held, .st.delivery_delayed, .st.suppressed { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--soft); }
.tbl-wrap { overflow-x: auto; }
.bars { display: grid; gap: 6px; min-width: 160px; }
.bars .meter i.hot { background: var(--bad); }
iframe.preview { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; font-size: 13px; }

/* inbox */
.mailbox { display: grid; grid-template-columns: 230px 320px minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .mailbox { grid-template-columns: 1fr; } }
.ibx-list, .thr-list { display: grid; gap: 4px; }
.ibx, .thr { text-align: left; border: 1px solid transparent; background: var(--panel); border-radius: 10px; padding: 9px 10px; cursor: pointer; display: grid; gap: 2px; min-width: 0; }
.ibx:hover, .thr:hover { border-color: var(--line); }
.ibx.on, .thr.on { border-color: var(--violet); background: var(--soft); }
.ibx b, .thr b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thr .sn { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thr.unread b { font-weight: 800; } .thr.unread::before { content: ''; }
.msg { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel); display: grid; gap: 6px; }
.msg.out { background: color-mix(in srgb, var(--violet) 6%, var(--panel)); margin-left: 32px; }
.msg pre.body { white-space: pre-wrap; word-break: break-word; background: none; padding: 0; font: 14px/1.55 'Inter', system-ui, sans-serif; margin: 0; }

/* team + audit log */
.login .card > .stack + .or { margin-top: 4px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
input[type=email], input[type=date] { width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: 9px; padding: 8px 10px; outline: none; }
.side .foot .who { min-width: 0; flex: 1; }
.side .foot .who div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .foot .who div + div { font-weight: 600; color: var(--violet); }
.held-note { margin-bottom: 14px; text-decoration: none; color: var(--text); }
.held-note:hover { filter: brightness(.98); }
.invite { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto; gap: 8px; }
table.members td { vertical-align: middle; }
table.members td.acts { text-align: right; }
.person b { overflow-wrap: anywhere; }
dl.roles { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.roles dt { font-weight: 600; color: var(--ink); }
dl.roles dd { margin: 0; color: var(--muted); }
.filters { display: grid; grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr) 150px 150px; gap: 8px; margin-bottom: 12px; align-items: end; }
.filters label.date { display: grid; gap: 2px; }
.filters label.date span { font-size: 11px; color: var(--muted); font-weight: 500; }
table.audit td.when { white-space: nowrap; color: var(--muted); }
table.audit td.who b { overflow-wrap: anywhere; }
table.audit .tgt { font-weight: 500; overflow-wrap: anywhere; }
table.audit td.from { white-space: nowrap; }
table.decided .note { color: var(--text); font-style: italic; }
@media (max-width: 1000px) { .filters { grid-template-columns: 1fr 1fr; } .filters select { grid-column: 1 / -1; } }
@media (max-width: 700px) {
  .invite { grid-template-columns: 1fr 1fr; } .invite input { grid-column: 1 / -1; }
  dl.roles { grid-template-columns: 1fr; gap: 2px; } dl.roles dd { margin-bottom: 6px; }
  /* tables become stacked cards on phones */
  table.stackable thead { display: none; }
  table.stackable, table.stackable tbody, table.stackable tr, table.stackable td { display: block; width: 100%; }
  table.stackable tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.stackable tr:last-child { border-bottom: 0; }
  table.stackable td { border: 0; padding: 2px 0; }
  table.stackable td[data-l] { display: flex; align-items: center; gap: 8px; }
  table.stackable td[data-l]::before { content: attr(data-l); width: 84px; flex: none; font-size: 12px; color: var(--muted); }
  table.members td.acts { text-align: left; padding-top: 6px; }
  table.members td.acts .row { justify-content: flex-start !important; }
  table.audit td.when, table.audit td.from { display: inline-block; width: auto; margin-right: 10px; }
  table.audit tr { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; }
  table.audit td.who, table.audit td.what { grid-column: 1 / -1; }
  table.audit td.when { grid-row: 1; } table.audit td.from { grid-row: 1; text-align: right; }
}
@media (max-width: 700px) { table.held td:nth-child(4) { color: var(--muted); } table.held td:last-child { padding-top: 8px; } }
