/* REALign design system.
   Structure mirrors the SHT/EAP dashboards (nav, section cards, KPI tiles, board,
   modal system, pill tabs, progress bars, empty states); reskinned to the official
   Align palette (Deep Green / Petrol Green / Dusty Green / White). Colors only, no
   Align logo or brand font. Light is default; dark applies under [data-theme=dark]
   for the profile toggle. No em dashes anywhere. */
:root {
  /* Align brand */
  --deep:#1A2629; --petrol:#1A3941; --dusty:#DCE2E4;
  /* Roles (SHT/EAP token names kept so ported markup maps cleanly) */
  --brand:#1A2629; --brand-2:#25343a; --brand-dark:#12181b; --on-brand:#ffffff;
  --accent:#1A3941; --accent-2:#12282e; --accent-soft:#e7edeb;
  --ink:#1A2629; --ink-soft:#3f5054; --muted:#647175;
  --bg:#f1f4f4; --card:#ffffff; --surface:#ffffff; --line:#dce2e4;
  --row-bg:#f7f9f9; --row-hover:#eef2f2; --chip:#eef2f2;
  --field-bg:#ffffff; --field-border:#cdd6d6;
  --good:#1f7a5a; --ok:#1f7a5a; --warn:#a8842f; --bad:#b23b3b; --info:#3a6b74;
  --radius:14px; --radius-sm:10px;
  --shadow:0 1px 3px rgba(26,38,41,.08),0 1px 2px rgba(26,38,41,.05);
  --shadow-lg:0 14px 36px rgba(26,38,41,.16);
  --font:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
:root[data-theme="dark"] {
  --brand:#0f1717; --brand-2:#1d2b2b; --brand-dark:#0a1010; --on-brand:#eef2f2;
  --accent:#4d7f89; --accent-2:#6b9aa3; --accent-soft:#1e2f30;
  --ink:#eef2f2; --ink-soft:#c3ced0; --muted:#8fa0a3;
  --bg:#14201f; --card:#1b2b2c; --surface:#1b2b2c; --line:#2a3d3e;
  --row-bg:#1f2f30; --row-hover:#243738; --chip:#223333;
  --field-bg:#16211f; --field-border:#33484a;
  --good:#4bbd8f; --ok:#4bbd8f; --warn:#d0a44a; --bad:#e2857c; --info:#7fb3bc;
  --shadow:0 1px 3px rgba(0,0,0,.35),0 1px 2px rgba(0,0,0,.3);
  --shadow-lg:0 14px 36px rgba(0,0,0,.5);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* Wordmark (text only, not the Align logo). Styled RE·ALIGN with a middle dot. */
.wordmark { font-weight: 700; letter-spacing: .04em; }
.wordmark .re { color: var(--accent); }
.wordmark .dot { color: var(--accent); margin: 0 .04em; }
.wordmark .align { color: var(--ink); }

/* ── Top nav ─────────────────────────────────────────── */
.nav { display: flex; align-items: center; gap: 18px; background: var(--brand); color: var(--on-brand); padding: 12px 22px; }
.nav .brand { display: flex; flex-direction: column; line-height: 1.05; }
.nav .brand .wordmark { font-size: 16px; }
.nav .brand .wordmark .re { color: #7fb3bc; }
.nav .brand .wordmark .align { color: #fff; }
.nav .brand span.sub { font-size: 10px; color: var(--dusty); letter-spacing: 2px; text-transform: uppercase; }
.nav .right { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--dusty); }
.nav .right .role { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; background: rgba(255,255,255,.12); padding: 3px 8px; border-radius: 999px; font-weight: 700; color: #fff; }
.nav .right .role.admin { background: var(--accent); }
.imp-banner { background: #5a3d00; color: #ffe9b8; text-align: center; padding: 6px; font-size: 12px; }

/* ── Page shell ─────────────────────────────────────── */
.wrap, .page-wrap { max-width: 920px; margin: 0 auto; padding: 28px 22px 64px; }
.section-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.section-sub { color: var(--muted); margin: 0 0 16px; }

/* App layout: fixed left sidebar + scrolling main column. */
.app-shell { display: flex; align-items: stretch; min-height: 100vh; }
/* Clip wide content (e.g. the pipeline board) HERE, not on html/body — putting
   overflow-x on html/body makes the body a scroll container and breaks the
   sidebar's position: sticky, so the menu scrolled away with the page. */
.app-main { flex: 1 1 auto; min-width: 0; overflow-x: hidden; }
html, body { overflow-x: clip; }

/* ── Left vertical navigation (mirrors the mobile drawer) ─────────────── */
.sidebar { flex: 0 0 224px; width: 224px; background: var(--brand); color: var(--on-brand);
  display: flex; flex-direction: column; gap: 4px; padding: 14px 12px 14px;
  position: sticky; top: 0; align-self: flex-start; height: 100vh; z-index: 40; transition: flex-basis .16s ease, width .16s ease; }
.side-top { display: flex; align-items: center; gap: 6px; padding: 4px 6px 12px; }
.sidebar .wordmark { font-size: 1.3rem; cursor: pointer; flex: 1 1 auto; white-space: nowrap; overflow: hidden; }
.sidebar .wordmark .re { color: #7fb3bc; } .sidebar .wordmark .dot { color: #7fb3bc; } .sidebar .wordmark .align { color: #fff; }
.side-collapse { flex: 0 0 auto; background: none; border: 0; color: var(--dusty); cursor: pointer; padding: 5px; border-radius: 8px; display: inline-grid; place-items: center; transition: background .12s, color .12s, transform .16s; }
.side-collapse:hover { color: #fff; background: rgba(255,255,255,.09); }

.sidebar .tabs { display: flex; flex-direction: column; gap: 2px; align-items: stretch; overflow-y: auto; overflow-x: hidden; }
/* Nav items (tabs) + bottom items share the icon+label row shape. */
.tab, .side-item { display: flex; align-items: center; gap: 11px; text-align: left; padding: 9px 11px; border: 0;
  background: transparent; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--dusty); cursor: pointer;
  border-radius: 10px; white-space: nowrap; transition: background .12s, color .12s; position: relative; }
.tab:hover, .side-item:hover { color: #fff; background: rgba(255,255,255,.09); }
.tab.active { color: var(--brand); background: #7fb3bc; }
.si-ic { flex: 0 0 22px; display: inline-grid; place-items: center; line-height: 0; }
.si-ic svg { display: block; }
.si-lb { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.side-bottom { margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; gap: 2px; }

/* Collapsed rail: icons only. Labels + wordmark text hide; the pin flips. */
body.nav-collapsed .sidebar { flex-basis: 64px; width: 64px; }
body.nav-collapsed .sidebar .si-lb,
body.nav-collapsed .sidebar .wordmark .align,
body.nav-collapsed .sidebar .wordmark .dot { display: none; }
body.nav-collapsed .sidebar .wordmark { text-align: center; font-size: 1.1rem; }
body.nav-collapsed .side-top { justify-content: center; }
body.nav-collapsed .tab, body.nav-collapsed .side-item { justify-content: center; padding: 10px 0; gap: 0; }
body.nav-collapsed .side-collapse { transform: rotate(180deg); }
body.nav-collapsed .bell-badge { top: 2px; right: 10px; }

/* Notification bell badge (bell is now a .side-item / mobilebar button) */
.bell { position: relative; }
.mobilebar .bell { background: none; border: 0; color: #fff; cursor: pointer; padding: 6px; display: inline-grid; place-items: center; line-height: 0; }
.bell-badge { position: absolute; top: 6px; left: 26px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 800; display: inline-grid; place-items: center; line-height: 1; }
.bell-badge[hidden] { display: none; }   /* the class display: would otherwise override the hidden attr */
.mobilebar .bell .bell-badge { top: -2px; left: auto; right: -2px; }

/* Competition opt-in banner */
.comp-banner { max-width: 1120px; margin: 14px auto -6px; padding: 0 30px; }
.comp-banner .cb { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, var(--warn), #caa23f); color: #1a1400; border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); }
.comp-banner .ic { font-size: 20px; }
.comp-banner .tx { flex: 1 1 auto; min-width: 0; font-size: 13.5px; }
.comp-banner .cb-join { flex: 0 0 auto; background: #1a2629; color: #fff; border: 0; border-radius: 999px; padding: 6px 16px; font: inherit; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.comp-banner .cb-no { flex: 0 0 auto; background: transparent; color: #1a1400; border: 1px solid rgba(0,0,0,.25); border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer; }
@media (max-width: 820px) { .comp-banner { padding: 0 16px; } }

/* "Don't miss today" banner (top of the main column) */
.today-banner { max-width: 960px; margin: 14px auto -6px; padding: 0 26px; }
.today-banner .tbn { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, var(--brand), var(--petrol)); color: var(--on-brand); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); }
.today-banner .tbn .ic { font-size: 20px; }
.today-banner .tbn .tx { flex: 1 1 auto; min-width: 0; font-size: 13.5px; }
.today-banner .tbn .tx b { font-weight: 700; }
.today-banner .tbn .tx .more { opacity: .85; }
.today-banner .tbn .see { flex: 0 0 auto; background: var(--on-brand); color: var(--brand); border: 0; border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.today-banner .tbn .x { flex: 0 0 auto; background: none; border: 0; color: var(--on-brand); opacity: .8; cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 4px; }
@media (max-width: 820px) { .today-banner { padding: 0 16px; margin-top: 12px; } }

/* Notification center list (rendered inside the shared modal) */
.notif-list { display: flex; flex-direction: column; }
.notif-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 6px 2px 8px; }
.notif { display: flex; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); cursor: default; }
.notif.link { cursor: pointer; }
.notif.link:hover { background: var(--row-hover); border-radius: 8px; }
.notif.unread { background: var(--accent-soft); border-radius: 8px; }
.notif .dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 999px; margin-top: 6px; background: var(--accent); }
.notif.read .dot { background: var(--line); }
.notif .body { flex: 1 1 auto; min-width: 0; }
.notif .t { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.notif .b { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.notif .ago { font-size: 11px; color: var(--muted); margin-top: 3px; }
.notif-empty { color: var(--muted); text-align: center; padding: 28px 10px; font-size: 13px; }

/* Mobile top bar + drawer scrim (hidden on desktop). */
.mobilebar { display: none; align-items: center; gap: 12px; background: var(--brand); color: #fff; padding: 10px 16px;
  position: sticky; top: 0; z-index: 45; }
.mobilebar .wordmark { font-size: 1.2rem; }
.hamburger { background: none; border: 0; color: #fff; cursor: pointer; padding: 4px; display: inline-grid; place-items: center; }
.nav-scrim { display: none; position: fixed; inset: 0; background: rgba(26,38,41,.42); z-index: 39; }

/* Main content is capped so pages are not full-bleed. Wide inner content
   (kanban board) scrolls inside its own container, not the page. */
.panel { max-width: 1120px; margin: 0 auto; padding: 26px 30px 64px; }

@media (max-width: 820px) {
  .mobilebar { display: flex; }
  .app-shell { display: block; }
  .sidebar { position: fixed; top: 0; left: 0; height: 100vh; width: 250px; flex-basis: 250px;
    transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .nav-scrim { display: block; }
  .side-top { display: none; }            /* wordmark lives in the mobile bar; no collapse on mobile */
  /* The drawer is always full-width on mobile — collapse is a desktop feature. */
  body.nav-collapsed .sidebar { flex-basis: 250px; width: 250px; }
  body.nav-collapsed .sidebar .si-lb { display: inline; }
  body.nav-collapsed .tab, body.nav-collapsed .side-item { justify-content: flex-start; padding: 9px 11px; gap: 11px; }
  .panel { padding: 20px 16px 56px; }
}

/* Compact date in the top bar. */
.top-date { color: var(--dusty); font-size: 12px; font-weight: 600; opacity: .85; white-space: nowrap; }
@media (max-width: 900px) { .top-date { display: none; } }

/* ── Cards / sections ───────────────────────────────── */
.section, .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 18px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.section-head h2, .card h3 { margin: 0; font-size: 16px; }

/* KPI tiles / metrics */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.tile .k { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 600; }
.tile .v { font-size: 26px; font-weight: 700; color: var(--ink); margin-top: 6px; }
.tile .v small { font-size: 14px; color: var(--muted); font-weight: 500; }
.metric { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.metric-accent { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--c, var(--accent)); }

/* ── Buttons ────────────────────────────────────────── */
.btn, .btn-primary { appearance: none; border: 1px solid transparent; border-radius: 10px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; background: var(--accent); color: var(--on-brand); transition: transform .05s, background .15s; }
.btn:hover, .btn-primary:hover { background: var(--accent-2); }
.btn:active, .btn-primary:active { transform: translateY(1px); }
.btn.ghost, .btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn.ghost:hover, .btn-ghost:hover { background: var(--chip); }
.btn.sm, .btn-sm { padding: 7px 12px; font-size: .85rem; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; font-weight: 600; padding: 0; }

/* Pill/segmented toggles (range tabs, view toggles, chips) */
.pill, .range-tab, .seg { background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 6px 14px; border-radius: 20px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.pill:hover, .range-tab:hover, .seg:hover { border-color: var(--accent); }
.pill.on, .pill.active, .range-tab.active, .seg.active, .seg.on { background: var(--accent); color: var(--on-brand); border-color: var(--accent); }
.chip { font-size: 11px; padding: 2px 9px; border-radius: 20px; background: var(--chip); color: var(--ink-soft); font-weight: 600; }

/* ── Fields ─────────────────────────────────────────── */
.field { width: 100%; padding: 11px 13px; border: 1px solid var(--field-border); border-radius: 10px; font: inherit; background: var(--field-bg); color: var(--ink); }
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,57,65,.15); }
label { font-size: .8rem; font-weight: 600; color: var(--ink-soft); }

/* ── Board (kanban) ─────────────────────────────────── */
.board { display: flex; gap: 16px; overflow-x: auto; padding: 2px 2px 18px; }
.col { flex: 0 0 272px; background: var(--row-bg); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; max-height: 72vh; overflow: hidden; }
.col-head { padding: 12px 15px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: inherit; }
.col-head b { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-soft); }
.col-head .count { background: var(--accent); color: var(--on-brand); border-radius: 20px; font-size: 11px; padding: 1px 9px; font-weight: 700; }
.col-body { overflow-y: auto; padding: 11px; display: flex; flex-direction: column; gap: 10px; }
.deal { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 12px 13px; box-shadow: var(--shadow); cursor: grab; }
.deal:hover { box-shadow: var(--shadow-lg); }
.deal .addr { font-weight: 600; font-size: 13px; }

/* ── Modal system ───────────────────────────────────── */
.modal-scrim { position: fixed; inset: 0; background: rgba(15,23,25,.55); display: none; align-items: center; justify-content: center; z-index: 60; padding: 20px; }
.modal-scrim.show { display: flex; }
.modal { background: var(--card); color: var(--ink); border-radius: var(--radius); width: 520px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal.modal-wide { width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-close { background: none; border: 0; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.modal-body { padding: 20px 22px; overflow: auto; }
.modal-footer { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

/* ── Progress bar ───────────────────────────────────── */
.progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.progress > i.done { background: var(--good); }

/* ── Empty states, misc ─────────────────────────────── */
.empty-state, .placeholder { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px; text-align: center; color: var(--muted); }
.placeholder h3 { color: var(--ink); margin: 0 0 8px; font-size: 1.25rem; }
.placeholder .soon { display: inline-block; margin-top: 14px; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 700; }
.home-hint { color: var(--muted); text-align: center; padding: 48px 0; }

/* ── Home / front door: greeting (hero) + one tile per tab ──────────────────── */
.home { max-width: 920px; margin: 0 auto; }
.launcher { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.lcard { position: relative; display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  padding: 15px; cursor: pointer; font: inherit; overflow: hidden;
  transition: transform .12s ease, box-shadow .16s ease, border-color .16s ease; }
/* Gradient accent ring on hover (techy sheen), drawn as a masked border. */
.lcard::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, var(--accent), transparent 60%); opacity: 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; transition: opacity .16s ease; pointer-events: none; }
.lcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.lcard:hover::before { opacity: 1; }
.lcard-ic { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center;
  color: var(--accent); background: var(--accent-soft); border-radius: 11px; transition: transform .16s ease; }
.lcard-ic svg { width: 19px; height: 19px; }
.lcard:hover .lcard-ic { transform: scale(1.06); }
.lcard-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lcard-t { font-weight: 700; font-size: .95rem; color: var(--ink); letter-spacing: -.01em; }
.lcard-b { color: var(--muted); font-size: .8rem; line-height: 1.32;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lcard-go { position: absolute; top: 13px; right: 13px; color: var(--accent); font-size: 1rem;
  opacity: 0; transform: translateX(-4px); transition: opacity .16s ease, transform .16s ease; }
.lcard:hover .lcard-go { opacity: 1; transform: translateX(0); }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ok-note { color: var(--ok); font-size: .85rem; }
.err { color: var(--bad); font-size: .85rem; min-height: 1.2em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Thin scrollbars on scroll areas */
.board, .col-body, .modal-body { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.board::-webkit-scrollbar, .col-body::-webkit-scrollbar, .modal-body::-webkit-scrollbar { width: 9px; height: 9px; }
.board::-webkit-scrollbar-thumb, .col-body::-webkit-scrollbar-thumb, .modal-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }

/* Confetti (delight on goal completion) */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 12px; opacity: .9; animation: confetti-fall 1.6s linear forwards; }
@keyframes confetti-fall { to { transform: translateY(105vh) rotate(540deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }

/* ── Login ──────────────────────────────────────────── */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px 32px; }
.login-card h1 { font-size: 2.4rem; margin: 0 0 4px; text-align: center; }
.login-card .sub { color: var(--muted); text-align: center; margin: 0 0 26px; font-size: .95rem; }
.login-card .row { margin-bottom: 16px; }
.login-foot { max-width: 400px; margin: 18px auto 0; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.5; }
.login-foot p { margin: 2px 0; }
.login-foot a { color: var(--accent); text-decoration: none; }
.devpick { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); }
.devpick .lbl { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; }
.devpick .chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Top bar for the app shell: wordmark + tab nav (left) and user controls (right). */
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 22px; background: var(--brand); border-bottom: 1px solid var(--brand-dark); }
.topbar .wordmark { flex: 0 0 auto; }
.topbar .wordmark .re { color: #7fb3bc; } .topbar .wordmark .align { color: #fff; }
.whoami { flex: 0 0 auto; margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: .9rem; color: var(--dusty); }
.whoami .role { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; background: rgba(255,255,255,.12); color: #fff; padding: 3px 8px; border-radius: 999px; font-weight: 700; }
.whoami .role.admin { background: var(--accent); color: #fff; }
.whoami .btn.ghost { color: var(--dusty); border-color: rgba(255,255,255,.25); }
.whoami .btn.ghost:hover { background: rgba(255,255,255,.1); }
.icon-btn { padding: 7px 9px; display: inline-grid; place-items: center; line-height: 0; }
.icon-btn svg { display: block; }
.who-link { background: none; border: 0; font: inherit; color: var(--dusty); font-weight: 600; cursor: pointer; padding: 4px 6px; border-radius: 8px; transition: background .12s, color .12s; }
.who-link:hover { color: #fff; background: rgba(255,255,255,.09); }

/* Shared helpers used by feature surfaces */
.toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.toggle button { border: none; background: var(--card); color: var(--ink-soft); padding: 8px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.toggle button.on { background: var(--accent); color: var(--on-brand); }
