/* ---------- Branding: Novera (matches the Novera CRM). Change only these variables. ---------- */
:root {
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading: "Cabinet Grotesk", "DM Sans", system-ui, sans-serif;
  --font-size: 17px;

  --bg: #0b0d12;
  --surface: #14161d;
  --surface-2: #1c2029;
  --border: #2a2e3a;
  --text: #f2f1f7;
  --muted: #8b8fa3;
  --accent: #2e9eff;
  --accent-text: #0b0d12;
  --focus: rgba(46, 158, 255, .4);
  --logo-blue: #02a7ef;
  --logo-dark: #0088b7;
  --danger: #ef4444;
  --ok: #22c55e;
  --warn: #f2a93c;
  --gold-bright: #ffc24d;
  --busy: #02a7ef;
  --rec: #ef4444;
  --phone-frame: #000000;

  --radius: 16px;
  --radius-sm: 10px;
  --phone-height: min(calc(100vh - 260px), 720px);
}

:root[data-theme="light"] {
  --bg: #f9fdfd;
  --surface: #ffffff;
  --surface-2: #eef3f7;
  --border: #e5e7eb;
  --text: #06121c;
  --muted: #5b6472;
  --warn: #b7700a;
  --ok: #059669;
  --phone-frame: #06121c;
}
/* ------------------------------------------------------------------------------------------------ */

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: var(--font-size)/1.5 var(--font); min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, .pcard .name { font-family: var(--font-heading); letter-spacing: .01em; }
h1 { font-size: 32px; font-weight: 800; margin: 0 0 4px; }
h2 { font-size: 21px; font-weight: 700; margin: 0 0 10px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
.muted, small { color: var(--muted); }
.lead { color: var(--muted); margin: 0 0 24px; font-size: 18px; }

button {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 16px; cursor: pointer; white-space: nowrap;
}
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
button.big { padding: 16px 24px; font-size: 19px; }
button.small { padding: 5px 12px; font-size: 15px; }
button.ghost { background: transparent; }
button.danger { color: var(--danger); }
button.icon { padding: 3px 9px; }
input, select, textarea {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
button:focus-visible, a:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
textarea { resize: vertical; width: 100%; }
.big-input { width: 100%; font-size: 20px; padding: 14px 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 24px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { width: 52px; height: 52px; margin: -6px 0; }
.brand-name { font: 800 23px var(--font-heading); letter-spacing: .02em; }
:root[data-theme="light"] .brand-logo { filter: drop-shadow(0 0 1px rgba(6, 18, 28, .6)); }

.view { padding: 28px 24px 60px; max-width: 1280px; margin: 0 auto; }
.view.narrow { max-width: 760px; }
@media (max-width: 700px) { .view { padding: 20px 16px 48px; } }
.back { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 12px; font-size: 17px; }
.back:hover { color: var(--text); }

/* Whole-app warning (e.g. the hub already runs in another window) */
.app-alert {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 24px; background: rgba(242, 169, 60, .12); border-bottom: 1px solid var(--warn); font-size: 17px;
}
.app-alert strong { color: var(--warn); }

/* Status dot */
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ready { background: var(--ok); }
.dot.busy { background: var(--busy); animation: pulse 1.2s infinite; }
.dot.attention { background: var(--warn); }
.dot.paused, .dot.checking { background: var(--muted); }
@keyframes pulse { 50% { opacity: .35; } }

/* Home: phone cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.pcard {
  display: flex; flex-direction: column; gap: 10px; text-align: left; padding: 22px; min-height: 210px;
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); cursor: pointer;
  text-decoration: none; white-space: normal;
}
.pcard:hover { border-color: var(--accent); }
.pcard .icon-phone { font-size: 30px; line-height: 1; }
.pcard .name { font-size: 24px; font-weight: 800; }
.pcard .status { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 600; }
.pcard .todo { color: var(--warn); font-size: 16px; }
.pcard .facts { margin-top: auto; color: var(--muted); font-size: 16px; display: flex; flex-direction: column; gap: 2px; }
.pcard.add { align-items: center; justify-content: center; border-style: dashed; color: var(--muted); font-size: 20px; }
.pcard.add .plus { font-size: 44px; line-height: 1; }

/* Phone page */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.banner {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; margin: 14px 0 22px;
  border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); font-size: 18px;
}
.banner .dot { margin-top: 6px; }
.banner.attention { border-color: var(--warn); }
.banner .todo { color: var(--muted); font-size: 17px; }
.phone-layout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 960px) { .phone-layout { grid-template-columns: 1fr; } }
.main-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.actions .hint { flex-basis: 100%; text-align: left; max-width: none; }
.sim-row { flex-basis: 100%; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: 16px; }
.sim .low { color: var(--warn); font-weight: 600; }

/* Advanced bits are hidden in simple mode */
body:not(.advanced) .adv { display: none !important; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); user-select: none; }
.switch input { width: 20px; height: 20px; accent-color: var(--accent); }
.big-switch { margin-top: 16px; color: var(--text); font-size: 18px; }
.big-switch input { width: 24px; height: 24px; }

/* Phone mirror */
.phone-col { display: flex; flex-direction: column; align-items: center; gap: 10px; position: sticky; top: 20px; }
@media (max-width: 960px) { .phone-col { position: static; } }
.phone {
  position: relative; height: var(--phone-height); aspect-ratio: var(--phone-ratio, 390 / 844);
  max-width: calc(100vw - 32px); border: 10px solid var(--phone-frame); border-radius: 36px;
  overflow: hidden; background: #000; touch-action: none; user-select: none;
}
.phone.rec { box-shadow: 0 0 0 3px var(--rec); }
#screen { display: block; width: 100%; height: 100%; object-fit: fill; cursor: pointer; }
.placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 20px; color: #b9bdc8; background: #000;
}
.placeholder p { margin: 0; }
.rec-badge {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 99px;
  background: var(--rec); color: #fff; font-size: 13px; font-weight: 600; pointer-events: none;
}
.ripple {
  position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%;
  border: 3px solid var(--accent); pointer-events: none; animation: ripple .5s ease-out forwards;
}
@keyframes ripple { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
button.rec.on { background: var(--rec); border-color: var(--rec); color: #fff; }
.keys { display: flex; gap: 8px; width: 100%; max-width: 360px; }
.keys input { flex: 1; }
.hint { margin: 0; max-width: 360px; text-align: center; color: var(--muted); font-size: 15px; }

/* Add video */
.drop {
  display: grid; place-items: center; text-align: center; min-height: 120px; padding: 18px; margin-bottom: 12px;
  border: 2px dashed var(--border); border-radius: var(--radius-sm); cursor: pointer; color: var(--muted);
}
.drop strong { color: var(--text); font-size: 19px; }
.drop.over, .drop:hover { border-color: var(--accent); }
.drop.has-file { border-style: solid; border-color: var(--ok); }
#btn-upload { margin-top: 10px; }
.options { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.opt { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; line-height: 1.3; }
.opt[hidden], .no-paid .paid-opt { display: none; }
.slot-pick { display: flex; align-items: center; gap: 10px; font-weight: 600; max-width: 100%; }
.slot-pick select { flex: 1; min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.opt input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.brand-input { margin-left: 32px; }
.qitem .options { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 8px; }
.qitem .opt { align-items: center; }
.qitem .opt small, .qitem .opt br { display: none; }
.qitem .opt input { width: 18px; height: 18px; margin: 0; }
.qitem .brand-input { margin-left: 0; padding: 6px 10px; font-size: 15px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0; }
.badge { padding: 2px 10px; border-radius: 99px; font-size: 14px; font-weight: 600; background: var(--surface); border: 1px solid var(--border); }
.badge.trial { color: var(--busy); border-color: var(--busy); }
.badge.paid { color: var(--warn); border-color: var(--warn); }

/* Queue */
.queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.qitem { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 14px; padding: 12px; background: var(--surface-2); border-radius: var(--radius-sm); }
.qitem video { width: 90px; height: 160px; object-fit: cover; border-radius: 8px; background: #000; }
.qitem .when { font-weight: 700; font-size: 18px; }
.qitem .when.none { color: var(--muted); font-weight: 400; }
.qitem .fname { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qitem textarea { margin-top: 8px; font-size: 16px; }
.qitem .row { margin-top: 8px; justify-content: flex-end; }

/* Post times */
.times { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 14px; }
.line-info { margin: 8px 0 0; }
.line-info .short { color: var(--warn); }
.time-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 8px 8px 16px; font-size: 20px; font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px;
}
.time-chip button { padding: 2px 10px; border-radius: 99px; font-size: 15px; }
.time-chip { cursor: pointer; user-select: none; }
.time-chip.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.time-chip:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.time-chip.picked:focus-visible { box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px var(--focus); }
.mode { padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--surface); border: 1px solid var(--border); }
.mode.trial { color: var(--busy); border-color: var(--busy); }
.mode.main { color: var(--accent); border-color: var(--accent); }
.time-bulk { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 14px; }
.time-bulk .mode { font-size: 15px; padding: 6px 14px; cursor: pointer; }
.time-add { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.time-add input { font-size: 18px; min-width: 7.5em; }

/* Daily story */
.story-preview { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 14px; padding: 12px; margin-bottom: 12px;
  background: var(--surface-2); border-radius: var(--radius-sm); }
.story-preview p { margin: 4px 0 8px; }
.story-preview .fname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-media img, .story-media video, .story-media .no-preview { display: block; width: 90px; height: 160px; object-fit: cover; border-radius: 8px; background: #000; }
.story-media .no-preview { display: grid; place-items: center; color: #fff; font-size: 13px; text-align: center; }
.story-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.story-field input { font-size: 17px; }
.story-texts { border: 0; padding: 0; margin: 14px 0 6px; display: flex; flex-direction: column; gap: 8px; }
.story-texts legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.story-texts .opt { align-items: center; font-size: 17px; }
.story-foot { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: 10px; }
.story-foot .low { color: var(--warn); }
.pcard .story-line .low { color: var(--warn); }

/* Wizard */
.view.narrow .card { margin-top: 18px; }
.devices { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.device { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; text-align: left; white-space: normal; }
.device.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.checklist { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.checklist > li { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.checklist .mark { font-size: 22px; line-height: 1.2; }
.checklist .done .mark { color: var(--ok); }
.checklist .todo .mark { color: var(--warn); }
.checklist .wait .mark { color: var(--muted); }
.checklist strong { font-size: 18px; }
.checklist .how { margin: 6px 0 0; padding-left: 20px; color: var(--muted); }
.checklist .done .how { display: none; }

/* Flow editor (advanced) */
.flow-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.flow-bar input { flex: 1; min-width: 140px; }
.flow-bar.small button { padding: 6px 12px; font-size: 15px; }
.vars { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; margin-bottom: 8px; }
.var { padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--accent); font-family: ui-monospace, monospace; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.step { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; }
.step.selected { border-color: var(--accent); }
.step.new { animation: flash 1s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 3px var(--accent); } to { box-shadow: 0 0 0 0 transparent; } }
.step-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step-nr { color: var(--muted); min-width: 22px; font-variant-numeric: tabular-nums; }
.step-head select { flex: 1; min-width: 170px; padding: 6px 10px; }
.chk { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; }
.step-actions { display: flex; gap: 2px; margin-left: auto; }
.step-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 8px; }
.step-fields:empty { display: none; }
.field { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.field.wide { grid-column: 1 / -1; }
.field input, .field textarea { color: var(--text); font-size: 14px; padding: 6px 10px; }
.tech dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 15px; margin: 0 0 12px; }
.tech dt { color: var(--muted); }
.tech dd { margin: 0; font-family: ui-monospace, monospace; overflow-wrap: anywhere; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px);
  background: var(--surface-2); border: 1px solid var(--border); border-left: 5px solid var(--ok);
  border-radius: var(--radius-sm); padding: 14px 20px; box-shadow: 0 8px 30px rgba(0,0,0,.35); z-index: 10; font-size: 18px;
}
.toast.error { border-left-color: var(--danger); }

/* Which phone is which: a colour (to match a sticker or case on the phone) and an emoji per phone */
:root {
  --c-red: #ef4444; --c-orange: #f97316; --c-yellow: #eab308; --c-green: #22c55e;
  --c-blue: #3b82f6; --c-purple: #a855f7; --c-pink: #ec4899; --c-gray: #94a3b8;
}
.pcard.colored, .pcard.colored:hover { border-top: 10px solid var(--pc); }
.ident { color: var(--muted); font-size: 16px; overflow-wrap: anywhere; }
.ident strong { color: var(--text); }
#p-ident { margin: -4px 0 12px; display: flex; align-items: center; gap: 10px; font-size: 17px; }
#p-ident > :first-child { flex: none; }
#p-ident:empty { display: none; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 36px; height: 36px; padding: 0; border-radius: 50%; background: var(--pc); border: 2px solid var(--border); }
.swatch.none { background: transparent; color: var(--muted); }
.swatch.on { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--text); }
.swatch.small { display: inline-block; width: 18px; height: 18px; border-width: 0; }
.id-field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; font-weight: 600; }
.id-field input { font-weight: 400; }
#id-emoji { width: 4.5em; font-size: 20px; text-align: center; }
.emoji-picks { display: flex; flex-wrap: wrap; gap: 2px; }
.emoji-picks button { font-size: 20px; padding: 4px 8px; }
.id-device { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.paid-hint { margin: 4px 0 0 34px; color: var(--warn); font-size: 15px; }
.ident { display: flex; flex-direction: column; gap: 2px; }
.ident .user { font-size: 19px; }
.pcard .ident { margin-top: -6px; }
.id-field small { font-weight: 400; }
#id-insta { flex: 1; min-width: 12em; }
/* While a job runs, the mirror only shows the screen */
.view-badge {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 99px;
  background: rgba(0, 0, 0, .75); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: none;
}
.phone.view-only #screen { cursor: not-allowed; }
.gap-note { color: var(--warn); font-weight: 600; }
.qitem .when.posting { color: var(--busy); }
.note { margin: 0 0 6px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 6px; }
/* Preview of Instagram's link sticker in the blue style (the only style the hub uses) */
.ig-sticker { display: inline-block; padding: 6px 14px; border-radius: 10px; background: #fff; color: #3b82f6;
  font-weight: 800; text-transform: uppercase; letter-spacing: .02em; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.story-texts > p { margin: 0 0 8px; font-size: 15px; }
.model { font-size: 17px; font-weight: 700; color: var(--text); }
.pcard .model { margin-top: -8px; }
.ident-col { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.paid-line { align-self: flex-start; padding: 3px 12px; border-radius: 8px; font-size: 15px; font-weight: 700; }
.paid-line.yes { background: rgba(52, 211, 153, .15); color: var(--ok); border: 1px solid var(--ok); }
.paid-line.no { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
/* "Paid partnership label today" (only when paid partnerships are available for the phone) */
.paid-today { flex-basis: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.paid-today.on { border-color: var(--ok); background: rgba(52, 211, 153, .1); }
.paid-today p { margin: 4px 0 0; font-size: 15px; }
.paid-today-badge { align-self: flex-start; padding: 3px 12px; border-radius: 8px; font-size: 15px; font-weight: 800;
  background: var(--ok); color: #06121c; }

/* ---------- login and who's logged in ---------- */
.login-page { display: grid; place-items: center; padding: 16px; }
.login-card {
  width: min(380px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px; display: flex; flex-direction: column; gap: 14px; text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -8px rgba(0, 0, 0, .5);
}
.login-card .field { display: flex; flex-direction: column; gap: 6px; text-align: left; font-size: 14px; color: var(--muted); }
.login-card input {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 11px 12px; color: var(--text);
}
.login-card input:focus { outline: 2px solid var(--focus); border-color: var(--accent); }
.login-card h1 { margin: 0; }
.login-card p { margin: 0; }
.login-logo { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; margin: 0 auto 4px; }
.login-error { color: var(--danger); font-size: 14px; }

.who { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 14px; }
.who .role { color: var(--gold-bright); }
/* members: no admin tools; without "mirror" no live screen (it controls the whole phone) */
body.member .adv, body.member .admin-only, body.member #advanced-wrap { display: none !important; }
body.no-mirror .phone-col { display: none !important; }
body.no-mirror .phone-layout { grid-template-columns: 1fr !important; }
.activity { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.activity li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.activity time { color: var(--muted); font-variant-numeric: tabular-nums; }
.people li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.people li .email { flex: 1; overflow-wrap: anywhere; }
/* narrow screens: the header wraps instead of pushing the page sideways */
.top { flex-wrap: wrap; }
.who { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) {
  .top { padding: 10px 16px; }
  #who-email, #who-role { display: none; }
  .brand-name { font-size: 20px; }
}
.activity-head { justify-content: space-between; align-items: center; }
.activity-head h2 { margin: 0; }
.extra-people { margin-top: 14px; }
.extra-people summary { cursor: pointer; color: var(--muted); }
/* "Logged in now" / extra people: name on its own line on narrow screens */
.people li { flex-wrap: wrap; }
.people li .email { flex: 1 1 14ch; min-width: 0; }
.people li .small-line { flex: 1 1 100%; order: 3; font-size: 13px; }
.people li.current { background: var(--surface-2); border-radius: 6px; padding-left: 8px; padding-right: 8px; }
.badge-me { white-space: nowrap; margin-left: 8px; padding: 1px 8px; border-radius: 9999px; font-size: 12px; background: var(--accent); color: var(--accent-text); }

/* phone setup checklist */
.setup-steps { list-style: none; margin: 12px 0; padding: 0; }
.setup-steps li { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.setup-steps .st-icon { width: 1.4em; text-align: center; flex: none; }
.setup-steps .st-ok .st-icon, .setup-steps .st-changed .st-icon { color: var(--ok); }
.setup-steps .st-failed .st-icon, .st-msg.error { color: var(--danger); }
.setup-steps .st-running .st-icon, .setup-steps .st-waiting .st-icon { color: var(--warn); }
.st-msg { font-size: 14px; }
.setup-before summary { cursor: pointer; color: var(--muted); }
.ok-line { color: var(--ok); }
.st-msg.warn { color: var(--warn); font-weight: 600; }

/* 2FA on the login page */
.qr { width: 200px; height: 200px; margin: 6px auto; background: #fff; padding: 8px; border-radius: 10px; }
.login-card code { user-select: all; overflow-wrap: anywhere; }
.login-card .small { font-size: 13px; }
/* Live screen: frames sent as the phone made them carry an EXIF orientation; show them as they are, like before */
#screen { image-orientation: none; }
.nav-buttons button { min-width: 46px; font-size: 18px; }
.nav-buttons #btn-back { font-size: 16px; }

/* phone facts: "Label: value" rows */
.fact-rows { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0 8px; font-size: 15px; }
.fact-row { display: contents; }
.fact-row .k { color: var(--muted); }
.fact-row .v { font-weight: 600; overflow-wrap: anywhere; }
.fact-row.yes .v { color: var(--ok); }
.fact-row.low .v { color: var(--warn); }
/* manual */
.manual h2 { margin-top: 18px; }
.manual h3 { margin: 16px 0 6px; font-size: 18px; }
.manual h4 { margin: 12px 0 4px; font-size: 16px; }
.manual li { margin: 4px 0; }
.manual code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: .92em; }
.manual img { max-width: 100%; border-radius: 10px; border: 1px solid var(--border); margin: 8px 0; }
.button-link { display: inline-block; padding: 10px 16px; border-radius: var(--radius-sm); background: var(--accent);
  color: var(--accent-text); text-decoration: none; font-weight: 600; }

/* phone facts on the home cards: "Label: value" as flowing lines (cards are narrow), words never cut in half */
.fact-row .v { overflow-wrap: break-word; }
.pcard .fact-rows { display: block; font-size: 14px; }
.pcard .fact-row { display: block; }
.pcard .fact-row .k::after { content: ": "; }
/* phone-width header: everything on one line */
@media (max-width: 480px) {
  .top { gap: 8px; padding: 8px 12px; }
  .brand-logo { width: 40px; height: 40px; }
  .who { gap: 6px; }
  .who .ghost-link, #logout, #theme { padding: 6px 8px; font-size: 13px; }
}
