@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Saira+Semi+Condensed:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20,400,0,0&display=block');

/* ═══════════════════════════════════════════════════════════════════════
   VEILFORM — AMBER CRT TERMINAL THEME
   Cassette punk · Aliens console aesthetic
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  --bg:           #050400;
  --bg-soft:      #0c0b00;
  --bg-1:         #060500;
  --bg-2:         #0d0b00;
  --bg-3:         #141200;

  --panel:        rgba(28,24,0,0.82);
  --panel-strong: rgba(32,28,0,0.90);
  --panel-border: rgba(255,208,60,0.45);

  --text:         #ffd060;
  --muted:        #d09020;
  --muted-2:      #a06c10;

  --gold:         #ffd060;
  --gold-2:       #cc9a20;
  --gold-soft:    rgba(255,208,60,0.16);
  --gold-softer:  rgba(255,208,60,0.08);

  --input-bg:     rgba(255,208,60,0.05);
  --input-border: rgba(255,208,60,0.30);

  --button:       #ffd060;
  --button-text:  #050400;

  --ok:           #39ff14;
  --warn:         #ff8c00;
  --danger:       #ff3300;
  --success:      #39ff14;

  --cat-event:    #ffd060;
  --cat-meeting:  #ff9a20;
  --cat-release:  #39ff14;
  --cat-holiday:  #ff3300;
  --cat-personal: #d09020;

  --glow:        0 0 8px rgba(255,208,60,0.80);
  --glow-strong: 0 0 14px rgba(255,208,60,1.0), 0 0 30px rgba(255,208,60,0.50);
  --card-glow:   0 0 20px rgba(255,208,60,0.12);

  /* Phosphor terminal tints — drive the shared CRT treatment per theme.
     --acc-rgb: bright accent · --dim-rgb: structural lines/glow · --screen-rgb: panel near-black */
  --acc-rgb:    218,138,26;
  --dim-rgb:    182,118,18;
  --screen-rgb: 18,13,2;

  --font:         'Saira Semi Condensed', 'VT323', sans-serif;
  --font-display: 'Orbitron', 'Saira Semi Condensed', sans-serif;
  --radius: 0px;
}

/* ── CRT scan lines ─────────────────────────────────────────────────────── */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent      0px,
    transparent      2px,
    rgba(0,0,0,0.18) 2px,
    rgba(0,0,0,0.18) 4px
  );
}

/* ── Reset & base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.nebula     { display: none !important; }
#star-field { display: none !important; }
.stars      { display: none !important; }

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--panel-border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ── Logo ───────────────────────────────────────────────────────────────── */
.logo,
.tb-logo {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: var(--glow);
  text-decoration: none;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: var(--text);
}

/* ── Topbar layout helpers ──────────────────────────────────────────────── */
.topbar-right,
.topbar-center,
.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.topbar-center { justify-content: center; flex: 1; min-width: 0; }
.topbar-left   { justify-content: flex-start; flex-wrap: nowrap; min-width: 0; }

/* ── Global nav: menu button ────────────────────────────────────────────── */
.nav-menu-btn {
  appearance: none;
  width: 38px; height: 34px;
  display: grid; place-items: center;
  padding: 0; flex-shrink: 0;
  border: 1px solid var(--panel-border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.1s, background 0.1s, border-color 0.1s;
}
.nav-menu-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; pointer-events: none; }
.nav-menu-btn:hover { color: var(--text); border-color: var(--gold); background: var(--gold-soft); }

/* ── Global nav: app drawer ─────────────────────────────────────────────── */
.nav-drawer-backdrop {
  position: fixed; inset: 0; z-index: 990;
  background: rgba(0,0,0,0.6);
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease;
}
.nav-drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.nav-drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 1000;
  width: min(310px, 86vw);
  display: flex; flex-direction: column;
  background: var(--bg);
  border-right: 1px solid var(--panel-border);
  box-shadow: 12px 0 40px rgba(0,0,0,0.55);
  transform: translateX(-102%);
  transition: transform 0.2s ease;
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--panel-border);
  flex-shrink: 0;
}
.nav-drawer-title {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text); text-shadow: var(--glow);
}
.nav-drawer-close {
  appearance: none; border: 1px solid var(--panel-border); background: transparent;
  color: var(--muted); font-family: var(--font); font-size: 16px; line-height: 1;
  padding: 5px 10px; cursor: pointer;
}
.nav-drawer-close:hover { border-color: var(--gold); color: var(--text); background: var(--gold-soft); }
.nav-drawer-search {
  padding: 10px 12px;
  border-bottom: 1px solid var(--panel-border);
  flex-shrink: 0;
}
.nav-drawer-search input {
  width: 100%; box-sizing: border-box;
  appearance: none; -webkit-appearance: none;
  background: var(--gold-softer);
  border: 1px solid var(--panel-border);
  color: var(--text);
  font-family: var(--font); font-size: 15px;
  letter-spacing: 0.06em;
  padding: 8px 11px;
}
.nav-drawer-search input::placeholder { color: var(--muted-2); }
.nav-drawer-search input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold-soft);
}
.nav-drawer-body { flex: 1; overflow-y: auto; padding: 8px 0 12px; }
.nav-drawer-empty {
  padding: 18px 16px; text-align: center;
  font-size: 14px; letter-spacing: 0.08em;
  color: var(--muted-2);
}
.nav-section {
  padding: 16px 16px 5px;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted-2);
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  min-height: 44px; padding: 6px 16px;
  text-decoration: none;
  color: var(--muted);
  font-family: var(--font); font-size: 17px;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-left: 2px solid transparent;
  transition: background 0.1s, color 0.1s, border-color 0.1s, text-shadow 0.1s;
}
.nav-item:hover { background: var(--gold-softer); color: var(--text); text-shadow: var(--glow); }
.nav-item.active {
  background: var(--gold-soft);
  color: var(--text);
  border-left-color: var(--gold);
  text-shadow: var(--glow);
}
.nav-item svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.nav-item-prefix { color: var(--muted-2); flex-shrink: 0; }
.nav-item.active .nav-item-prefix,
.nav-item:hover .nav-item-prefix { color: var(--gold); }
.nav-item-home { font-weight: 700; }
.nav-drawer-foot {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--panel-border);
  flex-shrink: 0;
}
.nav-drawer-foot .nav-item { justify-content: center; padding: 6px 10px; font-size: 15px; }
.nav-drawer-foot .nav-item + .nav-item { border-left: 1px solid var(--panel-border); }

/* ── Global nav: mobile bottom bar ──────────────────────────────────────── */
.vf-bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  display: none;
  grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(3,2,0,0.98);
  border-top: 1px solid rgba(var(--dim-rgb),0.58);
  box-shadow: inset 0 1px 0 rgba(var(--acc-rgb),0.14);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bn-item {
  appearance: none; border: 0; background: transparent;
  display: flex; align-items: center; justify-content: center;
  min-width: 0; min-height: 40px; padding: 5px 4px;
  text-decoration: none; cursor: pointer;
  color: var(--muted);
  font-family: var(--font); font-size: 12px; line-height: 1;
  letter-spacing: 0.16em; text-transform: uppercase;
  border-right: 1px solid rgba(var(--dim-rgb),0.24);
}
.bn-item:last-child { border-right: 0; }
.bn-item span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bn-item.active,
.bn-item:hover {
  color: var(--text);
  background: rgba(var(--acc-rgb),0.08);
  text-shadow: var(--glow);
}
.bn-item.active {
  background: rgba(var(--acc-rgb),0.14);
}
.bn-item.active span::before { content: "["; color: var(--gold); }
.bn-item.active span::after { content: "]"; color: var(--gold); }
@media (max-width: 760px) {
  .vf-bottomnav:not(.bn-hidden) { display: grid; }
  body.has-bottomnav { padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px)); }
  /* Bottom nav takes over navigation on mobile, so drop the topbar to reclaim the
     space. Scoped to has-bottomnav so standalone topbars (e.g. users.php) stay put. */
  body.has-bottomnav .topbar { display: none; }
}

/* ── Touch ergonomics ───────────────────────────────────────────────────── */
@media (pointer: coarse) {
  .chip { min-height: 42px; padding: 8px 14px; }
  .view-toggle-btn, .chip-icon-only, .toolbar-plus { min-height: 42px; height: 42px; width: 42px; }
  .nav-item { min-height: 48px; }
  .user-dropdown a, .user-dropdown button { padding: 12px 14px; }
  .tab-btn { min-height: 44px; }
}

/* Tab rows swipe sideways on small screens instead of clipping */
@media (max-width: 760px) {
  .tab-nav { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tab-nav::-webkit-scrollbar { display: none; }
  .tab-nav .tab-btn { flex-shrink: 0; }
}

/* ── Header timer widget ────────────────────────────────────────────────── */
.ht-widget {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--panel-border);
  padding: 4px 10px;
  font-family: var(--font);
  font-size: 18px;
}
.ht-elapsed {
  display: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--text);
  text-shadow: var(--glow);
  min-width: 56px;
}
.ht-btn {
  appearance: none;
  border: 1px solid var(--panel-border);
  background: transparent;
  padding: 2px 8px;
  font-family: var(--font);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.1s, color 0.1s, border-color 0.1s, text-shadow 0.1s;
  line-height: 1;
}
.ht-btn.ht-idle { color: var(--muted); }
.ht-btn.ht-idle:hover { background: var(--gold-soft); color: var(--text); border-color: var(--gold); text-shadow: var(--glow); }
.ht-btn.ht-running { color: var(--ok); border-color: var(--ok); text-shadow: 0 0 6px rgba(57,255,20,0.5); }
.ht-btn.ht-running:hover { background: rgba(57,255,20,0.08); }
.ht-btn:disabled { opacity: 0.5; cursor: wait; }
@media (max-width: 640px) {
  .ht-elapsed { min-width: auto; }
}

/* ── Clock ──────────────────────────────────────────────────────────────── */
.clock,
#liveClock {
  font-family: var(--font);
  font-size: 20px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 0;
  background: transparent;
}

/* ── Weather widget ─────────────────────────────────────────────────────── */
.weather-widget {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--panel-border);
  font-family: var(--font);
  font-size: 18px;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.weather-widget .material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  text-shadow: var(--glow);
}
.weather-temp {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-shadow: var(--glow);
}
.weather-city {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Weather dropdown — compact station readout card ────────────────────── */
.weather-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 266px;
  background: rgba(3,2,0,0.99);
  border: 1px solid var(--panel-border);
  box-shadow: 0 18px 50px rgba(0,0,0,0.6);
  z-index: 200;
  padding: 14px 16px;
  font-family: var(--font);
  pointer-events: all;
}
.weather-widget.open .weather-dropdown { display: block; animation: wxIn 0.2s cubic-bezier(.2,.7,.2,1); }
@keyframes wxIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* condition-tinted header band — bleeds to the card edges */
.wx-headband {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px;
  margin: -14px -16px 12px; padding: 13px 16px 12px;
  border-bottom: 1px solid var(--panel-border);
}
.wx-headband::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    var(--wx-sky, radial-gradient(120% 120% at 80% -20%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 60%)),
    linear-gradient(var(--panel-border) 1px, transparent 1px) 0 0 / 100% 22px;
  opacity: 0.55;
}
.wx-headband > * { position: relative; z-index: 1; }
.wx-big-icon {
  font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal;
  font-size: 42px; line-height: 1; letter-spacing: normal; text-transform: none;
  display: inline-block; -webkit-font-smoothing: antialiased;
  color: var(--gold); text-shadow: var(--glow-strong); flex: 0 0 auto;
}
.wx-htxt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.wx-big-temp { font-size: 34px; color: var(--text); text-shadow: var(--glow); line-height: 1; font-variant-numeric: tabular-nums; }
.wx-desc { font-family: var(--font); font-weight: 500; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.wx-loc { font-family: var(--font); font-size: 12px; letter-spacing: 0.10em; text-transform: uppercase; color: var(--muted-2); text-align: right; align-self: flex-start; max-width: 80px; line-height: 1.3; }

.wx-section { font-family: var(--font); font-weight: 600; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 7px; }
.wx-section-sp { margin-top: 13px; }
.wx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.wx-grid-sp { margin-top: 7px; }
.wx-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; gap: 10px; }
.wx-row-key { font-family: var(--font); font-weight: 500; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); white-space: nowrap; }
.wx-row-val { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wx-row-val.wx-warn { color: var(--warn); }
.wx-row-val.wx-danger { color: var(--danger); }

/* precipitation rows with a probability bar */
.wx-prow { display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center; padding: 2px 0; }
.wx-prow-r { display: flex; gap: 8px; justify-content: flex-end; }
.wx-pbar { height: 4px; position: relative; overflow: hidden; background: color-mix(in srgb, var(--panel-border) 85%, transparent); }
.wx-pbar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gold); }

/* footer */
.wx-open {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font); font-weight: 600; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text); text-decoration: none;
  background: color-mix(in srgb, var(--gold) 10%, transparent);
  border: 1px solid var(--panel-border); padding: 8px 12px; margin: 13px 0 7px;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.wx-open span { color: var(--gold); transition: transform 0.15s, color 0.12s; }
.wx-open:hover { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.wx-open:hover span { color: var(--bg); transform: translateX(3px); }
.wx-geo-btn {
  display: flex; align-items: center; gap: 7px; width: 100%;
  font-family: var(--font); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  background: transparent; border: 1px solid var(--panel-border); color: var(--muted);
  padding: 6px 10px; cursor: pointer; text-align: left;
  transition: color 0.1s, border-color 0.1s, text-shadow 0.1s;
}
.wx-geo-btn:hover { color: var(--text); border-color: var(--gold); text-shadow: var(--glow); }
.wx-geo-btn:disabled { opacity: 0.5; cursor: wait; }

/* condition tints for the header band */
.weather-dropdown[data-sky="clear-day"]   .wx-headband::before { --wx-sky: radial-gradient(120% 130% at 82% -20%, color-mix(in srgb, var(--gold) 26%, transparent), transparent 62%); }
.weather-dropdown[data-sky="clear-night"] .wx-headband::before { --wx-sky: radial-gradient(120% 130% at 18% -10%, color-mix(in srgb, var(--gold) 10%, transparent), transparent 60%); opacity: 0.4; }
.weather-dropdown[data-sky="pcloud-day"]   .wx-headband::before { --wx-sky: radial-gradient(120% 120% at 78% -15%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 60%); }
.weather-dropdown[data-sky="cloud"] .wx-headband::before,
.weather-dropdown[data-sky="fog"]   .wx-headband::before { --wx-sky: linear-gradient(180deg, color-mix(in srgb, var(--muted-2) 12%, transparent), transparent 70%); opacity: 0.45; }
.weather-dropdown[data-sky="rain"]    .wx-headband::before,
.weather-dropdown[data-sky="sleet"]   .wx-headband::before,
.weather-dropdown[data-sky="thunder"] .wx-headband::before { --wx-sky: linear-gradient(180deg, color-mix(in srgb, #74b9e8 18%, transparent), transparent 72%); }
.weather-dropdown[data-sky="snow"] .wx-headband::before { --wx-sky: linear-gradient(180deg, color-mix(in srgb, #74b9e8 10%, transparent), transparent 72%); opacity: 0.4; }

@media (max-width: 700px) {
  .weather-city { display: none; }
  .weather-dropdown { right: auto; left: 0; width: min(266px, calc(100vw - 20px)); }
}
@media (max-width: 500px) {
  .weather-widget { padding: 4px 7px; }
}

/* ── User pill & avatar ─────────────────────────────────────────────────── */
.user-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 0;
  background: transparent;
  font-family: var(--font);
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.user-pill:hover { border-color: var(--gold); color: var(--text); }

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  min-width: 140px;
  background: rgba(3,2,0,0.99);
  border: 1px solid var(--panel-border);
  z-index: 200;
}
.user-pill.open .user-dropdown { display: block; }
.user-dropdown a {
  display: block; padding: 8px 14px; text-decoration: none;
  color: var(--muted); font-family: var(--font); font-size: 16px;
  letter-spacing: 0.10em; text-transform: uppercase;
  transition: background 0.1s, color 0.1s, text-shadow 0.1s; white-space: nowrap;
}
.user-dropdown a:hover { background: var(--gold-soft); color: var(--text); text-shadow: var(--glow); }

.avatar {
  width: 22px; height: 22px; border-radius: 0;
  display: grid; place-items: center;
  font-weight: 700; font-size: 16px;
  background: var(--gold); color: var(--bg);
}

/* ── All button variants ────────────────────────────────────────────────── */
.btn-link,
.btn-ghost,
.topbar-btn,
.logout-btn {
  appearance: none; text-decoration: none;
  border: 1px solid var(--panel-border); color: var(--muted); background: transparent;
  padding: 5px 12px; font-family: var(--font); font-size: 16px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer;
  transition: color 0.1s, background 0.1s, text-shadow 0.1s, border-color 0.1s;
  display: inline-block; border-radius: 0;
}
.btn-link:hover,
.btn-ghost:hover,
.topbar-btn:hover,
.logout-btn:hover {
  background: var(--gold-soft); color: var(--text); text-shadow: var(--glow); border-color: var(--gold);
}

/* ── Panels ─────────────────────────────────────────────────────────────── */
.panel {
  border: 1px solid var(--panel-border);
  background: var(--panel-strong);
  border-radius: 0;
  padding: 16px;
}
.panel h2 {
  margin: 0 0 12px; font-size: 15px; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--muted); font-family: var(--font-display);
}

/* ── Activity items ─────────────────────────────────────────────────────── */
.activity { display: grid; gap: 6px; }
.activity-item {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 8px 10px; border: 1px solid var(--panel-border); background: var(--gold-softer); border-radius: 0;
}
.activity-item strong { font-size: 18px; color: var(--text); }
.activity-item span   { font-size: 16px; color: var(--muted); }

/* ── Form elements ──────────────────────────────────────────────────────── */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
textarea,
select {
  font-family: var(--font); font-size: 18px;
  background: var(--input-bg); color: var(--text);
  border: 1px solid var(--input-border); border-radius: 0;
  padding: 8px 12px; outline: none;
  transition: border-color 0.1s, box-shadow 0.1s;
}
input::placeholder,
textarea::placeholder { color: var(--muted-2); }
input:focus,
textarea:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), var(--glow);
}

/* ── Submit / primary button ────────────────────────────────────────────── */
.submit {
  font-family: var(--font); border-radius: 0; border: 1px solid var(--gold);
  background: transparent; color: var(--text); letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; box-shadow: none; transition: background 0.1s, text-shadow 0.1s, box-shadow 0.1s;
}
.submit:hover { background: var(--gold-soft); text-shadow: var(--glow); box-shadow: var(--glow); transform: none; filter: none; }

/* ── Chip / filter pills ────────────────────────────────────────────────── */
.chip {
  appearance: none;
  border: 1px solid var(--panel-border);
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.1s;
}
.chip:hover,
.chip.active { color: var(--text); background: var(--gold-soft); border-color: var(--gold); text-shadow: var(--glow); }

/* ── Status messages ────────────────────────────────────────────────────── */
.status        { font-size: 18px; color: var(--muted); font-family: var(--font); }
.status.error  { color: var(--danger); text-shadow: 0 0 6px rgba(255,34,0,0.5); }
.status.success { color: var(--ok); text-shadow: 0 0 6px rgba(57,255,20,0.5); }

/* ── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--muted-2); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Dashboard: tool cards ──────────────────────────────────────────────── */
.card {
  border: 1px solid var(--panel-border); background: var(--panel); border-radius: 0; box-shadow: none;
}
.card:hover {
  border-color: var(--gold); box-shadow: 0 0 18px rgba(255,176,0,0.14); transform: translateY(-2px);
}
.icon { border: 1px solid var(--panel-border); background: var(--gold-softer); border-radius: 0; }
.icon svg  { stroke: var(--gold); }
.card h3   { color: var(--text); font-family: var(--font); font-size: 18px; }
.card p    { color: var(--muted); font-size: 18px; }
.dot       { background: var(--gold); border-radius: 0; box-shadow: var(--glow); }
.badge     { font-size: 16px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.badge.core    { background: rgba(57,255,20,0.08);  color: var(--ok);   border: 1px solid rgba(57,255,20,0.25);  border-radius: 0; }
.badge.wellness{ background: rgba(255,140,0,0.08);  color: var(--warn); border: 1px solid rgba(255,140,0,0.25);  border-radius: 0; }

/* ── Dashboard: overview widgets ───────────────────────────────────────── */
.ov-card { border: 1px solid var(--panel-border); background: var(--panel-strong); border-radius: 0; }
.ov-card:hover { border-color: var(--gold); box-shadow: 0 0 18px rgba(255,176,0,0.10); }
.ov-badge       { background: var(--gold-softer); border: 1px solid var(--panel-border); border-radius: 0; color: var(--text); font-size: 16px; }
.ov-label       { font-size: 16px; }
.ov-event-date  { color: var(--text); font-size: 16px; }
.ov-event-title { color: var(--text); font-size: 18px; }
.ov-empty       { color: var(--muted-2); font-size: 18px; }
.ov-grocery-item{ color: var(--text); font-size: 18px; }
.ov-grocery-item::before { background: var(--muted-2); border-radius: 0; }
.ov-more           { color: var(--muted-2); font-size: 18px; }
.ov-tracker-task   { color: var(--text); font-size: 20px; }
.ov-tracker-project{ color: var(--muted); font-size: 18px; }
.ov-tracker-time   { color: var(--gold); }
.ov-today-val      { color: var(--gold); }
.ov-today-sub      { color: var(--muted); font-size: 18px; }
.live-dot          { background: var(--ok); box-shadow: 0 0 6px rgba(57,255,20,0.7); border-radius: 0; }

/* ── Command palette ────────────────────────────────────────────────────── */
.vf-cmdk-overlay { backdrop-filter: none; background: rgba(3,2,0,0.88); }
.vf-cmdk {
  border: 1px solid var(--panel-border); border-radius: 0;
  background: rgba(5,4,0,0.99); color: var(--text); font-family: var(--font);
  box-shadow: 0 0 32px rgba(255,176,0,0.10);
}
.vf-cmdk-head { border-bottom: 1px solid var(--panel-border); background: transparent; }
.vf-cmdk-input { border: 1px solid var(--panel-border); border-radius: 0; background: var(--gold-softer); color: var(--text); font-family: var(--font); }
.vf-cmdk-input:focus { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--glow); }
.vf-cmdk-item { border: 1px solid var(--panel-border); border-radius: 0; background: transparent; }
.vf-cmdk-item:hover,
.vf-cmdk-item.active { border-color: var(--gold); background: var(--gold-soft); }
.vf-cmdk-title { color: var(--text); font-family: var(--font); }
.vf-cmdk-meta  { color: var(--muted); border: 1px solid var(--panel-border); border-radius: 0; font-family: var(--font); }
.vf-cmdk-empty { color: var(--muted); font-family: var(--font); }
.vf-cmdk-foot  { border-top: 1px solid var(--panel-border); color: var(--muted-2); font-family: var(--font); }

/* ── Login page ─────────────────────────────────────────────────────────── */
.login-card {
  border: 1px solid var(--panel-border); border-radius: 0; background: var(--panel);
  backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 0 40px rgba(255,176,0,0.08);
}
.login-card::before { display: none; }

h1 { color: var(--text); font-family: var(--font-display); letter-spacing: 0.02em; }
.title-accent {
  background: none; -webkit-background-clip: unset; background-clip: unset;
  -webkit-text-fill-color: var(--text); color: var(--text); text-shadow: var(--glow-strong);
}
.card-top p { color: var(--muted); }
.password-toggle {
  font-family: var(--font); border-radius: 0; background: transparent;
  border: 1px solid var(--panel-border); color: var(--muted); font-size: 16px;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.password-toggle:hover { background: var(--gold-soft); color: var(--text); }
.check-box { border-radius: 0; border: 1px solid var(--panel-border); background: transparent; box-shadow: none; }
.check-box::after { border-radius: 0; background: var(--gold); box-shadow: var(--glow); }
.check input:checked + .check-box { border-color: var(--gold); background: var(--gold-softer); box-shadow: 0 0 0 3px var(--gold-softer); }

/* Solar system — amber phosphor radar tint */
.solar-bg { filter: sepia(1) hue-rotate(-10deg) saturate(0.5) brightness(0.65); }
.orbit { border-color: rgba(255,176,0,0.20); }

.page-title span,
.hero h1 span {
  background: none; -webkit-background-clip: unset; background-clip: unset;
  -webkit-text-fill-color: var(--text); color: var(--text); text-shadow: var(--glow);
}

/* ── Board editor toolbar ────────────────────────────────────────────────── */
#toolbar {
  background: rgba(3,2,0,0.98); border-bottom: 1px solid var(--panel-border);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.tb-sep { background: var(--panel-border); }
#boardTitleInput { font-family: var(--font); color: var(--text); background: transparent; border-radius: 0; }
#boardTitleInput:hover,
#boardTitleInput:focus { background: var(--gold-softer); }

/* ── Tab nav ─────────────────────────────────────────────────────────────── */
.tab-nav { border-bottom: 1px solid var(--panel-border); background: rgba(3,2,0,0.98); backdrop-filter: none; }
.tab-btn {
  font-family: var(--font); font-size: 16px; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--muted); border-bottom-color: transparent;
}
.tab-btn:hover  { color: var(--text); }
.tab-btn.active { color: var(--text); border-bottom-color: var(--gold); }

.input-wrap input[type="text"],
.input-wrap input[type="password"],
.input-wrap input[type="email"] { padding: 14px 18px 14px 48px; }

#boardTitleInput { border: none !important; box-shadow: none !important; background: transparent !important; }
#boardTitleInput:focus { border: none !important; box-shadow: none !important; background: var(--gold-softer) !important; }

@media (max-width: 640px) {
  .topbar { padding: 8px 12px; gap: 8px; }
  .topbar-right { gap: 7px; flex-wrap: nowrap; }
  .user-pill span { display: none; }
  /* Phone status bar already shows the time; free the space for navigation. */
  .clock, #liveClock { display: none; }
  .logo, .tb-logo { font-size: 17px; letter-spacing: 0.12em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ── CRT page transitions ───────────────────────────────────────────────── */
#crt-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg, #080100); opacity: 0; pointer-events: none;
  transform-origin: center center; will-change: transform, filter, opacity;
}
#crt-overlay::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0px, transparent 2px, rgba(0,0,0,0.18) 2px, rgba(0,0,0,0.18) 4px);
}
#crt-overlay.crt-entering { animation: crt-turn-on .8s linear forwards; }
#crt-overlay.crt-exiting  { animation: crt-exit 0.85s linear forwards; }

@keyframes crt-turn-on {
  0%   { transform: scale(1,1) translate3d(0,0,0);     filter: brightness(15); opacity: 1; }
  3%   { transform: scale(1.3,0.001) translate3d(0,0,0); filter: brightness(15); opacity: 1; }
  8%   { transform: scale(1.3,0.001) translate3d(0,0,0); filter: brightness(6);  opacity: 1; }
  14%  { transform: scale(1,1) translate3d(0,0,0);     filter: brightness(1);  opacity: 0; }
  100% { transform: scale(1,1) translate3d(0,0,0);     filter: brightness(1);  opacity: 0; }
}

@keyframes crt-exit {
  0%   { transform: scale(1.3,0.001) translate3d(0,0,0);  filter: brightness(30); opacity: 0; }
  4%   { transform: scale(1.3,0.001) translate3d(0,0,0);  filter: brightness(30); opacity: 1; }
  18%  { transform: scale(1,0.8) translate3d(0,0,0);      filter: brightness(10); opacity: 1; }
  30%  { transform: scale(1,0.8) translate3d(0,100%,0);   opacity: 1; }
  31%  { transform: scale(1,0.8) translate3d(0,-100%,0);  opacity: 1; }
  44%  { transform: scale(1.3,0.6) translate3d(0,100%,0); filter: brightness(10); opacity: 1; }
  58%  { transform: scale(1,1) translate3d(0,0,0);        filter: brightness(30); opacity: 0.8; }
  100% { transform: scale(1,1) translate3d(0,0,0);        filter: brightness(10); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  #crt-overlay.crt-entering,
  #crt-overlay.crt-exiting { animation: none; opacity: 0; }

  /* Hold the roll-bar still and stop the flicker; keep the static bloom. */
  html:not([data-theme="corporate"])::before { animation: none; opacity: 0; }
  html:not([data-theme="corporate"]) body::after { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   VEILFORM — GREEN PHOSPHOR THEME
   ═══════════════════════════════════════════════════════════════════════ */

html[data-theme="green"] {
  --bg:           #010201;
  --bg-soft:      #020502;
  --bg-1:         #010301;
  --bg-2:         #020702;
  --bg-3:         #030a03;
  --panel:        rgba(0,20,2,0.82);
  --panel-strong: rgba(0,24,3,0.90);
  --panel-border: rgba(0,255,65,0.38);
  --text:         #00ff41;
  --muted:        #00b82e;
  --muted-2:      #007a1e;
  --gold:         #00ff41;
  --gold-2:       #00cc33;
  --gold-soft:    rgba(0,255,65,0.15);
  --gold-softer:  rgba(0,255,65,0.07);
  --input-bg:     rgba(0,255,65,0.04);
  --input-border: rgba(0,255,65,0.28);
  --button:       #00ff41;
  --button-text:  #010201;
  --cat-event:    #00ff41;
  --cat-personal: #00b82e;
  --glow:        0 0 8px rgba(0,255,65,0.80);
  --glow-strong: 0 0 14px rgba(0,255,65,1.0), 0 0 30px rgba(0,255,65,0.50);
  --card-glow:   0 0 20px rgba(0,255,65,0.12);

  --acc-rgb:    0,224,70;
  --dim-rgb:    0,150,45;
  --screen-rgb: 2,15,4;
}
html[data-theme="green"] .solar-bg { filter: sepia(1) hue-rotate(80deg) saturate(1.2) brightness(0.65); }
html[data-theme="green"] .orbit { border-color: rgba(0,255,65,0.20); }

/* ═══════════════════════════════════════════════════════════════════════
   VEILFORM — RED PHOSPHOR THEME
   ═══════════════════════════════════════════════════════════════════════ */

html[data-theme="red"] {
  --bg:           #020000;
  --bg-soft:      #050000;
  --bg-1:         #030000;
  --bg-2:         #070000;
  --bg-3:         #0a0000;
  --panel:        rgba(20,0,0,0.82);
  --panel-strong: rgba(24,0,0,0.90);
  --panel-border: rgba(255,48,48,0.38);
  --text:         #ff3030;
  --muted:        #cc1a1a;
  --muted-2:      #8a0d0d;
  --gold:         #ff3030;
  --gold-2:       #cc2020;
  --gold-soft:    rgba(255,48,48,0.15);
  --gold-softer:  rgba(255,48,48,0.07);
  --input-bg:     rgba(255,48,48,0.04);
  --input-border: rgba(255,48,48,0.28);
  --button:       #ff3030;
  --button-text:  #020000;
  --cat-event:    #ff3030;
  --cat-personal: #cc1a1a;
  --glow:        0 0 8px rgba(255,48,48,0.80);
  --glow-strong: 0 0 14px rgba(255,48,48,1.0), 0 0 30px rgba(255,48,48,0.50);
  --card-glow:   0 0 20px rgba(255,48,48,0.12);

  --acc-rgb:    224,44,44;
  --dim-rgb:    150,30,30;
  --screen-rgb: 16,3,3;
}
html[data-theme="red"] .solar-bg { filter: sepia(1) hue-rotate(300deg) saturate(1.5) brightness(0.65); }
html[data-theme="red"] .orbit { border-color: rgba(255,48,48,0.20); }

/* ═══════════════════════════════════════════════════════════════════════
   VEILFORM — BLUE PHOSPHOR THEME
   ═══════════════════════════════════════════════════════════════════════ */

html[data-theme="blue"] {
  --bg:           #000105;
  --bg-soft:      #000208;
  --bg-1:         #000106;
  --bg-2:         #00020a;
  --bg-3:         #00030e;
  --panel:        rgba(0,5,25,0.82);
  --panel-strong: rgba(0,6,30,0.90);
  --panel-border: rgba(0,180,255,0.38);
  --text:         #00b4ff;
  --muted:        #0077bb;
  --muted-2:      #004d80;
  --gold:         #00b4ff;
  --gold-2:       #0090cc;
  --gold-soft:    rgba(0,180,255,0.15);
  --gold-softer:  rgba(0,180,255,0.07);
  --input-bg:     rgba(0,180,255,0.04);
  --input-border: rgba(0,180,255,0.28);
  --button:       #00b4ff;
  --button-text:  #000105;
  --cat-event:    #00b4ff;
  --cat-personal: #0077bb;
  --glow:        0 0 8px rgba(0,180,255,0.80);
  --glow-strong: 0 0 14px rgba(0,180,255,1.0), 0 0 30px rgba(0,180,255,0.50);
  --card-glow:   0 0 20px rgba(0,180,255,0.12);

  --acc-rgb:    0,162,224;
  --dim-rgb:    0,108,150;
  --screen-rgb: 2,9,18;
}
html[data-theme="blue"] .solar-bg { filter: sepia(1) hue-rotate(180deg) saturate(1.2) brightness(0.65); }
html[data-theme="blue"] .orbit { border-color: rgba(0,180,255,0.20); }

/* ═══════════════════════════════════════════════════════════════════════
   VEILFORM — WHITE PHOSPHOR THEME
   ═══════════════════════════════════════════════════════════════════════ */

html[data-theme="white"] {
  --bg:           #010101;
  --bg-soft:      #020202;
  --bg-1:         #010101;
  --bg-2:         #030303;
  --bg-3:         #050505;
  --panel:        rgba(15,15,15,0.82);
  --panel-strong: rgba(18,18,18,0.90);
  --panel-border: rgba(220,220,220,0.38);
  --text:         #e0e0e0;
  --muted:        #909090;
  --muted-2:      #606060;
  --gold:         #e0e0e0;
  --gold-2:       #b0b0b0;
  --gold-soft:    rgba(220,220,220,0.15);
  --gold-softer:  rgba(220,220,220,0.07);
  --input-bg:     rgba(220,220,220,0.04);
  --input-border: rgba(220,220,220,0.28);
  --button:       #e0e0e0;
  --button-text:  #010101;
  --cat-event:    #e0e0e0;
  --cat-personal: #909090;
  --glow:        0 0 8px rgba(220,220,220,0.80);
  --glow-strong: 0 0 14px rgba(220,220,220,1.0), 0 0 30px rgba(220,220,220,0.50);
  --card-glow:   0 0 20px rgba(220,220,220,0.12);

  --acc-rgb:    200,200,200;
  --dim-rgb:    138,138,138;
  --screen-rgb: 15,15,15;
}
html[data-theme="white"] .solar-bg { filter: saturate(0) brightness(0.65); }
html[data-theme="white"] .orbit { border-color: rgba(220,220,220,0.20); }

/* ==========================================================================
   VEILFORM — 1950S BROADCAST THEME
   Midcentury American press & broadcast · Warm newsprint · Silver screen
   ========================================================================== */

@keyframes vf-onair-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(191,64,32,0.30), 0 0 0 4px rgba(191,64,32,0.12); }
  50%       { box-shadow: 0 0 0 3px rgba(191,64,32,0.48), 0 0 0 7px rgba(191,64,32,0.20); }
}

html[data-theme="corporate"] {
  --bg:           #e2ddd3;
  --bg-soft:      #ebe6dc;
  --bg-1:         #d8d3c9;
  --bg-2:         #cec9be;
  --bg-3:         #c3beb3;
  --panel:        #f5f1e6;
  --panel-strong: #faf7f0;
  --panel-border: #1c1916;
  --text:         #1c1916;
  --muted:        #56504a;
  --muted-2:      #8a847c;
  --gold:         #bf4020;
  --gold-2:       #9a3215;
  --gold-soft:    rgba(191,64,32,0.14);
  --gold-softer:  rgba(191,64,32,0.07);
  --input-bg:     #faf7f0;
  --input-border: #1c1916;
  --button:       #1c1916;
  --button-text:  #f5f1e6;
  --ok:           #2a6c38;
  --warn:         #a85e18;
  --danger:       #9e1a1a;
  --success:      #2a6c38;
  --cat-event:    #bf4020;
  --cat-meeting:  #1c1916;
  --cat-release:  #2a6c38;
  --cat-holiday:  #000000;
  --cat-personal: #56504a;
  --glow:        none;
  --glow-strong: none;
  --card-glow:   none;
  --font: 'Oswald', 'Arial Narrow', 'Helvetica Neue Condensed', Impact, sans-serif;
  --font-display: 'Oswald', 'Arial Narrow', 'Helvetica Neue Condensed', Impact, sans-serif;
  --radius: 0px;
  color-scheme: light;
}

html[data-theme="corporate"],
html[data-theme="corporate"] body {
  background: #e2ddd3;
  color: #1c1916;
}

html[data-theme="corporate"] body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      #f8f8f8 0 11.1%, #d8d8d8 11.1% 22.2%, #b0b0b0 22.2% 33.3%,
      #888888 33.3% 44.4%, #585858 44.4% 55.5%, #363636 55.5% 66.6%,
      #181818 66.6% 77.7%, #080808 77.7% 88.8%, #000000 88.8%
    ) bottom / 100% 20px no-repeat,
    repeating-linear-gradient(180deg, #1c1916 0 11px, #e2ddd3 11px 22px) left / 16px 100% no-repeat,
    repeating-linear-gradient(180deg, #1c1916 0 11px, #e2ddd3 11px 22px) right / 16px 100% no-repeat,
    radial-gradient(circle at 34px 34px, transparent 0 13px, rgba(28,25,22,0.42) 13px 15px, transparent 15px),
    radial-gradient(circle at calc(100% - 34px) 34px, transparent 0 13px, rgba(28,25,22,0.42) 13px 15px, transparent 15px),
    radial-gradient(circle at 34px calc(100% - 34px), transparent 0 13px, rgba(28,25,22,0.42) 13px 15px, transparent 15px),
    radial-gradient(circle at calc(100% - 34px) calc(100% - 34px), transparent 0 13px, rgba(28,25,22,0.42) 13px 15px, transparent 15px),
    radial-gradient(circle at 50% 50%,
      transparent 0 54px, rgba(28,25,22,0.25) 54px 56px,
      transparent 56px 102px, rgba(28,25,22,0.14) 102px 104px,
      transparent 104px 160px, rgba(28,25,22,0.08) 160px 162px, transparent 162px),
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(28,25,22,0.09) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(180deg, transparent calc(50% - 0.5px), rgba(28,25,22,0.09) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    #e2ddd3;
}

html[data-theme="corporate"] body::after { display: none; }
html[data-theme="corporate"] #sf { display: none !important; }
html[data-theme="corporate"] #crt-overlay { display: none !important; }

html[data-theme="corporate"] .topbar,
html[data-theme="corporate"] #toolbar,
html[data-theme="corporate"] .tab-nav {
  background: #1c1916;
  border-bottom: 3px solid #bf4020;
  box-shadow: 0 4px 18px rgba(28,25,22,0.34);
  color: #f5f1e6;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="corporate"] .logo,
html[data-theme="corporate"] .tb-logo {
  font-family: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  font-weight: 600;
  color: #f5f1e6;
  letter-spacing: 0.18em;
  text-shadow: none;
  -webkit-text-fill-color: #f5f1e6;
}
html[data-theme="corporate"] .logo::before,
html[data-theme="corporate"] .tb-logo::before {
  content: '';
  display: inline-block;
  width: 10px; height: 10px;
  margin-right: 10px;
  border-radius: 50%;
  background: #bf4020;
  vertical-align: 1px;
  border: 0;
  box-shadow: 0 0 0 2px rgba(191,64,32,0.30), 0 0 0 4px rgba(191,64,32,0.12);
  animation: vf-onair-pulse 2.4s ease-in-out infinite;
}

html[data-theme="corporate"] .clock,
html[data-theme="corporate"] #liveClock {
  color: #f5f1e6;
  border-color: rgba(245,241,230,0.22);
  background: rgba(245,241,230,0.06);
  font-family: 'Oswald', 'Arial Narrow', sans-serif;
  letter-spacing: 0.10em;
}
html[data-theme="corporate"] .user-pill {
  background: rgba(245,241,230,0.06);
  border-color: rgba(245,241,230,0.22);
  color: rgba(245,241,230,0.70);
  font-family: 'Oswald', sans-serif;
}
html[data-theme="corporate"] .user-pill:hover { border-color: rgba(245,241,230,0.55); color: #f5f1e6; }

html[data-theme="corporate"] .weather-widget {
  background: rgba(245,241,230,0.06);
  border-color: rgba(245,241,230,0.22);
  color: #f5f1e6;
  font-family: 'Oswald', sans-serif;
}
html[data-theme="corporate"] .weather-widget .material-symbols-outlined { color: #bf4020; text-shadow: none; }
html[data-theme="corporate"] .weather-temp { text-shadow: none; color: #f5f1e6; }
html[data-theme="corporate"] .weather-city { color: rgba(245,241,230,0.55); }

html[data-theme="corporate"] .ht-widget {
  background: rgba(245,241,230,0.06);
  border-color: rgba(245,241,230,0.22);
  color: #f5f1e6;
  font-family: 'Oswald', sans-serif;
}
html[data-theme="corporate"] .ht-elapsed { color: #f5f1e6; text-shadow: none; }
html[data-theme="corporate"] .ht-btn.ht-idle { color: rgba(245,241,230,0.55); border-color: rgba(245,241,230,0.20); background: transparent; }
html[data-theme="corporate"] .ht-btn.ht-idle:hover { background: rgba(245,241,230,0.12); color: #f5f1e6; border-color: rgba(245,241,230,0.50); text-shadow: none; box-shadow: none; }
html[data-theme="corporate"] .ht-btn.ht-running { color: #bf4020; border-color: #bf4020; text-shadow: none; }
html[data-theme="corporate"] .ht-btn.ht-running:hover { background: rgba(191,64,32,0.12); box-shadow: none; }

html[data-theme="corporate"] .tab-btn { font-family: 'Oswald', 'Arial Narrow', sans-serif; font-weight: 400; letter-spacing: 0.12em; color: rgba(245,241,230,0.50); border-bottom-color: transparent; }
html[data-theme="corporate"] .tab-btn:hover  { color: #f5f1e6; }
html[data-theme="corporate"] .tab-btn.active { color: #f5f1e6; border-bottom-color: #bf4020; }

html[data-theme="corporate"] .user-dropdown {
  background: #f5f1e6;
  border: 2px solid #1c1916;
  border-radius: 0;
  box-shadow: 5px 5px 0 rgba(28,25,22,0.22);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html[data-theme="corporate"] .user-dropdown a,
html[data-theme="corporate"] .user-dropdown button { color: #56504a; font-family: 'Oswald', sans-serif; font-size: 15px; letter-spacing: 0.10em; text-shadow: none; }
html[data-theme="corporate"] .user-dropdown a:hover,
html[data-theme="corporate"] .user-dropdown button:hover { background: #1c1916; color: #f5f1e6; text-shadow: none; }

html[data-theme="corporate"] .avatar { background: #bf4020; border: 1px solid rgba(245,241,230,0.45); border-radius: 0; color: #f5f1e6; box-shadow: none; }

html[data-theme="corporate"] .panel,
html[data-theme="corporate"] .card,
html[data-theme="corporate"] .ov-card,
html[data-theme="corporate"] .activity-item,
html[data-theme="corporate"] .theme-card,
html[data-theme="corporate"] .sett-row,
html[data-theme="corporate"] .login-card,
html[data-theme="corporate"] .app-dialog,
html[data-theme="corporate"] .app-list-item {
  background: #f5f1e6;
  border: 2px solid #1c1916;
  border-radius: 0;
  color: #1c1916;
  box-shadow: 4px 4px 0 rgba(28,25,22,0.20);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  position: relative;
  overflow: hidden;
}
html[data-theme="corporate"] .card:hover,
html[data-theme="corporate"] .ov-card:hover,
html[data-theme="corporate"] .theme-card:hover,
html[data-theme="corporate"] .theme-card.active { border-color: #bf4020; box-shadow: 5px 5px 0 #bf4020; transform: translate(-1px, -1px); }

html[data-theme="corporate"] .card::before,
html[data-theme="corporate"] .ov-card::before,
html[data-theme="corporate"] .theme-card::before,
html[data-theme="corporate"] .panel::before,
html[data-theme="corporate"] .card::after,
html[data-theme="corporate"] .ov-card::after,
html[data-theme="corporate"] .theme-card::after,
html[data-theme="corporate"] .panel::after { display: none; }

html[data-theme="corporate"] .panel h2 { color: #1c1916; font-family: 'Oswald', sans-serif; font-weight: 600; letter-spacing: 0.14em; }

html[data-theme="corporate"] .icon,
html[data-theme="corporate"] .app-list-icon,
html[data-theme="corporate"] .empty-add { background: #e2ddd3; border: 2px solid #1c1916; border-radius: 0; box-shadow: none; }
html[data-theme="corporate"] .icon svg,
html[data-theme="corporate"] .ov-head svg,
html[data-theme="corporate"] .app-list-icon svg { stroke: #1c1916; }

html[data-theme="corporate"] .btn-link,
html[data-theme="corporate"] .btn-ghost,
html[data-theme="corporate"] .topbar-btn,
html[data-theme="corporate"] .logout-btn,
html[data-theme="corporate"] .chip,
html[data-theme="corporate"] .submit,
html[data-theme="corporate"] .sett-toggle,
html[data-theme="corporate"] .ht-btn,
html[data-theme="corporate"] .wx-geo-btn,
html[data-theme="corporate"] .app-modal-close {
  background: #f5f1e6; border: 2px solid #1c1916; border-radius: 0; color: #1c1916;
  text-shadow: none; box-shadow: 3px 3px 0 rgba(28,25,22,0.20);
  font-family: 'Oswald', 'Arial Narrow', sans-serif; font-weight: 400; letter-spacing: 0.12em;
}
html[data-theme="corporate"] .btn-link:hover,
html[data-theme="corporate"] .btn-ghost:hover,
html[data-theme="corporate"] .topbar-btn:hover,
html[data-theme="corporate"] .logout-btn:hover,
html[data-theme="corporate"] .chip:hover,
html[data-theme="corporate"] .chip.active,
html[data-theme="corporate"] .submit:hover,
html[data-theme="corporate"] .sett-toggle:hover,
html[data-theme="corporate"] .ht-btn:hover,
html[data-theme="corporate"] .wx-geo-btn:hover,
html[data-theme="corporate"] .app-modal-close:hover { background: #1c1916; border-color: #1c1916; color: #f5f1e6; text-shadow: none; box-shadow: none; }

html[data-theme="corporate"] input[type="text"],
html[data-theme="corporate"] input[type="password"],
html[data-theme="corporate"] input[type="email"],
html[data-theme="corporate"] input[type="number"],
html[data-theme="corporate"] input[type="date"],
html[data-theme="corporate"] input[type="time"],
html[data-theme="corporate"] input[type="search"],
html[data-theme="corporate"] textarea,
html[data-theme="corporate"] select {
  background: #faf7f0; border: 2px solid #1c1916; border-radius: 0; color: #1c1916;
  box-shadow: none; font-family: 'Oswald', 'Arial Narrow', sans-serif;
}
html[data-theme="corporate"] input:focus,
html[data-theme="corporate"] textarea:focus,
html[data-theme="corporate"] select:focus { border-color: #bf4020; box-shadow: 3px 3px 0 #bf4020; }
html[data-theme="corporate"] input::placeholder,
html[data-theme="corporate"] textarea::placeholder { color: #8a847c; }

html[data-theme="corporate"] .vf-cmdk-input { background: #faf7f0; border: 2px solid #1c1916; border-radius: 0; color: #1c1916; font-family: 'Oswald', sans-serif; box-shadow: none; }
html[data-theme="corporate"] .vf-cmdk-input:focus { border-color: #bf4020; box-shadow: 3px 3px 0 #bf4020; }

html[data-theme="corporate"] .vf-cmdk-overlay,
html[data-theme="corporate"] .app-modal { background: rgba(28,25,22,0.55); backdrop-filter: none; -webkit-backdrop-filter: none; }
html[data-theme="corporate"] .vf-cmdk {
  background: #f5f1e6; border: 2px solid #1c1916; border-radius: 0;
  box-shadow: 8px 8px 0 rgba(28,25,22,0.24); backdrop-filter: none; -webkit-backdrop-filter: none;
  color: #1c1916; font-family: 'Oswald', sans-serif;
}
html[data-theme="corporate"] .vf-cmdk-head { border-bottom: 1px solid rgba(28,25,22,0.22); background: #e8e4da; }
html[data-theme="corporate"] .vf-cmdk-item { border: 1px solid rgba(28,25,22,0.12); border-radius: 0; color: #1c1916; background: transparent; }
html[data-theme="corporate"] .vf-cmdk-item:hover,
html[data-theme="corporate"] .vf-cmdk-item.active { background: #1c1916; border-color: #1c1916; color: #f5f1e6; }
html[data-theme="corporate"] .vf-cmdk-title { color: #1c1916; font-family: 'Oswald', sans-serif; }
html[data-theme="corporate"] .vf-cmdk-meta  { color: #56504a; border-color: rgba(28,25,22,0.18); border-radius: 0; font-family: 'Oswald', sans-serif; }
html[data-theme="corporate"] .vf-cmdk-empty { color: #8a847c; font-family: 'Oswald', sans-serif; }
html[data-theme="corporate"] .vf-cmdk-foot  { border-top-color: rgba(28,25,22,0.18); color: #8a847c; font-family: 'Oswald', sans-serif; }

html[data-theme="corporate"] .weather-dropdown,
html[data-theme="corporate"] .ht-task-dropdown {
  background: #f5f1e6; border: 2px solid #1c1916; border-radius: 0;
  box-shadow: 5px 5px 0 rgba(28,25,22,0.22); backdrop-filter: none; -webkit-backdrop-filter: none;
}
html[data-theme="corporate"] .vf-cmdk-item:hover,
html[data-theme="corporate"] .vf-cmdk-item.active,
html[data-theme="corporate"] .user-dropdown a:hover,
html[data-theme="corporate"] .user-dropdown button:hover,
html[data-theme="corporate"] .ht-td-item:hover,
html[data-theme="corporate"] .ht-td-item.active { background: #1c1916; color: #f5f1e6; text-shadow: none; border-color: #1c1916; }

html[data-theme="corporate"] .ht-td-header { color: #8a847c; }
html[data-theme="corporate"] .ht-td-empty  { color: #8a847c; }
html[data-theme="corporate"] .ht-td-proj   { color: #56504a; }
html[data-theme="corporate"] .ht-td-name   { color: #1c1916; }
html[data-theme="corporate"] .ht-td-item   { color: #1c1916; }

html[data-theme="corporate"] .wx-desc     { color: #8a847c; }
html[data-theme="corporate"] .wx-loc      { color: #56504a; }
html[data-theme="corporate"] .wx-sep      { border-top-color: rgba(28,25,22,0.18); }
html[data-theme="corporate"] .wx-section  { color: #8a847c; }
html[data-theme="corporate"] .wx-row-key  { color: #56504a; }
html[data-theme="corporate"] .wx-row-val  { color: #1c1916; }
html[data-theme="corporate"] .wx-big-temp { color: #1c1916; text-shadow: none; }
html[data-theme="corporate"] .wx-big-icon { color: #bf4020; text-shadow: none; font-size: 36px; }
html[data-theme="corporate"] .wx-settings-link       { color: #8a847c; }
html[data-theme="corporate"] .wx-settings-link:hover  { color: #1c1916; }
html[data-theme="corporate"] .wx-geo-btn {
  background: #e8e4da; border: 2px solid #1c1916; color: #56504a;
  text-shadow: none; box-shadow: 2px 2px 0 rgba(28,25,22,0.16); font-family: 'Oswald', sans-serif;
}
html[data-theme="corporate"] .wx-geo-btn:hover { background: #1c1916; color: #f5f1e6; border-color: #1c1916; text-shadow: none; box-shadow: none; }

html[data-theme="corporate"] .dot { background: #bf4020; border-radius: 0; box-shadow: none; }
html[data-theme="corporate"] .live-dot { background: #bf4020; border-radius: 50%; box-shadow: 0 0 0 2px rgba(191,64,32,0.24); }
html[data-theme="corporate"] .ht-td-dot { border-radius: 50%; }

html[data-theme="corporate"] .badge.core    { background: #1c1916; color: #f5f1e6; border: 0; border-radius: 0; }
html[data-theme="corporate"] .badge.wellness { background: #e2ddd3; color: #56504a; border: 1px solid rgba(28,25,22,0.32); border-radius: 0; }
html[data-theme="corporate"] .ov-badge      { background: #e2ddd3; border: 1px solid rgba(28,25,22,0.24); color: #1c1916; border-radius: 0; }

html[data-theme="corporate"] .activity-item { background: #eeeae0; border-color: rgba(28,25,22,0.32); }
html[data-theme="corporate"] .activity-item strong { color: #1c1916; }
html[data-theme="corporate"] .activity-item span   { color: #56504a; }

html[data-theme="corporate"] .ov-tracker-time,
html[data-theme="corporate"] .ov-today-val,
html[data-theme="corporate"] .active-badge { color: #bf4020; text-shadow: none; }
html[data-theme="corporate"] .ov-empty { color: #8a847c; }
html[data-theme="corporate"] .ov-more  { color: #8a847c; }

html[data-theme="corporate"] h1,
html[data-theme="corporate"] h2,
html[data-theme="corporate"] h3,
html[data-theme="corporate"] .theme-name,
html[data-theme="corporate"] .section-label,
html[data-theme="corporate"] .page-heading { font-family: 'Oswald', 'Arial Narrow', sans-serif; font-weight: 600; letter-spacing: 0.14em; text-shadow: none; color: #1c1916; }
html[data-theme="corporate"] .page-sub,
html[data-theme="corporate"] .theme-desc { color: #56504a; font-family: 'Oswald', sans-serif; font-weight: 300; letter-spacing: 0.04em; }

html[data-theme="corporate"] .login-card::before { display: none; }
html[data-theme="corporate"] h1 { color: #1c1916; }
html[data-theme="corporate"] .title-accent { background: none; -webkit-background-clip: unset; background-clip: unset; -webkit-text-fill-color: #bf4020; color: #bf4020; text-shadow: none; }
html[data-theme="corporate"] .card-top p { color: #56504a; }

html[data-theme="corporate"] .password-toggle { background: #e8e4da; border: 2px solid #1c1916; color: #1c1916; text-shadow: none; border-radius: 0; font-family: 'Oswald', sans-serif; letter-spacing: 0.10em; }
html[data-theme="corporate"] .password-toggle:hover { background: #1c1916; color: #f5f1e6; }

html[data-theme="corporate"] .check-box { border: 2px solid #1c1916; background: #faf7f0; border-radius: 0; box-shadow: none; }
html[data-theme="corporate"] .check-box::after { background: #bf4020; border-radius: 0; box-shadow: none; }
html[data-theme="corporate"] .check input:checked + .check-box { border-color: #bf4020; background: rgba(191,64,32,0.08); box-shadow: none; }

html[data-theme="corporate"] #boardTitleInput { color: #f5f1e6 !important; background: transparent !important; border: none !important; box-shadow: none !important; font-family: 'Oswald', sans-serif; letter-spacing: 0.14em; }
html[data-theme="corporate"] #boardTitleInput:hover,
html[data-theme="corporate"] #boardTitleInput:focus { background: rgba(245,241,230,0.08) !important; border: none !important; box-shadow: none !important; }

html[data-theme="corporate"] .status        { color: #56504a; }
html[data-theme="corporate"] .status.error  { color: #9e1a1a; text-shadow: none; }
html[data-theme="corporate"] .status.success { color: #2a6c38; text-shadow: none; }

html[data-theme="corporate"] .solar-bg { filter: sepia(0.35) contrast(1.15) brightness(0.95); }
html[data-theme="corporate"] .orbit { border-color: rgba(28,25,22,0.22); }

html[data-theme="corporate"] ::-webkit-scrollbar-track { background: #e2ddd3; }
html[data-theme="corporate"] ::-webkit-scrollbar-thumb { background: #8a847c; border-radius: 0; }
html[data-theme="corporate"] ::-webkit-scrollbar-thumb:hover { background: #56504a; }

html[data-theme="corporate"] .pomo-panel {
  background: #f5f1e6; border: 2px solid #1c1916; border-radius: 0;
  box-shadow: 5px 5px 0 rgba(28,25,22,0.22);
}
html[data-theme="corporate"] .pomo-ph-lbl { color: #8a847c; }
html[data-theme="corporate"] .pomo-cd { color: #1c1916; text-shadow: none; }
html[data-theme="corporate"] .pomo-btn {
  background: #e8e4da; border: 2px solid #1c1916; border-radius: 0; color: #1c1916;
  box-shadow: 2px 2px 0 rgba(28,25,22,0.16);
}
html[data-theme="corporate"] .pomo-btn:hover { background: #1c1916; color: #f5f1e6; border-color: #1c1916; box-shadow: none; }
html[data-theme="corporate"] .pomo-dot { background: #e2ddd3; border-color: rgba(28,25,22,0.3); }
html[data-theme="corporate"] .pomo-dot.on { background: #bf4020; border-color: #bf4020; box-shadow: none; }
html[data-theme="corporate"] .pomo-dot-info { color: #8a847c; }
html[data-theme="corporate"] .pomo-ph-btn {
  color: #8a847c; border-color: rgba(28,25,22,0.22); border-radius: 0;
  font-family: 'Oswald', 'Arial Narrow', sans-serif;
}
html[data-theme="corporate"] .pomo-ph-btn:hover { border-color: #1c1916; color: #1c1916; }
html[data-theme="corporate"] .pomo-ph-btn.on { border-color: #bf4020; color: #bf4020; background: rgba(191,64,32,0.07); }
html[data-theme="corporate"] .pomo-clear { color: #8a847c; opacity: 1; font-family: 'Oswald', 'Arial Narrow', sans-serif; }
html[data-theme="corporate"] .pomo-clear:hover { color: #1c1916; }
html[data-theme="corporate"] .clock.pomo-run { color: #bf4020; text-shadow: none; }
html[data-theme="corporate"] .clock.pomo-pause { color: rgba(245,241,230,0.45); text-shadow: none; }

/* ==========================================================================
   VEILFORM — AMBER V2 THEME
   Industrial sci-fi spaceship terminal · Alien franchise aesthetic
   Utilitarian, amber-lit, worn, functional, alive.
   ========================================================================== */

@keyframes vf-amber2-led {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 5px rgba(220,138,28,0.95), 0 0 12px rgba(220,138,28,0.50), 0 0 24px rgba(220,138,28,0.22);
  }
  45% {
    opacity: 0.72;
    box-shadow: 0 0 3px rgba(220,138,28,0.65), 0 0 7px rgba(220,138,28,0.32), 0 0 15px rgba(220,138,28,0.12);
  }
}

@keyframes vf-amber2-flicker {
  0%, 100% { opacity: 1; }
  92%       { opacity: 1; }
  93%       { opacity: 0.85; }
  94%       { opacity: 1; }
  97%       { opacity: 0.90; }
  98%       { opacity: 1; }
}

html:not([data-theme]) {
  --bg:           #070500;
  --bg-soft:      #0c0901;
  --bg-1:         #090700;
  --bg-2:         #110e02;
  --bg-3:         #191404;

  --panel:        rgba(18,13,2,0.94);
  --panel-strong: rgba(24,18,3,0.97);
  --panel-border: rgba(255,208,60,0.42);

  --text:         #ffd060;
  --muted:        #d09020;
  --muted-2:      #a06c10;

  --gold:         #ffd060;
  --gold-2:       #cc9a20;
  --gold-soft:    rgba(255,208,60,0.14);
  --gold-softer:  rgba(255,208,60,0.06);

  --input-bg:     rgba(255,208,60,0.05);
  --input-border: rgba(255,208,60,0.30);

  --button:       #ffd060;
  --button-text:  #070500;

  --ok:           #2c7a30;
  --warn:         #b46a10;
  --danger:       #b01a10;
  --success:      #2c7a30;

  --cat-event:    #ffd060;
  --cat-meeting:  #ff9a20;
  --cat-release:  #2c7a30;
  --cat-holiday:  #b01a10;
  --cat-personal: #d09020;

  --glow:        0 0 8px rgba(255,208,60,0.70);
  --glow-strong: 0 0 12px rgba(255,208,60,0.95), 0 0 30px rgba(255,208,60,0.45);
  --card-glow:   0 0 0 1px rgba(255,208,60,0.16), 0 6px 24px rgba(0,0,0,0.75), inset 0 1px 0 rgba(255,208,60,0.06);

  --font:   'Saira Semi Condensed', 'VT323', sans-serif;
  --radius: 0px;
}

/* ── Body: deep space, near-black, warm undertone ───────────────────── */
html:not([data-theme="corporate"]),
html:not([data-theme="corporate"]) body {
  background: var(--bg);
}

/* Phosphor screen glow — warm radiance bleeds from center */
html:not([data-theme="corporate"]) body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 95% 70% at 50% 42%,
      rgba(var(--dim-rgb),0.048) 0%,
      rgba(var(--dim-rgb),0.022)   45%,
      transparent            72%);
}

/* Scanlines + screen-edge vignette — stronger, more immersive than legacy */
html:not([data-theme="corporate"]) body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background:
    radial-gradient(ellipse 150% 120% at 50% 50%,
      transparent 38%,
      rgba(0,0,0,0.44) 100%),
    repeating-linear-gradient(
      0deg,
      transparent      0px,
      transparent      2px,
      rgba(0,0,0,0.20) 2px,
      rgba(0,0,0,0.20) 4px
    );
  animation: vf-amber2-flicker 14s steps(1) infinite;
}

/* Roll-bar — a faint brightness band drifting up the screen, the beat
   between refresh and mains hum. The single device that reads as "live tube". */
html:not([data-theme="corporate"])::before {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  top: -32vh;
  height: 32vh;
  z-index: 9997;
  pointer-events: none;
  mix-blend-mode: screen;
  background: linear-gradient(
    to bottom,
    transparent              0%,
    rgba(var(--acc-rgb),0.025)  38%,
    rgba(var(--acc-rgb),0.06)   50%,
    rgba(var(--acc-rgb),0.025)  62%,
    transparent             100%
  );
  animation: vf-amber2-rollbar 13s linear infinite;
}

@keyframes vf-amber2-rollbar {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, 132vh, 0); }
}

/* ── Topbar ──────────────────────────────────────────────────────────── */
html:not([data-theme="corporate"]) .topbar,
html:not([data-theme="corporate"]) #toolbar,
html:not([data-theme="corporate"]) .tab-nav {
  background: rgba(var(--screen-rgb),0.98);
  border-bottom: 1px solid rgba(var(--dim-rgb),0.44);
  box-shadow: none;
}

/* ── Logo: amber system status LED ─────────────────────────────────── */
html:not([data-theme="corporate"]) .logo,
html:not([data-theme="corporate"]) .tb-logo {
  color: var(--text);
  text-shadow: var(--glow);
  -webkit-text-fill-color: var(--text);
  letter-spacing: 0.16em;
}

html:not([data-theme="corporate"]) .logo::before,
html:not([data-theme="corporate"]) .tb-logo::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: rgb(var(--acc-rgb));
  vertical-align: 1px;
  border: 0;
  animation: vf-amber2-led 3.4s ease-in-out infinite;
}

/* ── Topbar widgets ──────────────────────────────────────────────────── */
html:not([data-theme="corporate"]) .clock,
html:not([data-theme="corporate"]) #liveClock {
  background: rgba(var(--screen-rgb),0.88);
  border: 1px solid rgba(var(--dim-rgb),0.32);
  box-shadow: none;
}

html:not([data-theme="corporate"]) .weather-widget {
  background: rgba(var(--screen-rgb),0.88);
  border: 1px solid rgba(var(--dim-rgb),0.32);
  box-shadow: none;
}

html:not([data-theme="corporate"]) .ht-widget {
  background: rgba(var(--screen-rgb),0.88);
  border: 1px solid rgba(var(--dim-rgb),0.32);
  box-shadow: none;
}

html:not([data-theme="corporate"]) .user-pill {
  background: rgba(var(--screen-rgb),0.88);
  border: 1px solid rgba(var(--dim-rgb),0.32);
  box-shadow: none;
}
html:not([data-theme="corporate"]) .user-pill:hover {
  border-color: rgba(var(--acc-rgb),0.60);
  background: rgba(var(--screen-rgb),0.90);
  box-shadow: none;
}

/* ── Avatar ──────────────────────────────────────────────────────────── */
html:not([data-theme="corporate"]) .avatar {
  background: rgba(var(--acc-rgb),0.90);
  color: var(--bg);
  box-shadow: none;
  font-weight: 800;
}

/* ── User dropdown ───────────────────────────────────────────────────── */
html:not([data-theme="corporate"]) .user-dropdown {
  background: rgba(var(--screen-rgb),0.99);
  border: 1px solid rgba(var(--dim-rgb),0.40);
  box-shadow: 0 12px 32px rgba(0,0,0,0.70);
}
html:not([data-theme="corporate"]) .user-dropdown a,
html:not([data-theme="corporate"]) .user-dropdown button { color: var(--muted); }
html:not([data-theme="corporate"]) .user-dropdown a:hover,
html:not([data-theme="corporate"]) .user-dropdown button:hover {
  background: rgba(var(--acc-rgb),0.10);
  color: var(--text);
  text-shadow: var(--glow);
}

/* ── Panels ──────────────────────────────────────────────────────────── */
html:not([data-theme="corporate"]) .panel {
  background: rgba(var(--screen-rgb),0.94);
  border: 1px solid rgba(var(--dim-rgb),0.32);
  box-shadow: none;
}
html:not([data-theme="corporate"]) .panel h2 {
  color: var(--muted);
  letter-spacing: 0.20em;
}

/* ── Cards: system readout terminals with corner registration marks ──── */
html:not([data-theme="corporate"]) .card,
html:not([data-theme="corporate"]) .ov-card {
  position: relative;
  background: rgba(var(--screen-rgb),0.92);
  border: 1px solid rgba(var(--dim-rgb),0.28);
  box-shadow: none;
}
html:not([data-theme="corporate"]) .card:hover,
html:not([data-theme="corporate"]) .ov-card:hover {
  border-color: rgba(var(--acc-rgb),0.55);
  box-shadow: 0 0 14px rgba(var(--dim-rgb),0.12);
  transform: none;
}

/* Corner registration brackets — system readout marker UI */
html:not([data-theme="corporate"]) .card::before,
html:not([data-theme="corporate"]) .ov-card::before,
html:not([data-theme="corporate"]) .panel::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    /* TL — horizontal */
    linear-gradient(to right, rgba(var(--dim-rgb),0.52), rgba(var(--dim-rgb),0.52)) top left    / 14px 1px no-repeat,
    /* TL — vertical */
    linear-gradient(to bottom, rgba(var(--dim-rgb),0.52), rgba(var(--dim-rgb),0.52)) top left    / 1px 14px no-repeat,
    /* TR — horizontal */
    linear-gradient(to right, rgba(var(--dim-rgb),0.52), rgba(var(--dim-rgb),0.52)) top right   / 14px 1px no-repeat,
    /* TR — vertical */
    linear-gradient(to bottom, rgba(var(--dim-rgb),0.52), rgba(var(--dim-rgb),0.52)) top right   / 1px 14px no-repeat,
    /* BL — horizontal */
    linear-gradient(to right, rgba(var(--dim-rgb),0.52), rgba(var(--dim-rgb),0.52)) bottom left  / 14px 1px no-repeat,
    /* BL — vertical */
    linear-gradient(to top, rgba(var(--dim-rgb),0.52), rgba(var(--dim-rgb),0.52)) bottom left    / 1px 14px no-repeat,
    /* BR — horizontal */
    linear-gradient(to right, rgba(var(--dim-rgb),0.52), rgba(var(--dim-rgb),0.52)) bottom right / 14px 1px no-repeat,
    /* BR — vertical */
    linear-gradient(to top, rgba(var(--dim-rgb),0.52), rgba(var(--dim-rgb),0.52)) bottom right   / 1px 14px no-repeat;
}
html:not([data-theme="corporate"]) .card:hover::before,
html:not([data-theme="corporate"]) .ov-card:hover::before {
  background:
    linear-gradient(to right, rgba(var(--acc-rgb),0.75), rgba(var(--acc-rgb),0.75)) top left    / 14px 1px no-repeat,
    linear-gradient(to bottom, rgba(var(--acc-rgb),0.75), rgba(var(--acc-rgb),0.75)) top left    / 1px 14px no-repeat,
    linear-gradient(to right, rgba(var(--acc-rgb),0.75), rgba(var(--acc-rgb),0.75)) top right   / 14px 1px no-repeat,
    linear-gradient(to bottom, rgba(var(--acc-rgb),0.75), rgba(var(--acc-rgb),0.75)) top right   / 1px 14px no-repeat,
    linear-gradient(to right, rgba(var(--acc-rgb),0.75), rgba(var(--acc-rgb),0.75)) bottom left  / 14px 1px no-repeat,
    linear-gradient(to top, rgba(var(--acc-rgb),0.75), rgba(var(--acc-rgb),0.75)) bottom left    / 1px 14px no-repeat,
    linear-gradient(to right, rgba(var(--acc-rgb),0.75), rgba(var(--acc-rgb),0.75)) bottom right / 14px 1px no-repeat,
    linear-gradient(to top, rgba(var(--acc-rgb),0.75), rgba(var(--acc-rgb),0.75)) bottom right   / 1px 14px no-repeat;
}

/* ── Activity items ──────────────────────────────────────────────────── */
html:not([data-theme="corporate"]) .activity-item {
  background: rgba(var(--screen-rgb),0.88);
  border: 1px solid rgba(var(--dim-rgb),0.22);
  box-shadow: none;
}

/* ── Dashboard icons ─────────────────────────────────────────────────── */
html:not([data-theme="corporate"]) .icon {
  background: rgba(var(--screen-rgb),0.90);
  border: 1px solid rgba(var(--dim-rgb),0.28);
  box-shadow: none;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
html:not([data-theme="corporate"]) .btn-link,
html:not([data-theme="corporate"]) .btn-ghost,
html:not([data-theme="corporate"]) .topbar-btn,
html:not([data-theme="corporate"]) .logout-btn {
  background: rgba(var(--screen-rgb),0.85);
  border: 1px solid rgba(var(--dim-rgb),0.38);
  box-shadow: none;
  text-shadow: var(--glow);
}
html:not([data-theme="corporate"]) .btn-link:hover,
html:not([data-theme="corporate"]) .btn-ghost:hover,
html:not([data-theme="corporate"]) .topbar-btn:hover,
html:not([data-theme="corporate"]) .logout-btn:hover {
  background: rgba(var(--acc-rgb),0.12);
  border-color: rgba(var(--acc-rgb),0.65);
  box-shadow: none;
  text-shadow: var(--glow-strong);
}

/* ── Submit ──────────────────────────────────────────────────────────── */
html:not([data-theme="corporate"]) .submit {
  background: rgba(var(--screen-rgb),0.90);
  border: 1px solid rgba(var(--acc-rgb),0.55);
  box-shadow: none;
}
html:not([data-theme="corporate"]) .submit:hover {
  background: rgba(var(--acc-rgb),0.12);
  border-color: rgba(var(--acc-rgb),0.82);
  box-shadow: none;
  text-shadow: var(--glow-strong);
  transform: none;
  filter: none;
}

/* ── Chips ───────────────────────────────────────────────────────────── */
html:not([data-theme="corporate"]) .chip {
  background: rgba(var(--screen-rgb),0.80);
  border: 1px solid rgba(var(--dim-rgb),0.30);
  box-shadow: none;
}
html:not([data-theme="corporate"]) .chip:hover,
html:not([data-theme="corporate"]) .chip.active {
  background: rgba(var(--acc-rgb),0.12);
  border-color: rgba(var(--acc-rgb),0.60);
  box-shadow: none;
  text-shadow: var(--glow);
}

/* ── Inputs: command entry fields with left accent bar ───────────────── */
html:not([data-theme="corporate"]) input[type="text"],
html:not([data-theme="corporate"]) input[type="password"],
html:not([data-theme="corporate"]) input[type="email"],
html:not([data-theme="corporate"]) input[type="number"],
html:not([data-theme="corporate"]) input[type="date"],
html:not([data-theme="corporate"]) input[type="time"],
html:not([data-theme="corporate"]) input[type="search"],
html:not([data-theme="corporate"]) textarea,
html:not([data-theme="corporate"]) select {
  background: rgba(var(--acc-rgb),0.03);
  border: 1px solid rgba(var(--dim-rgb),0.30);
  box-shadow: inset 3px 0 0 rgba(var(--dim-rgb),0.22);
}
html:not([data-theme="corporate"]) input:focus,
html:not([data-theme="corporate"]) textarea:focus,
html:not([data-theme="corporate"]) select:focus {
  border-color: rgba(var(--acc-rgb),0.72);
  box-shadow: inset 3px 0 0 rgba(var(--acc-rgb),0.70), var(--glow);
}

/* ── Command palette ─────────────────────────────────────────────────── */
html:not([data-theme="corporate"]) .vf-cmdk-overlay {
  background: rgba(var(--screen-rgb),0.88);
}
html:not([data-theme="corporate"]) .vf-cmdk {
  background: rgba(var(--screen-rgb),0.99);
  border: 1px solid rgba(var(--dim-rgb),0.44);
  box-shadow: 0 20px 60px rgba(0,0,0,0.88);
}
html:not([data-theme="corporate"]) .vf-cmdk-head {
  border-bottom: 1px solid rgba(var(--dim-rgb),0.22);
  background: transparent;
}
html:not([data-theme="corporate"]) .vf-cmdk-input {
  background: rgba(var(--acc-rgb),0.04);
  border: 1px solid rgba(var(--dim-rgb),0.28);
  box-shadow: inset 3px 0 0 rgba(var(--dim-rgb),0.22);
}
html:not([data-theme="corporate"]) .vf-cmdk-input:focus {
  border-color: rgba(var(--acc-rgb),0.65);
  box-shadow: inset 3px 0 0 rgba(var(--acc-rgb),0.65), var(--glow);
}
html:not([data-theme="corporate"]) .vf-cmdk-item {
  background: transparent;
  border: 1px solid rgba(var(--dim-rgb),0.15);
}
html:not([data-theme="corporate"]) .vf-cmdk-item:hover,
html:not([data-theme="corporate"]) .vf-cmdk-item.active {
  background: rgba(var(--acc-rgb),0.10);
  border-color: rgba(var(--dim-rgb),0.42);
}

/* ── Weather dropdown ────────────────────────────────────────────────── */
html:not([data-theme="corporate"]) .weather-dropdown {
  background: rgba(var(--screen-rgb),0.99);
  border: 1px solid rgba(var(--dim-rgb),0.40);
  box-shadow: 0 14px 36px rgba(0,0,0,0.72);
}

/* ── Login card ──────────────────────────────────────────────────────── */
html:not([data-theme="corporate"]) .login-card {
  background: rgba(var(--screen-rgb),0.98);
  border: 1px solid rgba(var(--dim-rgb),0.34);
  box-shadow: 0 24px 64px rgba(0,0,0,0.88);
}

/* ── Dots and status indicators ──────────────────────────────────────── */
html:not([data-theme="corporate"]) .dot {
  box-shadow: 0 0 7px rgba(var(--acc-rgb),0.65);
}
html:not([data-theme="corporate"]) .live-dot {
  background: #2c7a30;
  box-shadow: 0 0 6px rgba(44,122,48,0.70);
}

/* ── Badges: system classification labels ───────────────────────────── */
html:not([data-theme="corporate"]) .badge.core {
  background: rgba(44,122,48,0.11);
  color: #4eb852;
  border-color: rgba(44,122,48,0.28);
  text-shadow: 0 0 7px rgba(44,122,48,0.50);
}
html:not([data-theme="corporate"]) .badge.wellness {
  background: rgba(180,106,16,0.11);
  color: var(--warn);
  border-color: rgba(180,106,16,0.28);
  text-shadow: 0 0 7px rgba(180,106,16,0.45);
}

/* ── Tab nav ─────────────────────────────────────────────────────────── */
html:not([data-theme="corporate"]) .tab-btn.active {
  border-bottom-color: var(--gold);
  text-shadow: var(--glow);
}

/* ── Status messages ─────────────────────────────────────────────────── */
html:not([data-theme="corporate"]) .status.success { text-shadow: 0 0 8px rgba(44,122,48,0.55); }
html:not([data-theme="corporate"]) .status.error   { text-shadow: 0 0 8px rgba(176,26,16,0.55); }

/* ── Solar system: amber phosphor radar tint (amber only; other themes
   define their own .solar-bg/.orbit) ─────────────────────────────────── */
html:not([data-theme]) .solar-bg {
  filter: sepia(0.9) hue-rotate(-12deg) saturate(0.55) brightness(0.52);
}
html:not([data-theme]) .orbit { border-color: rgba(var(--dim-rgb),0.18); }

/* ── Scrollbar: instrument track ─────────────────────────────────────── */
html:not([data-theme="corporate"]) ::-webkit-scrollbar-track { background: rgba(var(--screen-rgb),0.92); }
html:not([data-theme="corporate"]) ::-webkit-scrollbar-thumb {
  background: rgba(var(--dim-rgb),0.26);
  border-radius: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--dim-rgb),0.10);
}
html:not([data-theme="corporate"]) ::-webkit-scrollbar-thumb:hover { background: rgba(var(--acc-rgb),0.44); }
