/* ===== Themes =====================================================
   Default + [data-theme="mpc"]  : retro Akai MPC — warm cream chassis,
       charcoal structure, Akai red accents, LCD-green flourish.
   [data-theme="moonlit"]        : Moonlit Night — deep blues, cool/warm
       purples, silver moonlight highlights.
   Every component reads these vars, so theming is just a var swap.        */
:root, [data-theme="mpc"] {
  --bg: #e7dfca;          /* MPC chassis cream */
  --card: #f7f1e3;        /* lighter cream panel */
  --panel: #eee6d2;       /* subtle secondary fill (table heads, code) */
  --hover: #efe7d2;
  --line: #d4c9ad;
  --text: #2b2620;        /* warm charcoal */
  --muted: #8a8067;
  --navy: #36302a;        /* structure: header, nav, default buttons */
  --navy-dark: #262019;
  --on-navy: #f3ecd9;     /* text on the dark structural color */
  --orange: #d23a2c;      /* Akai red — brand accent, active, CTAs */
  --on-accent: #fff;      /* text on the accent color */
  --accent-glow: none;
  --green: #3f8a4e;
  --amber: #b8740c;
  --red: #c0392b;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(60, 48, 28, .18), 0 4px 12px rgba(60, 48, 28, .10);
}

[data-theme="moonlit"] {
  --bg: #0e1326;          /* deep midnight */
  --card: #18203c;        /* night-blue panel */
  --panel: #1f284a;
  --hover: #222c52;
  --line: #2c3766;
  --text: #e8eaf7;        /* moonlight white */
  --muted: #939bc2;       /* muted lavender-grey */
  --navy: #1b2448;        /* indigo structure */
  --navy-dark: #141b38;
  --on-navy: #eaecfb;
  --orange: #b7a0ff;      /* moonlit lavender accent */
  --on-accent: #1a1330;   /* dark text on the light lavender accent */
  --accent-glow: 0 0 10px rgba(183, 160, 255, .55);
  --green: #5cd3a0;
  --amber: #e7bd76;
  --red: #ff8073;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .45), 0 8px 22px rgba(18, 26, 66, .5);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
button { font: inherit; cursor: pointer; }
a { color: var(--navy); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* Layout — mobile-first: compact top header, nav as a bottom tab bar. */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 14px; padding-top: env(safe-area-inset-top);
  background: var(--navy); color: var(--on-navy); box-shadow: var(--shadow);
}
.brand { font-size: 19px; font-weight: 800; letter-spacing: .3px; }
.brand .dex { color: var(--orange); text-shadow: var(--accent-glow); }
.whoami { margin-left: auto; font-size: 13px; color: var(--on-navy); display: flex; align-items: center; gap: 8px; }
.whoami button, .icon-btn { background: transparent; border: 1px solid color-mix(in srgb, var(--on-navy) 35%, transparent); color: var(--on-navy); border-radius: 7px; padding: 5px 9px; }
.icon-btn { font-size: 15px; line-height: 1; padding: 5px 8px; }
.role-pill { font-size: 11px; font-weight: 700; text-transform: uppercase; background: var(--orange); color: var(--on-accent); padding: 2px 7px; border-radius: 20px; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; background: var(--navy-dark);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(10, 20, 35, .22);
}
.nav button {
  flex: 1 1 0; min-width: 0; background: transparent; border: 0;
  color: color-mix(in srgb, var(--on-navy) 58%, transparent);
  padding: 8px 2px; font-size: 11px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.nav button .ic { position: relative; display: inline-flex; }
.nav button .ic svg { width: 22px; height: 22px; display: block; }
.nav button.active { color: var(--orange); }
[data-theme="moonlit"] .nav button.active .ic svg { filter: drop-shadow(0 0 7px rgba(183, 160, 255, .6)); }
.icon-btn svg { width: 18px; height: 18px; display: block; }
.nav button .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

main { max-width: 1100px; margin: 0 auto; padding: 16px 14px; padding-bottom: calc(70px + env(safe-area-inset-bottom)); }

@media (min-width: 760px) {
  .nav {
    position: sticky; top: 52px; bottom: auto; justify-content: flex-start;
    gap: 2px; padding: 6px 14px; box-shadow: var(--shadow);
  }
  .nav button {
    flex: 0 0 auto; flex-direction: row; gap: 6px; font-size: 14px;
    padding: 8px 14px; border-radius: 8px;
  }
  .nav button:hover { background: color-mix(in srgb, var(--on-navy) 10%, transparent); }
  .nav button.active { background: color-mix(in srgb, var(--orange) 22%, transparent); }
  main { padding: 18px 16px 48px; }
}
@media (max-width: 440px) { .whoami .uname { display: none; } }
.view-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.view-head h1 { font-size: 22px; margin: 0; }
.spacer { flex: 1; }

/* Buttons */
.btn { background: var(--navy); color: var(--on-navy); border: 0; border-radius: 8px; padding: 9px 14px; font-weight: 600; }
.btn:hover { background: var(--navy-dark); }
.btn.orange { background: var(--orange); color: var(--on-accent); box-shadow: var(--accent-glow); }
.btn.orange:hover { filter: brightness(1.05); }
.btn.ghost { background: var(--card); color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--red); color: #fff; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
  font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); }
textarea { width: 100%; resize: vertical; }
.search { flex: 1; min-width: 180px; }

/* Cards & lists */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.row:hover { border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); cursor: pointer; }
.row .beono { font-weight: 800; font-size: 16px; min-width: 56px; flex-shrink: 0; }
.row-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
@media (max-width: 560px) { .hide-narrow { display: none !important; } .row { gap: 8px; padding: 11px 12px; } }
.row .client { font-weight: 600; }
.row .sub { color: var(--muted); font-size: 13px; }
.chip { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.chip.stub { background: color-mix(in srgb, var(--amber) 22%, var(--card)); color: var(--amber); }
.chip.def { background: color-mix(in srgb, var(--green) 20%, var(--card)); color: var(--green); }
.chip.ten { background: color-mix(in srgb, var(--amber) 22%, var(--card)); color: var(--amber); }
.chip.pro { background: color-mix(in srgb, var(--orange) 18%, var(--card)); color: var(--orange); }
.chip.oth { background: var(--panel); color: var(--muted); }
.chip.count { background: color-mix(in srgb, var(--orange) 14%, var(--card)); color: var(--orange); }

/* Tables */
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { background: var(--panel); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); cursor: pointer; user-select: none; }
tbody tr:hover { background: var(--hover); }
.beolink { color: var(--orange); font-weight: 700; cursor: pointer; }
.beolink.inferred { font-weight: 600; border-bottom: 1px dotted currentColor; opacity: .85; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
/* Sticky header only inside a height-capped scroll panel, so it pins WITHIN
   its own table (the big 60-day list) and never floats over page content. */
.scroll-panel { max-height: min(70vh, 640px); overflow: auto; }
.scroll-panel thead th { position: sticky; top: 0; z-index: 3; box-shadow: 0 1px 0 var(--line); }

/* Detail */
.detail-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.detail-head h1 { margin: 0; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 4px 14px; margin: 10px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 20px 0 8px; border-bottom: 2px solid var(--orange); padding-bottom: 4px; display: inline-block; }
.carousel { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 12px; }
.carousel img { height: 150px; border: 1px solid var(--line); border-radius: 8px; cursor: zoom-in; background: var(--card); box-shadow: var(--shadow); }
.carousel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* Color-coding: wash the whole page image as if it were printed on green/pink
   paper (multiply over a paper-colored backing). On-screen ONLY — printing uses a
   separate untinted image, since the physical paper carries the color. */
.cimg { display: inline-block; position: relative; border-radius: 8px; line-height: 0; }
.cimg.tint-green { background: #74c894; }
.cimg.tint-pink { background: #f29ac4; }
.cimg.tint-green img, .cimg.tint-pink img { mix-blend-mode: multiply; }
.color-pick { display: inline-flex; gap: 5px; align-items: center; }
.color-pick .cdot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; background: transparent; }
.color-pick .cdot.green { background: #2faa55; border-color: #2faa55; }
.color-pick .cdot.pink { background: #e85a9b; border-color: #e85a9b; }
.color-pick .cdot.none { position: relative; }
.color-pick .cdot.none::after { content: "○"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.color-pick .cdot.on { outline: 2px solid var(--text); outline-offset: 1px; }
.add-diagram { display: inline-block; margin: 4px 0 12px; cursor: pointer; }
/* Print just the chosen images, one per page. */
#print-area { display: none; }
@media print {
  body.printing { background: #fff; }
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing #print-area { display: block; }
  #print-area img { display: block; width: 100%; max-height: 100vh; object-fit: contain; page-break-after: always; }
}
.fn-grid { width: 100%; }
pre.block { white-space: pre-wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 4px 0; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); }

/* BEO edit form */
.edit-fn { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; background: var(--panel); }
.edit-fn .rf-top { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.edit-fn .rf-top .ef-name { flex: 1; min-width: 0; margin-bottom: 0; font-weight: 600; }
.edit-fn .ef-del { flex: 0 0 auto; padding: 6px 10px; }
.edit-fn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.edit-fn-grid input { width: 100%; min-width: 0; }
@media (max-width: 560px) { .edit-fn-grid { grid-template-columns: repeat(2, 1fr); } }
.edit-att { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 6px; }
.edit-att label { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); gap: 2px; }
.edit-att input { width: 100%; min-width: 0; }
@media (max-width: 560px) { .edit-att { grid-template-columns: repeat(3, 1fr); } }
.tl-cnt { font-variant-numeric: tabular-nums; opacity: .95; }

/* Scanned-BEO review workbench */
.rv-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 10px 0; background: var(--panel); }
.rv-card.approved { border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); }
.rv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rv-head .spacer { flex: 1; }
.rv-body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 14px; }
.rv-image { position: sticky; top: 8px; align-self: start; }
.rv-image img { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.rv-fields .kv { margin-top: 0; }
.rv-fn { border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 8px; }
.rv-fn .rf-top { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.rv-fn .rf-top .rf-name { flex: 1; min-width: 0; font-weight: 600; }
.rv-fn .rf-del { flex: 0 0 auto; padding: 6px 10px; }
.rv-fields textarea { width: 100%; }
.chip.scan { background: color-mix(in srgb, #d98324 30%, transparent); color: var(--text); }
@media (max-width: 720px) { .rv-body { grid-template-columns: 1fr; } .rv-image { position: static; } }
.rawdump { margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.rawdump summary { cursor: pointer; padding: 8px 10px; font-size: 12px; color: var(--orange); user-select: none; }
.rawdump-text { display: block; width: 100%; box-sizing: border-box; border: none; border-top: 1px solid var(--line); background: transparent; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.45; white-space: pre; overflow: auto; padding: 8px 10px; resize: vertical; }
/* Changelog review: the raw prose panel */
.cl-note { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--panel); }
.cl-note-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; }
.cl-line { font-style: italic; margin: 4px 0; line-height: 1.5; }
.cl-meta { font-size: 12px; margin-top: 10px; }
.cl-stale { margin-top: 8px; padding: 6px 8px; border-radius: 6px; font-size: 12px; background: color-mix(in srgb, var(--red) 18%, transparent); color: var(--text); }

/* Change history + inline change markers */
.changed-dot { color: var(--orange); font-size: 0.7em; vertical-align: middle; }
tr.row-changed td { background: color-mix(in srgb, var(--orange) 7%, transparent); }
.history { display: flex; flex-direction: column; gap: 8px; }
.hist-event { border: 1px solid var(--line); border-left: 3px solid color-mix(in srgb, var(--orange) 55%, var(--line)); border-radius: 8px; padding: 8px 10px; background: var(--panel); }
.hist-head { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; }
.hist-del { margin-left: auto; padding: 2px 8px; }
.hist-note { color: var(--muted); font-style: italic; margin: 4px 0; font-size: 0.9rem; }
.deltas { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.delta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 0.9rem; }
.delta .df { min-width: 150px; font-weight: 600; }
.delta .dv .o { color: var(--muted); text-decoration: line-through; }
.delta .dv .n { color: var(--text); font-weight: 600; }

/* BOM editor */
.bom-row { display: grid; grid-template-columns: 90px 1fr 120px 130px 32px; gap: 8px; margin-bottom: 6px; align-items: center; }
.bom-row .qty { text-align: right; }
@media (max-width: 640px) { .bom-row { grid-template-columns: 70px 1fr 80px; } .bom-row .cat, .bom-row .del { display: none; } }

/* Timeline */
.timeline-head { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.tl { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--card); max-height: min(74vh, 680px); overflow: auto; }
.tl-hours { display: grid; grid-template-columns: 140px 1fr; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 2; }
.tl-hours .room-col { padding: 6px 10px; font-size: 12px; color: var(--muted); font-weight: 700; }
.tl-hourcells { position: relative; height: 26px; }
.tl-hourcells span { position: absolute; top: 4px; font-size: 11px; color: var(--muted); transform: translateX(-50%); }
.tl-lane { display: grid; grid-template-columns: 140px 1fr; border-bottom: 1px solid var(--line); }
.tl-lane:last-child { border-bottom: 0; }
.tl-room { padding: 8px 10px; font-weight: 600; font-size: 13px; border-right: 1px solid var(--line); background: var(--panel); display: flex; align-items: center; }
.tl-track { position: relative; height: 52px; background-image: repeating-linear-gradient(to right, var(--line) 0, var(--line) 1px, transparent 1px, transparent calc(100%/24)); }
.tl-block {
  position: absolute; top: 6px; bottom: 6px; border-radius: 6px; padding: 3px 7px; overflow: hidden;
  background: var(--orange); color: var(--on-accent); font-size: 12px; cursor: pointer; box-shadow: var(--shadow), var(--accent-glow);
  display: flex; flex-direction: column; justify-content: center; line-height: 1.25;
}
.tl-block.stub { background: var(--amber); color: #fff; box-shadow: var(--shadow); }
.tl-block b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-block small { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Login */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card { width: 340px; max-width: 100%; padding: 28px; text-align: center; }
.login-card .brand { color: var(--text); font-size: 30px; margin-bottom: 4px; }
.login-card .brand .dex { color: var(--orange); text-shadow: var(--accent-glow); }
.login-card input { width: 100%; margin: 7px 0; }
.login-card .btn { width: 100%; margin-top: 8px; }
.error { color: var(--red); font-size: 13px; margin-top: 8px; min-height: 18px; }
.login-card .ver { color: var(--muted); font-size: 11px; letter-spacing: .4px; margin-top: 14px; opacity: .7; }

/* Upload / review */
.uploader { display: flex; flex-direction: column; gap: 12px; }
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 26px; text-align: center; background: var(--card); }
.banner { padding: 10px 14px; border-radius: 8px; margin: 10px 0; }
.banner.warn { background: color-mix(in srgb, var(--amber) 20%, var(--card)); color: var(--amber); }
.banner.ok { background: color-mix(in srgb, var(--green) 18%, var(--card)); color: var(--green); }
.banner.err { background: color-mix(in srgb, var(--red) 18%, var(--card)); color: var(--red); }
.result-line { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.result-line .out { font-weight: 700; min-width: 72px; }
.out.Created, .out.Updated { color: var(--green); }
.out.Skipped { color: var(--amber); }
.out.Failed { color: var(--red); }

/* Lightbox — viewport-unit sizing so tall BEO pages always fit and center. */
.lightbox { position: fixed; inset: 0; background: rgba(10,18,30,.92); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 12px; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 88vh; width: auto; height: auto; object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
#lightbox-frame { display: inline-block; line-height: 0; border-radius: 8px; }
.lightbox.tint-green #lightbox-frame { background: #74c894; }
.lightbox.tint-pink #lightbox-frame { background: #f29ac4; }
.lightbox.tint-green #lightbox-img, .lightbox.tint-pink #lightbox-img { mix-blend-mode: multiply; }
body.modal-open { overflow: hidden; }

/* Modal dialog (change password, notifications, etc.) */
.modal-back { position: fixed; inset: 0; background: rgba(10,18,30,.6); display: flex; align-items: flex-start; justify-content: center; z-index: 110; padding: 8vh 16px 16px; overflow-y: auto; }
.modal-card { width: 420px; max-width: 100%; padding: 0; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 18px; }
.form-col { display: flex; flex-direction: column; gap: 12px; }
.form-col label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.form-col input, .form-col select { width: 100%; }
.error.ok { color: var(--green, #3a9); }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.notif-state { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.notif-state .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.notif-state .dot.on { background: var(--green, #3a9); box-shadow: 0 0 8px var(--green, #3a9); }
.notif-state .dot.off { background: var(--line); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.cat-head { font-size: 13px; font-weight: 700; color: var(--muted); margin: 14px 0 8px; display: flex; align-items: center; justify-content: space-between; }
.cat-grid { display: flex; flex-direction: column; gap: 8px; }
.form-col .cat-row { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.form-col .cat-row input { margin-top: 3px; flex: none; width: auto; }
.form-col .cat-row span { display: flex; flex-direction: column; gap: 2px; }
.cat-row span .muted { font-size: 12px; }
.lnk { background: none; border: none; color: var(--orange); font-size: 12px; cursor: pointer; padding: 0; }

.empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--orange); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Theme flourishes */
[data-theme="moonlit"] .topbar { background: linear-gradient(115deg, #141d3f 0%, #1b2350 55%, #281f52 100%); }
[data-theme="moonlit"] .nav { background: linear-gradient(0deg, #10162f, #161e3c); }
[data-theme="moonlit"] .card, [data-theme="moonlit"] .row { background: linear-gradient(180deg, color-mix(in srgb, var(--card) 92%, #2a2358), var(--card)); }
[data-theme="moonlit"] .section-title { color: color-mix(in srgb, var(--orange) 70%, var(--text)); }
[data-theme="mpc"] .topbar, :root .topbar { border-bottom: 2px solid var(--orange); }
/* A little Akai LCD-green flourish on the MPC active timeline now-ish cue */
[data-theme="mpc"] .role-pill { letter-spacing: .5px; }
/* Upload progress pill in the nav */
.nav button.busy .ic::after { content: ""; position: absolute; top: -3px; right: -7px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: var(--accent-glow); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
