/* Nahouli Group ERP — visual system
   Palette: bottle green rail, stone ground, white surfaces, brass accent used once (active state / focus).
   Type: Plus Jakarta Sans throughout — one friendly, modern sans-serif family, weight carries the
   hierarchy that a second (serif) family used to (Sept 2026: the serif pairing read too formal/
   editorial for an ops tool — Rawad asked for something friendlier). Rounder radius to match. */

:root {
  --green: #0f2a24;
  --green-2: #163b33;
  --brass: #b8944f;
  --brass-soft: #f3ecdc;
  --stone: #f2f3f0;
  --surface: #ffffff;
  --line: #e2e5e0;
  --line-strong: #c9cec8;
  --ink: #1b1f1d;
  --ink-2: #4b5350;
  --muted: #7a827e;
  --ok: #2f7d4f; --ok-bg: #e6f2ea;
  --warn: #9a6b12; --warn-bg: #faf0d6;
  --bad: #b23a3a; --bad-bg: #f8e5e5;
  --info: #2f5f8f; --info-bg: #e4edf6;
  --radius: 10px;
  --sans: "Plus Jakarta Sans", "Segoe UI", -apple-system, Helvetica, Arial, sans-serif;
  --display: var(--sans);
  --rail: 232px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  background: var(--stone);
  color: var(--ink);
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; }

/* ---- shell: rail + content ---- */
.shell { display: flex; min-height: 100vh; }
.rail {
  width: var(--rail); flex: 0 0 var(--rail);
  background: var(--green); color: #c9d3ce;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.rail .brand {
  padding: 26px 24px 20px;
  font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; font-size: 1.45rem; line-height: 1.1; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.rail .brand small { display: block; font-family: var(--sans); font-size: .78rem; color: #8fa39a; margin-top: 6px; letter-spacing: .01em; }
.rail nav { padding: 14px 0; flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.rail nav::-webkit-scrollbar { width: 6px; }
.rail nav::-webkit-scrollbar-track { background: transparent; }
.rail nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 3px; }
.rail nav a, .rail nav button.link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 24px; color: #c9d3ce; font-size: .95rem;
  border-left: 3px solid transparent; background: none; border-top: 0; border-right: 0; border-bottom: 0;
  width: 100%; text-align: left; font-family: inherit; cursor: pointer;
}
.rail nav a:hover, .rail nav button.link:hover { color: #fff; background: rgba(255,255,255,.04); text-decoration: none; }
.rail nav a.active { color: #fff; border-left-color: var(--brass); background: rgba(255,255,255,.06); }
.rail nav .group { padding: 16px 24px 6px; font-size: .74rem; color: #6f857c; }
.rail .count { background: var(--brass); color: var(--green); font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.rail .me { padding: 16px 24px 20px; border-top: 1px solid rgba(255,255,255,.08); font-size: .88rem; }
.rail .me > a { display: block; }
.rail .me > a:hover { text-decoration: none; }
.rail .me > a:hover strong { text-decoration: underline; }
.rail .me strong { display: block; color: #fff; font-weight: 500; }
.rail .me span { color: #8fa39a; font-size: .8rem; }
.rail .me form { margin: 8px 0 0; }
.rail .me button.link { padding: 0; border: 0; color: #c9d3ce; font-size: .85rem; width: auto; }
.rail .me button.link:hover { color: #fff; background: none; text-decoration: underline; }

main { flex: 1; min-width: 0; padding: 36px 44px 60px; max-width: 1240px; }

/* ---- flash toasts (bottom-right, auto-dismiss — see base.html's armToasts script) ---- */
.toast-container {
  position: fixed; bottom: 20px; right: 20px; z-index: 1000;
  display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 40px));
}
.flash {
  padding: 11px 16px; border-radius: var(--radius); font-size: .92rem; border: 1px solid;
  box-shadow: 0 4px 16px rgba(0,0,0,.14); animation: flash-in .2s ease-out;
}
.flash.flash-out { animation: flash-out .3s ease-in forwards; }
@keyframes flash-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes flash-out { to { opacity: 0; transform: translateY(8px); } }
.flash-success { background: var(--ok-bg); color: var(--ok); border-color: #cfe5d6; }
.flash-error { background: var(--bad-bg); color: var(--bad); border-color: #efc9c9; }
.flash-info, .flash-warning { background: var(--warn-bg); color: var(--warn); border-color: #eedfb6; }

/* ---- surfaces ---- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 20px;
}
.panel h2 { margin: 0 0 14px; font-size: 1.02rem; color: var(--ink); }
main > .panel:first-child > h2, main > .panel:first-child > .row-between > h2, main > h2.page-title {
  font-family: var(--display); font-size: 1.7rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; margin-bottom: 8px;
}
main > h2.page-title { margin: 0 0 22px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between h2 { margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions .btn { margin: 0; }
.muted { color: var(--muted); font-size: .86rem; }
.panel > h2 + p.muted, .panel > .row-between + p.muted { margin-top: -6px; margin-bottom: 16px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.metric-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.metric-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px 16px; text-decoration: none; color: inherit; display: block;
}
a.metric-card:hover { border-color: var(--line-strong); text-decoration: none; }
.metric-card .label { font-size: .84rem; color: var(--ink-2); }
.metric-card .value { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; font-size: 2.3rem; line-height: 1; margin-top: 8px; color: var(--ink); font-variant-numeric: lining-nums; }
.metric-card.alert .value { color: var(--bad); }
.metric-card.attn .value { color: var(--brass); }
.metric-card.ok .value { color: var(--ok); }

.org-tree { display: flex; flex-direction: column; gap: 4px; }
.org-node { border-left: 2px solid var(--line-strong); padding: 6px 14px; font-size: .93rem; }
.org-node.group { border-left-color: var(--green); font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.org-node.company { margin-left: 22px; border-left-color: var(--brass); }
.org-node.branch { margin-left: 44px; }
.org-node.department { margin-left: 66px; color: var(--ink-2); font-size: .88rem; }
.org-node .tag { font-size: .74rem; color: var(--muted); margin-right: 8px; }

/* view toggle (Chart / List) */
.view-toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.view-toggle button { font: inherit; font-size: .84rem; padding: 5px 14px; border: 0; border-radius: 0; background: var(--surface); color: var(--ink-2); }
.view-toggle button + button { border-left: 1px solid var(--line-strong); }
.view-toggle button.active { background: var(--green); color: #fff; }

/* org chart: CSS-only tree, connectors drawn with pseudo-elements */
.org-chart-wrap { overflow-x: auto; padding: 8px 0 16px; }
[hidden] { display: none !important; }
.org-chart, .org-chart .tier { display: flex; justify-content: center; list-style: none; margin: 0; padding: 0; }
.org-chart { width: max-content; min-width: 100%; }
.org-chart .tier { padding-top: 24px; position: relative; }
.org-chart li.node { position: relative; padding: 24px 10px 0; text-align: center; }
.org-chart > li.node { padding-top: 0; }
.org-chart li.node::before, .org-chart li.node::after { content: ""; position: absolute; top: 0; right: 50%; width: 50%; height: 24px; border-top: 1px solid var(--line-strong); }
.org-chart li.node::after { right: auto; left: 50%; border-left: 1px solid var(--line-strong); }
.org-chart li.node:only-child::before, .org-chart li.node:only-child::after { border-top: 0; }
.org-chart li.node:only-child { padding-top: 0; }
.org-chart li.node:first-child::before, .org-chart li.node:last-child::after { border: 0; }
.org-chart li.node:last-child::before { border-right: 1px solid var(--line-strong); }
.org-chart > li.node::before, .org-chart > li.node::after { display: none; }
.org-chart .tier::before { content: ""; position: absolute; top: 0; left: 50%; width: 1px; height: 24px; background: var(--line-strong); }
.org-card {
  display: inline-block; min-width: 150px; padding: 12px 18px; text-align: left;
  background: var(--surface); border: 1px solid var(--line-strong); border-top: 3px solid var(--line-strong); border-radius: var(--radius);
  font-size: .93rem; color: var(--ink); white-space: nowrap;
}
.org-card .tag { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.org-card.group { border-top-color: var(--green); background: var(--green); color: #fff; font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.org-card.group .tag { color: #8fa39a; }
.org-card.company { border-top-color: var(--brass); font-weight: 500; }
.org-card.branch { border-top-color: var(--line-strong); }
.org-card .depts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; max-width: 220px; }
.org-card .chip { display: inline-block; font-size: .76rem; padding: 2px 8px; border-radius: 999px; background: var(--brass-soft); color: #7a5a1e; }

/* employees under a node (toggled by the "Show employees" checkbox) */
.hide-staff .staff { display: none; }
.staff { list-style: none; margin: 8px 0 0; padding: 0 0 0 8px; border-left: 2px solid var(--line); font-size: .84rem; color: var(--ink-2); }
.staff li { padding: 2px 0; }
.staff small { color: var(--muted); font-size: .76rem; margin-left: 4px; }
.org-node .staff { margin-top: 4px; }
.org-card .dept .staff { margin: 4px 0; }

.arrow-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: .9rem; }
.arrow-flow .step { border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px; background: var(--surface); }
.arrow-flow .arrow { color: var(--brass); }

/* ---- forms ---- */
label { display: block; font-size: .86rem; color: var(--ink-2); font-weight: 600; margin-top: 16px; }
label.inline {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin-right: 14px; color: var(--ink);
  background: var(--stone); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px 7px 10px;
}
input, select, textarea {
  font: inherit; color: var(--ink); padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); margin: 6px 0 2px; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brass); outline-offset: 0; border-color: var(--brass); }
input::placeholder, textarea::placeholder { color: #a3aaa6; }
/* Bare (non-inline) forms are single-record "detail" forms — cap field width instead of
   stretching a "Name" input across a 1000px+ panel, which is what made these pages feel
   unstyled/raw (Sept 2026). Textareas get more room since long text benefits from it. */
.panel form:not(.inline-form) input:not([type=checkbox]):not([type=file]):not(.compact),
.panel form:not(.inline-form) select:not(.compact) { display: block; width: 100%; max-width: 460px; }
.panel form:not(.inline-form) textarea { display: block; width: 100%; max-width: 640px; }
input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
input[type=file] { border: 0; padding-left: 0; font-size: .9rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.inline-form input, .inline-form select { width: auto; margin: 0; }
.inline-form button { margin-top: 0; }
.inline-form span { color: var(--muted); font-size: .88rem; }
button, .btn {
  font: inherit; font-weight: 500; font-size: .92rem; padding: 9px 18px; border-radius: var(--radius);
  border: 1px solid var(--green); background: var(--green); color: #fff; cursor: pointer;
  margin-top: 12px; text-decoration: none; display: inline-block; line-height: 1.3;
}
button:hover, .btn:hover { background: var(--green-2); text-decoration: none; }
button.secondary, .btn.secondary { background: var(--surface); color: var(--green); }
button.secondary:hover, .btn.secondary:hover { background: var(--stone); }
button.danger { background: var(--surface); color: var(--bad); border-color: #e2b8b8; }
button.danger:hover { background: var(--bad-bg); }
button + button, button + .btn, .btn + button, form.inline + .btn { margin-left: 8px; }
form.inline { display: inline; }
.field-block { padding: 16px 0; border-bottom: 1px solid var(--line); }
.field-block:last-of-type { border-bottom: 0; }
.field-block > label { margin-top: 0; font-size: .95rem; color: var(--ink); }
.field-block .muted { margin: 2px 0 4px; }
details summary { cursor: pointer; margin-top: 6px; }
details summary::marker { color: var(--brass); }

form.login-form {
  max-width: 360px; margin: 12vh auto 0; background: var(--surface); padding: 34px 36px 30px;
  border: 1px solid var(--line); border-radius: var(--radius);
}
form.login-form h1 { font-family: var(--display); font-weight: 700; letter-spacing: -0.015em; font-size: 1.7rem; margin: 0 0 4px; }
form.login-form .sub { color: var(--muted); font-size: .88rem; margin: 0 0 18px; }
form.login-form input { width: 100%; }
form.login-form button { width: 100%; margin-top: 18px; }
.errorlist { color: var(--bad); font-size: .86rem; list-style: none; padding: 0; margin: 0 0 8px; }

/* ---- tables ---- */
.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table th, .data-table td { text-align: left; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { color: var(--muted); font-weight: 500; font-size: .82rem; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td a { color: var(--ink); font-weight: 500; }
.data-table td a:hover { color: var(--green); }

/* ---- status ---- */
.status-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px;
  font-size: .78rem; font-weight: 500; background: var(--stone); color: var(--ink-2); border: 1px solid var(--line);
  white-space: nowrap;
}
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.status-published, .status-approved, .status-closed, .status-pass, .status-present, .status-ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.status-pending_approval, .status-submitted, .status-warning, .status-late, .status-in_progress, .status-pending { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.status-rejected, .status-critical, .status-fail, .status-absent, .status-open { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.status-returned { background: var(--brass-soft); color: #7a5a1e; border-color: transparent; }
.status-info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.status-excused, .status-leave { background: var(--info-bg); color: var(--info); border-color: transparent; }
.status-accepted, .status-sent, .status-converted { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.status-suspended, .status-cancelled { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.status-receiving, .status-partial { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.late-tag { color: var(--bad); font-weight: 600; }

/* ---- SOP editor / body ---- */
.editor-toolbar { display: flex; gap: 4px; margin: 8px 0 6px; flex-wrap: wrap; }
.editor-toolbar button {
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); padding: 5px 10px; margin: 0; font-weight: 400; font-size: .85rem;
}
.editor-toolbar button:hover { background: var(--stone); }
.rich-editor { min-height: 240px; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 14px; background: var(--surface); overflow-y: auto; }
.rich-editor table, .sop-body table { border-collapse: collapse; margin: 8px 0; }
.rich-editor td, .sop-body td, .rich-editor th, .sop-body th { border: 1px solid var(--line-strong); padding: 6px 10px; }
.sop-body img { max-width: 100%; border-radius: var(--radius); }
.sop-body { line-height: 1.65; max-width: 72ch; margin-bottom: 18px; }
.sop-body h2, .sop-body h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; margin: 1.2em 0 .4em; }

.timeline-item { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .88rem; color: var(--ink-2); }
.timeline-item:last-child { border-bottom: 0; }

/* ---- task cards (My Work) ---- */
.task-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.task-card {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px;
  text-decoration: none; color: inherit;
}
.task-card:hover { border-color: var(--green); text-decoration: none; }
.task-card-title { font-family: var(--display); font-weight: 600; font-size: 1.1rem; line-height: 1.25; margin-bottom: 6px; }
.task-card-meta { font-size: .86rem; color: var(--muted); margin-bottom: 14px; }
.task-card-action { font-weight: 500; color: var(--green); font-size: .92rem; }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.hero .today { font-family: var(--display); font-weight: 600; font-size: 1rem; color: var(--ink-2); }
.empty { padding: 34px 0; text-align: left; color: var(--ink-2); }
.empty strong { display: block; font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; font-size: 1.25rem; color: var(--ink); margin-bottom: 4px; }

/* ---- visual assignment board ---- */
.slot-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.slot-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--stone); }
.slot-group-title { font-weight: 500; margin-bottom: 10px; }
.slot-chip { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.slot-chip.filled { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 6px 5px 12px; }
.slot-chip.filled a { font-weight: 500; }
.slot-remove {
  background: transparent; color: var(--muted); border: 0; border-radius: 50%; width: 22px; height: 22px;
  line-height: 1; padding: 0; font-size: 1rem; margin: 0; flex: 0 0 auto;
}
.slot-remove:hover { background: var(--bad-bg); color: var(--bad); }
.slot-chip.open select { min-width: 140px; }

/* ---- visual month/week calendar ---- */
.cal-period { font-weight: 600; padding: 0 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-weekday { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 0 2px 4px; }
.cal-day {
  display: flex; flex-direction: column; gap: 6px; min-height: 84px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; color: inherit; text-decoration: none;
}
.cal-day:hover { border-color: var(--green); text-decoration: none; }
.cal-day.is-today { border-color: var(--brass); border-width: 2px; padding: 9px 11px; }
.cal-day.other-month { opacity: .45; }
.cal-day-num { font-weight: 600; font-size: .95rem; }
.cal-pct { align-self: flex-start; font-weight: 700; font-size: 1rem; }
.cal-pct.pct-ok { color: var(--ok); }
.cal-pct.pct-warn { color: var(--warn); }
.cal-pct.pct-bad { color: var(--bad); }
.cal-pct-detail { font-size: .78rem; }
.cal-day.cal-day-off { background: var(--ok-bg); border-color: #cfe5d6; }
.cal-shift-chip {
  display: block; font-size: .78rem; font-weight: 600; color: var(--green);
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 3px 6px;
}
.cal-shift-chip:hover { border-color: var(--green); }
@media (max-width: 900px) {
  .cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .cal-day { min-height: 56px; padding: 6px 6px; font-size: .82rem; }
  .cal-weekday { display: none; }
}

/* ---- assignment board week strip ---- */
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 12px; }
.week-day {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 6px; color: inherit; text-decoration: none;
}
.week-day:hover { border-color: var(--green); text-decoration: none; }
.week-day.today { border-color: var(--brass); }
.week-day.selected { background: var(--green); border-color: var(--green); color: #fff; }
.week-day.selected .muted { color: rgba(255,255,255,.8); }
.week-day-name { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.week-day-num { font-weight: 600; font-size: .9rem; }
@media (max-width: 700px) {
  .week-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .week-day { padding: 6px 3px; font-size: .78rem; }
  .week-day-name { font-size: .62rem; }
}

/* ---- shift-template role-slot inputs ---- */
.slot-inputs { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-top: 6px; }
.slot-inputs label.inline { flex-direction: column; align-items: flex-start; gap: 4px; margin-right: 0; }
.slot-inputs input { width: 70px !important; margin: 0 !important; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .rail { width: 100%; flex: none; height: auto; position: static; }
  .rail .brand { padding: 16px 20px 12px; font-size: 1.3rem; }
  .rail .brand small { display: none; }
  .rail nav { display: flex; overflow-x: auto; padding: 0 12px; gap: 2px; -webkit-overflow-scrolling: touch; }
  .rail nav a { padding: 12px 12px; border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; width: auto; }
  .rail nav a.active { border-bottom-color: var(--brass); background: none; }
  .rail nav .group { display: none; }
  .rail .me { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; border-top: 0; }
  .rail .me form { margin: 0; }
  .rail .me span { display: none; }
  .hero { flex-direction: column; align-items: flex-start; }
  main { padding: 20px 16px 40px; }
  .two-col { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
  main > .panel:first-child > h2, main > .panel:first-child > .row-between > h2, main > h2.page-title { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .task-card, .metric-card, button, .btn { transition: border-color .12s ease, background-color .12s ease; }
}
