/* Nebula Desk. Dark in the OCM style, calm, high contrast, phone first. A320 Knowledge adds its ECAM cyan. */
:root {
  /* Dark, in keeping with onchainmind.io: near-black, OCM green, Satoshi. Text kept high contrast. */
  --bg: #0E0E12;
  --surface: #141419;
  --card: #18181D;
  --card-2: #202128;
  --elev: #25262E;
  --line: #2A2C34;
  --line-strong: #3B3E48;
  --text: #F3F5F4;
  --muted: #B7BEBA;
  --faint: #8E9690;
  --green: #26FF96;
  --green-2: #00E85A;
  --green-ink: #3DFFA0;
  --green-soft: rgba(38, 255, 150, 0.10);
  --green-line: rgba(38, 255, 150, 0.34);
  --on-green: #04130B;
  --gold: #FBBF24;
  --gold-soft: rgba(251, 191, 36, 0.12);
  --gold-line: rgba(251, 191, 36, 0.48);
  --red: #FF7468;
  --red-soft: rgba(255, 116, 104, 0.12);
  --red-line: rgba(255, 116, 104, 0.42);
  --amber: #FFB54D;
  --amber-soft: rgba(255, 181, 77, 0.12);
  --amber-line: rgba(255, 181, 77, 0.42);
  --blue: #86AEFF;
  --blue-soft: rgba(134, 174, 255, 0.12);
  --blue-line: rgba(134, 174, 255, 0.42);
  /* A320 Knowledge: the instrument cyan and overhead-panel steel of a320knowledge.com */
  --cyan: #4FD1E8;
  --cyan-soft: rgba(79, 209, 232, 0.11);
  --cyan-line: rgba(79, 209, 232, 0.42);
  --steel: #A9BDCD;
  --panel: #121315;
  --glass: rgba(14, 14, 18, 0.86);
  --radius: 16px;
  --radius-sm: 10px;
  --tap: 48px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-up: 0 -1px 0 var(--line), 0 -10px 30px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.2, 0.9, 0.25, 1.05);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: contain;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--green-ink); }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- App frame ---------- */
#app { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--glass);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  padding: calc(var(--safe-t) + 10px) 16px 10px;
}
.topbar-row { max-width: 680px; margin: 0 auto; display: flex; align-items: center; gap: 10px; min-height: 44px; }
.topbar h1 { font-size: 22px; font-weight: 800; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sub { font-size: 13px; color: var(--muted); font-weight: 500; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft), 0 0 12px rgba(38,255,150,.6); flex: none; }
main { flex: 1; width: 100%; max-width: 680px; margin: 0 auto; padding: 14px 16px calc(110px + var(--safe-b)); }

.iconbtn {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  display: inline-grid; place-items: center; cursor: pointer; flex: none; transition: transform .15s var(--ease), background .15s;
}
.iconbtn:active { transform: scale(0.94); background: var(--surface); }
.iconbtn svg { width: 22px; height: 22px; }
.iconbtn.spin svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Bottom tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-up);
  padding: 6px 12px calc(6px + var(--safe-b));
}
.tabbar-row { max-width: 680px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.tab {
  border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0; min-height: 54px; border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer;
}
.tab svg { width: 26px; height: 26px; }
.tab.on { color: var(--green-ink); background: var(--green-soft); }
.tab .badge { position: relative; display: block; height: 26px; }
.tab .count {
  position: absolute; top: -6px; right: -14px; background: var(--green); color: var(--on-green); font-size: 11px; font-weight: 800;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; display: grid; place-items: center;
}

/* ---------- Pills, chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line); white-space: nowrap;
}
.pill.green { background: var(--green-soft); color: var(--green-ink); border-color: var(--green-line); }
.pill.gold { background: var(--gold-soft); color: var(--gold); border-color: var(--gold-line); }
.pill.red { background: var(--red-soft); color: var(--red); border-color: var(--red-line); }
.pill.amber { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-line); }
.pill.blue { background: var(--blue-soft); color: var(--blue); border-color: var(--blue-line); }
.pill.dark { background: var(--elev); color: var(--text); border-color: var(--line-strong); }
button.pill { cursor: pointer; }

/* ---------- Banners ---------- */
.banner {
  border-radius: var(--radius); padding: 12px 14px; margin: 0 0 12px; font-size: 15px; display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--line); background: var(--surface);
}
.banner b { font-weight: 800; }
.banner.amber { background: var(--amber-soft); border-color: var(--amber-line); color: var(--text); }
.banner.amber b { color: var(--amber); }
.banner.green { background: var(--green-soft); border-color: var(--green-line); color: var(--text); }
.banner.green b { color: var(--green-ink); }
.banner.red { background: var(--red-soft); border-color: var(--red-line); color: var(--text); }
.banner.red b { color: var(--red); }
.banner.blue { background: var(--blue-soft); border-color: var(--blue-line); color: var(--text); }
.banner.blue b { color: var(--blue); }
.banner .grow { flex: 1; min-width: 0; }
.banner button { flex: none; }

/* ---------- Lanes and cards ---------- */
.lane { margin: 18px 0 8px; }
.lane-head {
  display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 6px 2px; cursor: pointer; text-align: left;
}
.lane-head h2 { font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.lane-head .n { font-size: 15px; font-weight: 800; color: var(--muted); }
.lane-head .chev { margin-left: auto; color: var(--faint); transition: transform .2s var(--ease); }
.lane.collapsed .chev { transform: rotate(-90deg); }
.lane.collapsed .cards { display: none; }
.lane-empty { color: var(--faint); font-size: 15px; padding: 4px 2px 8px; }
.lane-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.lane-dot.your_call { background: var(--red); }
.lane-dot.ready { background: var(--green); }
.lane-dot.qa { background: var(--blue); }
.lane-dot.noise { background: var(--line-strong); }
.lane-dot.done { background: var(--text); }
.lane-dot.snoozed { background: var(--amber); }

.cards { display: flex; flex-direction: column; gap: 10px; }
.swipe { position: relative; border-radius: var(--radius); overflow: hidden; }
.swipe-bg {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 22px;
  font-weight: 800; font-size: 15px; color: var(--text);
}
.swipe-bg .l { opacity: 0; } .swipe-bg .r { opacity: 0; }
.swipe.left .swipe-bg { background: #7a2019; } .swipe.left .swipe-bg .r { opacity: 1; }
.swipe.right .swipe-bg { background: #6b4a10; } .swipe.right .swipe-bg .l { opacity: 1; }
.card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 14px 13px; box-shadow: var(--shadow); cursor: pointer; touch-action: pan-y;
  transition: transform .25s var(--ease), box-shadow .15s;
}
.card:active { box-shadow: 0 0 0 2px var(--green-line); }
.card.dragging { transition: none; }
.card.pinned { border-color: var(--gold-line); box-shadow: inset 5px 0 0 var(--gold-line), var(--shadow); padding-left: 18px; }
.card-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.card-name { font-weight: 800; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.card-age { margin-left: auto; font-size: 14px; color: var(--muted); font-weight: 600; flex: none; }
.card-sum { margin-top: 4px; font-size: 16px; font-weight: 600; color: var(--text); }
.card-draft { margin-top: 6px; font-size: 15px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-draft.pending { font-style: italic; }
.card-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.urgent-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); flex: none; }

/* ---------- Generic blocks ---------- */
.block {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0 0 12px; box-shadow: var(--shadow);
}
.block h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 800; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.block h3 .right { margin-left: auto; text-transform: none; letter-spacing: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.bold { font-weight: 800; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }
.pre { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }

.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 10px; }
.kv div { min-width: 0; }
.kv .k { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); font-weight: 700; }
.kv .v { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }

.customer-name { font-size: 20px; font-weight: 800; }
.why { background: var(--green-soft); border: 1px solid var(--green-line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 15px; color: var(--text); }
.why b { font-weight: 800; color: var(--green-ink); }
.flag { background: var(--amber-soft); border: 1px solid var(--amber-line); color: var(--text); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 14px; font-weight: 600; margin-top: 8px; }

.draft-text { font-size: 17px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.draft-text .ph { background: rgba(251, 191, 36, 0.28); color: #FFE29A; border-radius: 4px; padding: 0 3px; font-weight: 700; }
.signoff { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 15px; }
.signoff img { display: block; width: 180px; height: auto; border-radius: 6px; margin-top: 8px; border: 1px solid var(--line); }
.pager { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.pager button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); cursor: pointer; display: grid; place-items: center; }
.pager button:disabled { opacity: 0.35; }
.pager span { font-size: 14px; font-weight: 700; min-width: 44px; text-align: center; color: var(--text); }
.version-note { font-size: 13px; color: var(--muted); margin: -2px 0 8px; font-weight: 600; }
.draft-swipe { touch-action: pan-y; transition: transform .25s var(--ease), opacity .25s; }

details.orig > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 32px; }
details.orig > summary::-webkit-details-marker { display: none; }
details.orig > summary .chev { margin-left: auto; transition: transform .2s; color: var(--faint); }
details.orig[open] > summary .chev { transform: rotate(180deg); }
.orig-body { margin-top: 10px; font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.quoted { margin-top: 10px; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }

.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chip-btn {
  min-height: 56px; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--card); font-weight: 800; font-size: 16px;
  cursor: pointer; padding: 8px 10px; transition: transform .12s var(--ease), border-color .12s;
}
.chip-btn:active { transform: scale(0.97); border-color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  min-height: var(--tap); padding: 0 18px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--card);
  font-weight: 800; font-size: 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s var(--ease), background .12s; text-decoration: none; color: var(--text);
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--on-green); box-shadow: 0 0 24px rgba(38, 255, 150, 0.18); }
.btn.dark { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn.danger { color: var(--red); border-color: var(--red-line); }
.btn.block { width: 100%; }
.btn.small { min-height: 38px; font-size: 14px; padding: 0 12px; border-radius: 10px; }
.btn svg { width: 20px; height: 20px; }

/* Email action bar */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow-up);
  padding: 8px 12px calc(8px + var(--safe-b));
}
.actionbar-row { max-width: 680px; margin: 0 auto; display: flex; gap: 8px; align-items: stretch; }
.act {
  flex: 1; min-width: 0; min-height: 58px; border-radius: 14px; border: 1px solid var(--line); background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 800; cursor: pointer;
  transition: transform .12s var(--ease); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.act svg { width: 22px; height: 22px; }
.act:active { transform: scale(0.95); }
.act:disabled { opacity: 0.4; }
.act.send { flex: 1.7; background: var(--green); border-color: var(--green); font-size: 16px; flex-direction: row; gap: 8px; color: var(--on-green); box-shadow: 0 0 24px rgba(38, 255, 150, 0.16); }
.act.send svg { width: 22px; height: 22px; }
.actionbar-row.six { gap: 6px; }
.actionbar-row.six .act { font-size: 11.5px; }
.actionbar-row.six .act.send { flex: 1.3; }
.act.wide { flex: 1.7; font-size: 15px; flex-direction: row; gap: 8px; }

/* ---------- Sheets, toasts, dialogs ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity .2s; }
.scrim.on { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; background: var(--bg); border-radius: 22px 22px 0 0;
  max-height: 92dvh; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .32s var(--ease);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5); border-top: 1px solid var(--line);
}
.sheet.on { transform: none; }
.sheet.full { height: 96dvh; max-height: 96dvh; }
.sheet-inner { max-width: 680px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; min-height: 0; flex: 1; }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 10px auto 4px; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 6px 16px 10px; flex: none; }
.sheet-head h2 { font-size: 20px; font-weight: 800; flex: 1; }
.sheet-body { padding: 4px 16px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; min-height: 0; }
.sheet-foot { padding: 10px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); display: flex; gap: 10px; flex: none; }
.sheet-foot .btn { flex: 1; }
.option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-size: 17px; font-weight: 700; cursor: pointer; padding: 6px 2px; }
.option:last-child { border-bottom: 0; }
.option svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.option .desc { display: block; font-weight: 500; font-size: 14px; color: var(--muted); }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.input, .textarea, select.input {
  width: 100%; min-height: var(--tap); border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; background: var(--card);
  font-size: 17px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus { border-color: var(--text); box-shadow: 0 0 0 3px var(--green-soft); }
.textarea { min-height: 160px; resize: vertical; line-height: 1.55; }
.textarea.tall { min-height: 46dvh; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }

.toast-wrap { position: fixed; left: 0; right: 0; bottom: calc(92px + var(--safe-b)); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 16px; pointer-events: none; }
body:has(.selbar) .toast-wrap { bottom: calc(156px + var(--safe-b)); }
.toast {
  position: relative; pointer-events: auto; max-width: 560px; width: 100%; background: var(--elev); color: var(--text); border: 1px solid var(--line-strong); border-radius: 16px; padding: 12px 12px 12px 16px;
  display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  transform: translateY(20px); opacity: 0; transition: transform .28s var(--ease), opacity .2s;
}
.toast.on { transform: none; opacity: 1; }
.toast .grow { flex: 1; }
.toast button { background: var(--green); color: var(--on-green); border: 0; border-radius: 10px; min-height: 40px; padding: 0 16px; font-weight: 800; cursor: pointer; }
.toast .bar { position: absolute; left: 12px; right: 12px; bottom: 6px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.toast .bar i { display: block; height: 100%; background: var(--green); transform-origin: left; }
.toast.err { background: #3a1512; border-color: var(--red-line); }

.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--text); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; flex: none; }
.loading { display: flex; align-items: center; gap: 12px; padding: 18px 4px; color: var(--muted); font-weight: 600; }
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--card-2) 37%, var(--surface) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 10px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- Settings ---------- */
.set-group { margin: 18px 0 8px; }
.set-group > h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 800; padding: 0 2px 8px; }
.set-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.set-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 58px; border-bottom: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; font-size: 16px; cursor: default; }
.set-row:last-child { border-bottom: 0; }
button.set-row, a.set-row { cursor: pointer; color: var(--text); text-decoration: none; }
.set-row .lbl { flex: 1; min-width: 0; font-weight: 700; }
.set-row .lbl small { display: block; font-weight: 500; color: var(--muted); font-size: 14px; margin-top: 2px; }
.set-row .val { color: var(--muted); font-weight: 600; font-size: 15px; text-align: right; }
.set-row svg.go { width: 18px; height: 18px; color: var(--faint); flex: none; }
.set-row > svg { width: 22px; height: 22px; color: var(--muted); flex: none; }

.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; background: var(--line-strong); border-radius: 16px; transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .22s var(--ease); }
.switch input:checked + i { background: var(--green-2); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px var(--green-soft); }

.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: none; min-height: 40px; border-radius: 9px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--muted); padding: 0 6px; }
.seg button.on { background: var(--elev); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.4); }

.status-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.status-row:last-child { border-bottom: 0; }
.status-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 900; font-size: 15px; }
.status-ic.ok { background: var(--green-soft); color: var(--green-ink); }
.status-ic.bad { background: var(--red-soft); color: var(--red); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); }
table.t { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 640px; }
table.t th, table.t td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { background: var(--surface); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); position: sticky; top: 0; }

/* Q&A */
.qa-item { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; background: var(--card); }
.qa-item:last-child { border-bottom: 0; }
.qa-item.sel { background: var(--green-soft); }
.check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; display: grid; place-items: center; margin-top: 2px; }
.qa-item.sel .check { background: var(--green); border-color: var(--green); color: var(--on-green); }
.check svg { width: 16px; height: 16px; opacity: 0; }
.qa-item.sel .check svg { opacity: 1; }
.qa-q { font-size: 16px; overflow-wrap: anywhere; }
.qa-meta { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.topics { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.topics::-webkit-scrollbar { display: none; }
.selbar { position: fixed; left: 0; right: 0; bottom: calc(72px + var(--safe-b)); z-index: 31; display: flex; justify-content: center; padding: 0 12px; }
.selbar-in { max-width: 656px; width: 100%; background: var(--elev); color: var(--text); border: 1px solid var(--line-strong); border-radius: 16px; padding: 8px 8px 8px 16px; display: flex; align-items: center; gap: 8px; box-shadow: 0 14px 40px rgba(0,0,0,.55); }
.selbar-in .grow { font-weight: 800; }
.selbar-in .btn { min-height: 42px; }

/* Login */
.login { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 24px 20px calc(24px + var(--safe-b)); max-width: 440px; margin: 0 auto; }
.login .logo { width: 84px; height: 84px; border-radius: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.login h1 { font-size: 32px; font-weight: 900; margin: 18px 0 6px; }
.login p { color: var(--muted); margin: 0 0 22px; }
.build { font-size: 12px; color: var(--faint); font-weight: 600; text-align: center; padding: 18px 0 6px; }

.empty { text-align: center; padding: 34px 10px; color: var(--muted); }
.empty .big { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.empty svg { width: 54px; height: 54px; color: var(--green); margin-bottom: 8px; }

iframe.preview { width: 100%; height: 62dvh; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.preview-head { font-size: 14px; color: var(--muted); margin-bottom: 10px; line-height: 1.6; }
.preview-head b { color: var(--text); }

@media (min-width: 720px) {
  main { padding-top: 20px; }
  .chips { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Queue, refined ---------- */
.topbar h1 { font-size: 26px; font-weight: 900; letter-spacing: -0.02em; }
.topbar .sub { font-size: 14px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ghostbtn {
  position: relative; height: 40px; min-width: 40px; padding: 0 10px; border: 0; border-radius: 12px; background: none;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted);
}
.ghostbtn svg { width: 20px; height: 20px; }
.ghostbtn:active { background: var(--surface); }
.ghostbtn.spin svg { animation: spin .9s linear infinite; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); flex: none; }
.live-dot.off { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.live-dot.warn { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.live-dot.idle { background: var(--line-strong); box-shadow: none; }

.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer;
}
.chip.red { background: var(--red-soft); border-color: var(--red-line); color: var(--red); }
.chip.amber { background: var(--amber-soft); border-color: var(--amber-line); color: var(--amber); }
.chip.blue { background: var(--blue-soft); border-color: var(--blue-line); color: var(--blue); }
.chip.green { background: var(--green-soft); border-color: var(--green-line); color: var(--green-ink); }

.group { margin: 22px 0 0; }
.group-head { display: flex; align-items: center; gap: 8px; padding: 0 4px 8px; }
.group-head h2 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.group-head .n { font-size: 13px; font-weight: 800; color: var(--faint); }
.lane-dot { width: 8px; height: 8px; }

.list { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.list > .swipe + .swipe, .list > .restore-wrap + .restore-wrap, .quiet-items > .swipe + .swipe { border-top: 1px solid var(--line); }
.list .swipe { border-radius: 0; }
.row-item {
  position: relative; display: flex; gap: 12px; padding: 14px 14px 13px; background: var(--card); cursor: pointer; touch-action: pan-y;
  transition: transform .25s var(--ease), background .15s;
}
.row-item:active { background: var(--card-2); }
.row-item.dragging { transition: none; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 14px; font-weight: 800; letter-spacing: 0.02em;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
}
.avatar.your_call { background: var(--red-soft); color: var(--red); border-color: var(--red-line); }
.avatar.ready { background: var(--green-soft); color: var(--green-ink); border-color: var(--green-line); }
.avatar.qa { background: var(--blue-soft); color: var(--blue); border-color: var(--blue-line); }
.avatar.gold { background: var(--gold-soft); color: var(--gold); border-color: var(--gold-line); box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--gold-line); }
.row-main { flex: 1; min-width: 0; }
.row-top { display: flex; align-items: baseline; gap: 10px; }
.row-name { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.row-age { font-size: 13px; color: var(--faint); font-weight: 600; flex: none; }
.row-sum { font-size: 15px; line-height: 1.4; margin-top: 2px; color: var(--text); }
.row-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; min-height: 30px; }
.row-meta { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.row-meta .sep { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); margin: 0 8px; }
.m-gold { color: var(--gold); } .m-red { color: var(--red); } .m-amber { color: var(--amber); } .m-blue { color: var(--blue); }
.row-act {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--card); font-size: 14px; font-weight: 800; color: var(--text); cursor: pointer;
  transition: transform .12s var(--ease), background .12s;
}
.row-act svg { width: 16px; height: 16px; }
.row-act:active { transform: scale(0.95); }
.row-act.primary { background: var(--green); border-color: var(--green); color: var(--on-green); }
.row-act.busy { border-color: var(--line); color: var(--muted); cursor: default; background: transparent; }
.row-act.restore { margin: 0 14px 14px auto; display: flex; width: max-content; }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; }
.row-draft { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--muted); line-height: 1.45; }
.row-draft { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dot-ok { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 8px; vertical-align: 1px; }

.group.quiet { margin-top: 26px; }
.quiet-row {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 16px; border: 0; background: var(--card);
  font-size: 15px; font-weight: 700; color: var(--muted); cursor: pointer; text-align: left;
}
.quiet-row + .quiet-row, .quiet-items + .quiet-row { border-top: 1px solid var(--line); }
.quiet-row .n { color: var(--faint); font-weight: 800; }
.quiet-row .chev { color: var(--faint); transition: transform .2s var(--ease); display: grid; }
.quiet-row .chev svg { width: 18px; height: 18px; }
.quiet-row .chev.up { transform: rotate(180deg); }
.quiet-items { border-top: 1px solid var(--line); background: var(--surface); }
.quiet-items .row-item { background: var(--surface); }

.foot-links { display: flex; justify-content: center; align-items: center; gap: 4px; margin: 22px 0 4px; }
.foot-links button { border: 0; background: none; color: var(--muted); font-size: 14px; font-weight: 700; padding: 8px 10px; cursor: pointer; border-radius: 8px; }
.foot-links button:active { background: var(--surface); }
.foot-links .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }

.calm { text-align: center; padding: 56px 10px 30px; }
.calm svg { width: 46px; height: 46px; color: var(--green); margin-bottom: 10px; }
.calm .big { font-size: 24px; font-weight: 900; letter-spacing: -0.01em; margin-bottom: 4px; }
.skeleton-list { border: 0; background: none; }

.draft-cta { text-align: center; padding: 22px 14px; }
.draft-cta p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }

/* ---------- Search, Draft all, quiet actions ---------- */
.head-act {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer;
  color: var(--green-ink); font-size: 13px; font-weight: 800; padding: 6px 4px; border-radius: 8px;
}
.head-act svg { width: 15px; height: 15px; }
.head-act:active { background: var(--green-soft); }
.head-act.busy { color: var(--muted); cursor: default; }
.row-act.ghost { border-color: var(--line); background: transparent; color: var(--muted); }
.row-act + .row-act { margin-left: -2px; }
.searchbar {
  display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 14px;
  padding: 0 6px 0 12px; min-height: 48px; margin: 4px 0 0;
}
.searchbar:focus-within { border-color: var(--green-line); box-shadow: 0 0 0 3px var(--green-soft); }
.searchbar .s-ic { display: grid; color: var(--faint); }
.searchbar .s-ic svg { width: 18px; height: 18px; }
.searchbar input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 17px; color: var(--text); min-height: 46px; }
.searchbar input::-webkit-search-cancel-button { -webkit-appearance: none; }
.s-cancel { border: 0; background: none; color: var(--green-ink); font-weight: 800; font-size: 15px; padding: 8px 10px; cursor: pointer; }
.small-calm { padding: 34px 10px 10px; }

/* ---------- Email: earlier messages, quiet close, Outseta ---------- */
.quiet-close { margin-left: auto; border: 1px solid var(--line); background: none; color: var(--muted); border-radius: 999px; min-height: 34px; padding: 0 12px; font-size: 13px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.quiet-close svg { width: 15px; height: 15px; }
.quiet-close:active { background: var(--card-2); }
.thread { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.msg { border-radius: 14px; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface); max-width: 92%; }
.msg.tom { align-self: flex-end; background: var(--green-soft); border-color: var(--green-line); }
.msg-head { font-size: 12px; font-weight: 800; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; display: flex; gap: 8px; }
.msg.tom .msg-head { color: var(--green-ink); }
.msg-body { font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.msg-body.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.msg-more { border: 0; background: none; color: var(--green-ink); font-weight: 800; font-size: 13px; padding: 6px 0 0; cursor: pointer; }
.outseta-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--green-ink); font-weight: 800; font-size: 14px; text-decoration: none; padding: 6px 0; }
.outseta-link svg { width: 15px; height: 15px; }

/* ---------- Tom's to-do before sending ---------- */
.todo { margin-top: 12px; border: 1px solid var(--amber-line); background: var(--amber-soft); border-radius: var(--radius-sm); padding: 10px 12px; }
.todo.plain { margin-top: 0; }
.todo-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--amber); }
.todo-head svg { width: 16px; height: 16px; }
.todo ul { margin: 6px 0 0; padding-left: 20px; }
.todo li { font-size: 15px; font-weight: 600; color: var(--text); margin: 4px 0; }
.todo-link { margin-top: 6px; }

/* ---------- Revenue cockpit ---------- */
.rev-seg { margin: 2px 0 10px; }
.rev-nav { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.rev-nav .iconbtn:disabled { opacity: 0.28; pointer-events: none; }
.rev-when { flex: 1; min-width: 0; text-align: center; }
.rev-when-main { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rev-when-sub { font-size: 13px; color: var(--faint); font-weight: 600; margin-top: 1px; }
.rev-today { border: 0; background: none; color: var(--green-ink); font-weight: 700; font-size: 13px; padding: 2px 8px; min-height: 26px; cursor: pointer; }

.dial-card {
  position: relative; background: radial-gradient(120% 90% at 50% 38%, rgba(38, 255, 150, 0.07), transparent 62%), var(--card);
  border: 1px solid var(--line); border-radius: 24px; padding: 10px 14px 14px; margin: 0 0 12px; box-shadow: var(--shadow);
  transition: opacity 0.2s ease; touch-action: pan-y;
}
.dial-card.loading-soft { opacity: 0.55; }
.dial-wrap { position: relative; max-width: 300px; margin: 0 auto; }
.dial { display: block; width: 100%; height: auto; overflow: visible; }
.dial-track { fill: none; stroke: rgba(38, 255, 150, 0.12); stroke-width: 14; stroke-linecap: round; }
.dial-fill { fill: none; stroke: url(#dialGrad); stroke-width: 14; stroke-linecap: round; filter: drop-shadow(0 0 8px rgba(38, 255, 150, 0.45)); }
.dial-knob { fill: var(--bg); stroke: var(--green); stroke-width: 4; }
.dial-knob.over { fill: var(--green); }
.tick { stroke: var(--line-strong); stroke-width: 1.5; stroke-linecap: round; }
.tick.major { stroke: var(--faint); stroke-width: 2; }
.dial-center { position: absolute; left: 0; right: 0; top: 63%; transform: translateY(-50%); text-align: center; pointer-events: none; display: flex; flex-direction: column; align-items: center; }
.dial-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 800; color: var(--muted); }
.dial-value { font-size: 52px; font-weight: 900; letter-spacing: -0.035em; line-height: 1.05; margin: 4px 0 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dial-value.sm { font-size: 44px; }
.dial-value.xs { font-size: 36px; }
.dial-delta { font-size: 14px; font-weight: 800; color: var(--muted); padding: 3px 10px; border-radius: 999px; background: var(--elev); font-variant-numeric: tabular-nums; }
.dial-delta.up { color: var(--green-ink); background: var(--green-soft); }
.dial-delta.down { color: var(--red); background: var(--red-soft); }
.dial-cmp { text-align: center; font-size: 14px; color: var(--muted); font-weight: 600; margin: -2px 0 12px; }
.dial-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); font-weight: 600; }
.link-btn { border: 0; background: none; color: var(--green-ink); font-weight: 700; font-size: 14px; padding: 6px 2px; min-height: 36px; cursor: pointer; white-space: nowrap; }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); min-width: 0; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value { font-size: 26px; font-weight: 900; letter-spacing: -0.02em; margin: 3px 0 2px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-delta { font-size: 13px; color: var(--faint); font-weight: 700; min-height: 18px; }
.kpi-delta.up { color: var(--green-ink); }
.kpi-delta.down { color: var(--red); }

.rev-card { padding: 14px 14px 12px; }
.bars { display: block; width: 100%; height: auto; overflow: visible; }
.bars .grid { stroke: var(--line); stroke-width: 1; }
.bars .base { stroke: var(--line-strong); stroke-width: 1; }
.bars .axis { fill: var(--faint); font-size: 11px; font-weight: 600; font-family: var(--font); }
.bars .axis.cur { fill: var(--text); font-weight: 800; }
.bars .bar { fill: rgba(38, 255, 150, 0.30); transition: fill 0.15s ease; }
.bars .bar.cur { fill: var(--green); }
.bars .bar-zero { stroke: var(--line-strong); stroke-width: 2; }
.bars .hit { fill: transparent; }
.bars .bar-g { cursor: pointer; outline: none; }
.bars .bar-g.sel .bar:not(.cur) { fill: rgba(38, 255, 150, 0.62); }
.bars .bar-g.sel .axis { fill: var(--text); }
.bar-tip { font-size: 14px; color: var(--muted); text-align: center; min-height: 22px; margin-top: 6px; }
.bar-tip b { color: var(--text); }

.split { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; margin: 4px 0 12px; background: var(--card); }
.split-cur { background: #14AE66; border-radius: 4px 0 0 4px; }
.split-leg { background: #5F86E6; border-radius: 0 4px 4px 0; }
.legend-rows { display: grid; gap: 8px; }
.legend-row { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.key { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.key.cur { background: #14AE66; }
.key.leg { background: #5F86E6; }
.lv { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lp { width: 42px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

.whales { border-color: var(--gold-line); background: linear-gradient(135deg, var(--gold-soft), transparent 70%), var(--card); }
.whale-row { display: flex; align-items: center; gap: 12px; }
.whale-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--gold); color: #1A1200; display: grid; place-items: center; font-weight: 900; font-size: 17px; flex: none; }
.whale-title { font-weight: 800; font-size: 16px; }
.whale-num { text-align: right; font-weight: 900; font-size: 20px; font-variant-numeric: tabular-nums; }
.whale-num .small { font-weight: 600; font-size: 13px; }

.rev-help summary { cursor: pointer; font-weight: 700; color: var(--muted); font-size: 14px; list-style: none; }
.rev-help summary::-webkit-details-marker { display: none; }
.rev-help summary::after { content: ' +'; color: var(--faint); }
.rev-help[open] summary::after { content: ' \2212'; }
.rev-help p { font-size: 14px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }
.rev-help b { color: var(--text); }

.rev-setup { text-align: center; padding: 40px 10px 20px; }
.rev-setup .big { font-size: 22px; font-weight: 800; margin: 18px 0 6px; }
.setup-ring { position: relative; width: 132px; height: 132px; margin: 0 auto; }
.setup-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.setup-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }
.ring-track { fill: none; stroke: rgba(38, 255, 150, 0.12); stroke-width: 10; }
.ring-fill { fill: none; stroke: var(--green); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 0.6s var(--ease); }
.rev-skel { padding-top: 2px; }
@media (prefers-reduced-motion: reduce) { .ring-fill, .dial-card { transition: none; } }

/* ---------- Nebula Desk: the two inboxes ---------- */
.ws-switch { max-width: 680px; margin: 10px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.ws-btn { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--muted); font-weight: 800; font-size: 14px; letter-spacing: -0.01em; cursor: pointer; padding: 0 6px; min-width: 0; transition: background .15s, color .15s; }
.ws-btn .ws-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--faint); }
.ws-btn.ocm .ws-dot { background: var(--green); }
.ws-btn.a320k .ws-dot { background: var(--cyan); }
.ws-btn.on { color: var(--text); background: var(--elev); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.ws-btn.ocm.on { border-color: var(--green-line); }
.ws-btn.a320k.on { border-color: var(--cyan-line); }
.ws-btn.ocm.on .ws-dot { box-shadow: 0 0 0 3px var(--green-soft), 0 0 10px rgba(38,255,150,.55); }
.ws-btn.a320k.on .ws-dot { box-shadow: 0 0 0 3px var(--cyan-soft), 0 0 10px rgba(79,209,232,.55); }
.ws-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 900; flex: none; background: var(--card-2); color: var(--text); }
.ws-btn.ocm.on .ws-n { background: var(--green); color: var(--on-green); }
.ws-btn.a320k.on .ws-n { background: var(--cyan); color: #04161B; }

.ws-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; font-size: 10.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; flex: none; vertical-align: 1px; border: 1px solid; }
.ws-tag.ocm { color: var(--green-ink); background: var(--green-soft); border-color: var(--green-line); }
.ws-tag.a320k { color: var(--cyan); background: var(--cyan-soft); border-color: var(--cyan-line); }
.row-top .ws-tag { margin-right: 6px; }
.set-group > h2 .ws-tag { margin-right: 4px; }
.topbar .sub .ws-tag { margin-right: 4px; }

.ws-strip { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); padding: 8px 12px; margin-bottom: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.ws-strip b { color: var(--text); }
.ws-strip .faint { margin-left: auto; font-size: 13px; }
.ws-strip.ocm { border-color: var(--green-line); }
.ws-strip.a320k { border-color: var(--cyan-line); }

.tabbar-row.two { grid-template-columns: repeat(2, 1fr); }
.login-ws { display: flex; align-items: center; gap: 8px; margin: -12px 0 18px; }
.login-ws + .login-ws { margin-top: -10px; }

/* The A320 Knowledge account card and the site's connection, in the site's instrument style */
.block.a320card { background: linear-gradient(180deg, #15181B, var(--panel)); border-color: var(--cyan-line); }
.a320-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); margin-bottom: 8px; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.a320-note { margin-left: auto; color: var(--steel); letter-spacing: .04em; text-transform: none; font-weight: 700; }
.a320card .kv .k { color: var(--steel); font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: .08em; font-size: 11px; }
.a320-mails { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.a320-mails .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--steel); font-weight: 700; margin-bottom: 4px; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.a320-mail { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 3px 0; }
.pill.cyan { background: var(--cyan-soft); color: var(--cyan); border-color: var(--cyan-line); }
.status-ic.warn { background: var(--amber-soft); color: var(--amber); }
ol.steps { margin: 4px 0 0; padding-left: 20px; line-height: 1.6; }

/* FCOM quotes in a draft: the manual's own words, clearly apart from ours */
.fcom { margin-top: 14px; border: 1px solid var(--cyan-line); border-radius: 12px; background: var(--cyan-soft); padding: 10px 12px 8px; }
.fcom-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); margin-bottom: 6px; }
.fcom-head svg { width: 17px; height: 17px; }
.fcom-q { border-left: 3px solid var(--cyan); padding: 2px 0 2px 10px; margin: 8px 0; }
.fcom-ref { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; color: var(--steel); font-weight: 700; margin-bottom: 2px; }
.fcom-t { font-size: 16px; line-height: 1.55; white-space: pre-wrap; }
.fcom-foot { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
@media (max-width: 420px) {
  .ws-switch { gap: 4px; padding: 3px; }
  .ws-btn { font-size: 13.5px; gap: 6px; padding: 0 4px; letter-spacing: -0.02em; }
  .ws-n { min-width: 20px; height: 20px; padding: 0 5px; font-size: 11.5px; }
}

/* ---------- New email ---------- */
/* The button on the Queue, in the colour of the inbox on screen */
.fab {
  position: fixed; right: max(16px, calc((100vw - 680px) / 2 + 16px)); bottom: calc(84px + var(--safe-b)); z-index: 29;
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px 0 16px; border-radius: 999px;
  border: 1px solid var(--green); background: var(--green); color: var(--on-green); font-weight: 800; font-size: 16px; cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 22px rgba(38, 255, 150, 0.2); transition: transform .15s var(--ease);
}
.fab:active { transform: scale(0.95); }
.fab svg { width: 20px; height: 20px; }
.fab.a320k { background: var(--cyan); border-color: var(--cyan); color: #04161B; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 22px rgba(79, 209, 232, 0.22); }
.fab-dot { position: absolute; top: -3px; right: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--amber); border: 2px solid var(--bg); }
main.has-fab { padding-bottom: calc(160px + var(--safe-b)); }
.to-pre { font-weight: 700; color: var(--muted); margin-right: 5px; }

/* The sheet */
.c-field { margin-bottom: 6px; }
.c-field + .c-msg { min-height: 0; }
.c-msg { font-size: 14px; font-weight: 600; margin: 0 2px 8px; }
.c-msg:empty { margin: 0; }
.c-bad { color: var(--red); }
.c-card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 8px 10px; margin: 2px 0 12px; }
.c-card.loading-card { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.c-card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-height: 32px; }
.c-card > summary::-webkit-details-marker { display: none; }
.c-card > summary .chev { margin-left: auto; color: var(--faint); transition: transform .2s; display: inline-grid; }
.c-card > summary .chev svg { width: 18px; height: 18px; }
.c-card[open] > summary .chev { transform: rotate(180deg); }
.c-card .block { margin: 8px 0 2px; box-shadow: none; }
.c-card-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-height: 32px; }
.c-who { font-weight: 800; font-size: 15px; overflow-wrap: anywhere; }
.c-card .pill { font-size: 12px; padding: 3px 8px; }
.c-card + .flag { margin: -6px 0 12px; }
.c-tools { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; flex-wrap: wrap; }
.c-tools .btn svg { width: 17px; height: 17px; }
.c-tools .pager { margin-left: auto; }
.c-working { margin: 0 0 10px; }
.c-saved { margin-top: 10px; text-align: center; }
.sheet-foot .c-discard { flex: 0 0 52px; padding: 0; color: var(--muted); }
.sheet-foot .btn svg { width: 19px; height: 19px; }
