/* ==========================================================================
   EAL — Executive Navy Glassmorphism, with a light theme.
   Theme is set on <html data-theme="dark|light">. All colours are tokens so
   both themes share one set of component rules.
   ========================================================================== */

:root {
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --emerald: #34d399;
  --amber: #fbbf24;
  --rose: #fb7185;
  --grey: #94a3b8;
  --accent: #5b8cff;
  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent);
}

[data-theme="dark"] {
  --bg-1: #0d0f13;
  --bg-2: #161a22;
  --glass: rgba(255, 255, 255, 0.035);
  --glass-strong: rgba(255, 255, 255, 0.065);
  --glass-border: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --input-bg: rgba(13, 15, 19, 0.7);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --emerald: #34d399;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --accent: #3b82f6;
  --orb-1: rgba(59, 130, 246, 0.10);
  --orb-2: rgba(52, 211, 153, 0.06);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg-1: #eef3fb;
  --bg-2: #d9e5f7;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(30, 58, 138, 0.13);
  --text: #0b1a36;
  --muted: #55657f;
  --input-bg: rgba(255, 255, 255, 0.85);
  --shadow: 0 14px 40px rgba(30, 58, 138, 0.12);
  --emerald: #059669;
  --amber: #b45309;
  --rose: #e11d48;
  --accent: #3c6fa6;
  --orb-1: rgba(59, 130, 246, 0.18);
  --orb-2: rgba(16, 185, 129, 0.10);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 85% -10%, var(--orb-1), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, var(--orb-2), transparent 60%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
  background-attachment: fixed;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -0.01em; }
h1 { font-size: 1.65rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 600; }
h3 { font-size: .95rem; font-weight: 600; }
p { margin: 0 0 .75rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
b, strong, .strong { font-weight: 600; }
small, .small { font-size: .82rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.mt { margin-top: 1rem; }
.mt-s { margin-top: .5rem; }
.grow { flex: 1; min-width: 0; }
.full { grid-column: 1 / -1; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stack > * + * { margin-top: .9rem; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.row-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }

/* ---------- Glass surfaces ---------- */
.glass {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.glass-inner, .card {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}
.card.clickable, button.kpi { cursor: pointer; text-align: left; font: inherit; color: inherit; }

/* ---------- Layout ---------- */
.app-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; gap: 1rem; padding: 1rem; }
.rail { position: sticky; top: 1rem; height: calc(100vh - 2rem); display: flex; flex-direction: column; padding: 1.1rem; gap: 1rem; }
.main { min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
.topbar { display: flex; align-items: center; gap: .75rem; padding: .6rem .8rem; flex-wrap: wrap; }
.content { display: flex; flex-direction: column; gap: 1rem; padding-bottom: 2rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.split-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1rem; align-items: start; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

/* ---------- Brand & rail ---------- */
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  font-weight: 700; letter-spacing: .04em; color: #fff;
  background: linear-gradient(135deg, #3b82f6, #10b981);
}
.brand-mark.big { width: 56px; height: 56px; font-size: 1.1rem; }
.brand-logo { display: block; width: auto; max-width: 100%; }

/* ---------- Work mode (login cards and top-bar switch) ---------- */
.mode-group { border: 0; padding: 0; margin: .25rem 0 0; min-width: 0; }
.mode-group legend { font-size: .82rem; color: var(--muted); padding: 0; margin-bottom: .45rem; }
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.mode-card {
  display: flex; gap: .55rem; align-items: flex-start; cursor: pointer;
  padding: .7rem .8rem; border-radius: var(--radius-sm); border: 1px solid var(--glass-border);
  background: var(--input-bg); color: var(--text);
}
.mode-card input[type=radio] { width: auto; flex: none; margin: .2rem 0 0; accent-color: var(--accent); }
.mode-card span { display: flex; flex-direction: column; gap: .1rem; }
.mode-card small { color: var(--muted); font-size: .76rem; }
.mode-card:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--input-bg)); }
.mode-pill { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.mode-pill .mode-now { font-weight: 600; font-size: .85rem; padding: .3rem .6rem; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border); white-space: nowrap; }
.mode-pill .mode-hours { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.mode-pill form { margin: 0; }
.brand-logo.big { height: 56px; }
.brand-sub { font-size: .78rem; color: var(--muted); line-height: 1.2; white-space: nowrap; }
.brand-sub i { font-style: normal; opacity: .7; }
.nav { display: flex; flex-direction: column; gap: .25rem; margin-top: .5rem; }
.nav-link { color: var(--muted); padding: .55rem .7rem; border-radius: var(--radius-sm); font-weight: 500; }
.nav-link:hover { background: var(--glass); color: var(--text); text-decoration: none; }
.nav-link.active { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: .75rem; }
.me { display: flex; gap: .6rem; align-items: center; }
.me-name { font-weight: 600; font-size: .9rem; }
.me-role { font-size: .75rem; color: var(--muted); }
.avatar {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #06b6d4); color: #fff; font-weight: 700; flex: none;
}
.avatar.sm { width: 28px; height: 28px; font-size: .8rem; }

/* ---------- Top bar ---------- */
.search { flex: 1 1 220px; }
.search input, .filter-bar input, .filter-bar select, select, input, textarea {
  font: inherit; color: var(--text); background: var(--input-bg);
  border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: .5rem .7rem; width: 100%;
}
textarea { resize: vertical; }
.company-switch { display: flex; align-items: center; gap: .4rem; }
.company-switch select { width: auto; }
.clock { font-size: .95rem; padding: .35rem .7rem; border-radius: var(--radius-sm); background: var(--glass); border: 1px solid var(--glass-border); white-space: nowrap; }
.clock small { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--glass-border);
  background: var(--glass); color: var(--text); text-decoration: none; transition: transform .08s ease, background .15s ease;
}
.btn:hover { background: var(--glass-strong); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, #3b82f6, #2563eb); border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.small { padding: .32rem .65rem; font-size: .82rem; }
.btn.icon { padding: .45rem .6rem; }
.btn.icon .sun { display: none; }
[data-theme="light"] .btn.icon .sun { display: inline; }
[data-theme="light"] .btn.icon .moon { display: none; }
[data-theme="dark"] .btn.icon .moon { display: inline; }
[data-theme="dark"] .btn.icon .sun { display: none; }
[data-theme="light"] .btn.icon .moon { display: none; }
[data-theme="dark"] .btn.icon .moon { display: inline; }
.inline-form { display: flex; gap: .5rem; align-items: center; }
.inline-form select { width: auto; min-width: 200px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: .35rem; font-size: .88rem; }
.field > span, .field > legend { color: var(--muted); font-weight: 500; }
.field.inline { flex-direction: row; align-items: center; gap: .5rem; }
.field.inline select { width: auto; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.radio-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.radio { display: inline-flex; gap: .4rem; align-items: center; }
.radio input { width: auto; }
.filter-bar { display: flex; gap: .75rem; padding: .7rem .9rem; flex-wrap: wrap; align-items: center; }
.filter-bar > * { width: auto; }
.filter-bar input[type="search"] { min-width: 220px; }
.pill-link { margin-left: auto; font-size: .85rem; padding: .4rem .8rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); }
.pill-link:hover { text-decoration: none; }

/* ---------- Flash messages ---------- */
.flash-stack { display: flex; flex-direction: column; gap: .5rem; }
.flash { padding: .6rem .9rem; border-radius: var(--radius-sm); border: 1px solid var(--glass-border); background: var(--glass); font-size: .9rem; }
.flash.success, .flash.ok { border-color: color-mix(in srgb, var(--emerald) 50%, transparent); color: var(--emerald); }
.flash.error { border-color: color-mix(in srgb, var(--rose) 55%, transparent); color: var(--rose); }
.flash.warn, .flash.warning { border-color: color-mix(in srgb, var(--amber) 55%, transparent); color: var(--amber); }
.flash.info { color: var(--accent); }

/* ---------- Status tones (BRD: Emerald / Amber / Rose) ---------- */
.tone-ok, .tone-available { --c: var(--emerald); }
.tone-soon, .tone-light, .tone-light_load { --c: var(--amber); }
.tone-overdue, .tone-at_capacity { --c: var(--rose); }
.tone-done, .tone-offline { --c: var(--grey); }
.tone-ok-text { color: var(--emerald); }
.tone-overdue-text { color: var(--rose); }
.countdown[data-tone="ok"] { color: var(--emerald); }
.countdown[data-tone="soon"] { color: var(--amber); }
.countdown[data-tone="overdue"] { color: var(--rose); animation: pulse 1.6s ease-in-out infinite; }
.countdown.done { color: var(--grey); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--grey)); margin-right: .4rem; vertical-align: middle; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ---------- Pills & skills ---------- */
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--glass); border: 1px solid var(--glass-border); color: var(--muted); white-space: nowrap; }
.pill.bench { color: var(--emerald); }
.pill.live { color: var(--emerald); }
.pill.overdue, .priority-high { color: var(--rose); }
.priority-medium { color: var(--amber); }
.priority-low { color: var(--emerald); }
.pill.st-available { color: var(--emerald); }
.pill.st-light_load { color: var(--amber); }
.pill.st-at_capacity { color: var(--rose); }
.pill.st-offline { color: var(--grey); }
.pill.status-in_progress { color: var(--accent); }
.pill.status-completed { color: var(--emerald); }
.skill { display: inline-block; font-size: .74rem; padding: .12rem .5rem; margin: .1rem .15rem .1rem 0; border-radius: 6px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); }

/* ---------- Shift + tasks ---------- */
.page-head h1 { margin-bottom: .15rem; }
.shift-banner { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; padding: .9rem 1.2rem; }
.shift-banner .flash { flex-basis: 100%; }
.elapsed { font-size: 1.25rem; color: var(--emerald); }
.tabs { display: flex; gap: .5rem; flex-wrap: wrap; }
.tab { padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass); color: var(--muted); font-size: .88rem; font-weight: 500; }
.tab b { margin-left: .3rem; color: var(--text); font-family: var(--font-mono); }
.tab.active { color: var(--text); background: color-mix(in srgb, var(--accent) 22%, transparent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.tab.rose.active { background: color-mix(in srgb, var(--rose) 22%, transparent); border-color: color-mix(in srgb, var(--rose) 45%, transparent); }
.tab:hover { text-decoration: none; color: var(--text); }
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.task { display: flex; flex-direction: column; gap: .5rem; border-left: 3px solid var(--c, var(--grey)); }
.task h3 a { color: var(--text); }
.task-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.countdown-row { display: flex; align-items: baseline; gap: .6rem; margin-top: .25rem; }
.countdown { font-size: 1.35rem; font-weight: 600; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.countdown.big { font-size: 2.4rem; }
.countdown.small { font-size: .85rem; }
.task-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: auto; flex-wrap: wrap; }
.countdown-block { margin-top: 1rem; padding: 1rem; border-radius: var(--radius-sm); background: var(--glass); border: 1px solid var(--glass-border); border-left: 3px solid var(--c, var(--grey)); }
.countdown-block .countdown { color: var(--c); }
.empty { color: var(--muted); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1rem 0; }
.facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.timeline { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: .9rem; }
.timeline li { padding-left: .9rem; border-left: 2px solid var(--glass-border); }
.timeline .ts { color: var(--muted); }
.timeline p { margin: .2rem 0 0; }
.pill.status-open { color: var(--muted); }

/* ---------- KPIs ---------- */
.kpi-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.kpi-strip.four { grid-template-columns: repeat(4, 1fr); }
.kpi { display: flex; flex-direction: column; gap: .2rem; }
.kpi.selected { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.kpi .kpi-value { font-size: 2rem; font-weight: 600; color: var(--c, var(--text)); }
.kpi.tone-available .kpi-value { color: var(--emerald); }
.kpi.tone-light .kpi-value { color: var(--amber); }
.kpi.tone-overdue .kpi-value { color: var(--rose); }
.tone-ok-text.kpi-value, .kpi-value.tone-ok-text { color: var(--emerald); }
.kpi-value.tone-overdue-text { color: var(--rose); }

/* ---------- Dashboard ---------- */
.breakdown h3 { margin-top: 1rem; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.breakdown ul { list-style: none; padding: 0; margin: .35rem 0 0; }
.breakdown li { display: flex; justify-content: space-between; padding: .3rem 0; border-bottom: 1px dashed var(--glass-border); }
.feed { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-direction: column; gap: .6rem; max-height: 560px; overflow: auto; }
.feed-row { display: flex; gap: .7rem; padding: .6rem .7rem; border-radius: var(--radius-sm); background: var(--glass); border: 1px solid var(--glass-border); }
.approvals, .stream { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-direction: column; gap: .6rem; }
.approval { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem; border-radius: var(--radius-sm); flex-wrap: wrap; }
.approval form { margin: 0; }
.stream li { padding: .6rem .7rem; border-radius: var(--radius-sm); background: var(--glass); border: 1px solid var(--glass-border); }
.stream li a { font-weight: 600; color: var(--text); }
.bench { color: var(--emerald); }

/* ---------- Modal (native <dialog>) ---------- */
dialog.modal { border: 0; color: var(--text); max-width: min(900px, 92vw); padding: 1.2rem; width: 100%; background: var(--bg-2); }
dialog.modal::backdrop { background: rgba(2, 6, 16, .6); backdrop-filter: blur(4px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: .6rem .55rem; border-bottom: 1px solid var(--glass-border); vertical-align: middle; }
.table th { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.table .num { text-align: right; }
.matrix .person { display: flex; gap: .6rem; align-items: center; }
.bar { height: 8px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border); overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--emerald), var(--amber) 60%, var(--rose)); }
.status-row.status-offline td { opacity: .75; }
.assign-form { margin-top: .5rem; }

/* ---------- Auth & registration ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; width: min(940px, 100%); overflow: hidden; }
.split-brand, .split-form { padding: 2.2rem; }
.split-brand { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent); display: flex; flex-direction: column; gap: 1rem; }
.live-card { margin-top: auto; padding: 1rem; border-radius: var(--radius-sm); background: var(--glass); border: 1px solid var(--glass-border); }
.big-clock { font-size: 1.8rem; color: var(--emerald); }
.split-form .stack { margin-top: 1rem; }
.register { width: min(1000px, 100%); padding: 2rem; }
.register-head .steps { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.step { font-size: .8rem; padding: .3rem .7rem; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border); color: var(--muted); }
.step.current { color: var(--text); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.register-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1rem; margin-top: 1rem; align-items: start; }
.form-card { display: flex; flex-direction: column; gap: .9rem; }
.routing { display: flex; flex-direction: column; gap: .5rem; }

/* ---------- Reports ---------- */
.preset-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.preset { text-decoration: none; color: var(--text); }
.preset.selected { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.studio-grid { display: grid; grid-template-columns: 280px 1fr; gap: 1rem; align-items: start; }
.export-toolbar .btn { white-space: nowrap; }
.studio-grid .table-wrap { margin-top: .75rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .kpi-strip, .kpi-strip.four, .preset-row { grid-template-columns: repeat(2, 1fr); }
  .split-grid, .detail-grid, .studio-grid, .register-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .app-shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; }
  .split { grid-template-columns: 1fr; }
}
@media print {
  .rail, .topbar, .filter-bar, .export-toolbar, .btn, .flash-stack { display: none !important; }
  .app-shell { display: block; padding: 0; }
  body { background: #fff; color: #000; }
  .card, .glass-inner { box-shadow: none; background: #fff; color: #000; }
}

/* ---------- Phase 2 additions: photos, migration, history, search ---------- */
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.4rem; }
.person { display: flex; gap: .7rem; align-items: center; }
.steps-list { padding-left: 1.1rem; }
.steps-list li { margin-bottom: .35rem; }
.recon { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-bottom: .75rem; }
.recon > div { display: flex; flex-direction: column; gap: .2rem; padding: .6rem .7rem; border-radius: var(--radius-sm); background: var(--glass); border: 1px solid var(--glass-border); }
.recon b { font-size: 1.25rem; }
.recon .tone-ok-text { color: var(--emerald); }
.recon .tone-overdue-text { color: var(--rose); }
input[type="file"] { padding: .5rem; }
input[type="checkbox"] { width: auto; }
.mt { margin-top: 1rem; }
form.inline-form input[type="text"], form.inline-form input:not([type]) { width: auto; }
.table select { min-width: 120px; padding: .3rem .4rem; }
@media (max-width: 800px) { .recon { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 1500px) { .mode-pill .mode-hours { display: none; } }

/* ---- Executive overview: report tiles, team bars, breakdowns, activity log ---- */
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.card-head h2 { margin-bottom: .15rem; }
.report-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.tile { display: flex; flex-direction: column; gap: .45rem; text-align: left; font: inherit; color: inherit; }
button.tile { cursor: pointer; }
.tile-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.tile .label, .label { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.tile-icon { font-size: 1rem; opacity: .85; }
.tile-value { font-size: 1.9rem; font-weight: 600; color: var(--text); line-height: 1.15; }
.tile-value small { font-size: .8rem; font-weight: 500; color: var(--muted); }
.tone-light-text { color: var(--amber); }
.tone-overdue-text { color: var(--rose); }
.tone-ok-text { color: var(--emerald); }
.team-bars { display: flex; flex-direction: column; gap: .75rem; margin-top: .75rem; }
.team-bar-head { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: .3rem; }
.bar-track { height: 8px; border-radius: 999px; background: var(--glass-strong); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--accent); }
.dual-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .75rem; }
.breakdown-box h3 { margin: 0 0 .25rem; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.breakdown-box ul { list-style: none; padding: 0; margin: 0; }
.breakdown-box li { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px dashed var(--glass-border); font-size: .9rem; }
.muted-pill { color: var(--muted); }
.log-table td, .log-table th { vertical-align: top; }
.person-cell { display: flex; align-items: center; gap: .6rem; }
.status-filter select { min-width: 160px; }
@media (max-width: 1100px) {
  .report-tiles { grid-template-columns: repeat(2, 1fr); }
  .dual-breakdown { grid-template-columns: 1fr; }
}
