:root {
  --forest: #173b2e;
  --forest-2: #1e4a39;
  --pine: #24513e;
  --cream: #f5efe4;
  --paper: #fffdf8;
  --clay: #95502d;
  --clay-2: #7c3f21;
  --ink: #202820;
  --mist: #dce5dd;
  --line: #e4ddce;
  --line-soft: #efe9dd;
  --muted: #6d756c;
  --muted-2: #8b938a;
  --gold: #b98b4a;
  --danger: #a33a2d;
  --danger-soft: #f7e6e1;
  --warn: #8a6418;
  --warn-soft: #fbf1d8;
  --ok: #2c6b4f;
  --ok-soft: #e4f0e6;
  --info: #38556b;
  --info-soft: #e5edf2;
  --bg: var(--cream);
  --surface: var(--paper);
  --text: var(--ink);
  --sidebar-text: #e8e2d3;
  --sidebar-muted: #a9bdae;
  --radius: 14px;
  --radius-sm: 9px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html[data-theme="dark"] {
  --cream: #101713;
  --paper: #17211c;
  --ink: #e9efe8;
  --line: #2a3831;
  --line-soft: #223029;
  --muted: #9aa89f;
  --muted-2: #7d8b82;
  --mist: #24312a;
  --bg: #0d1310;
  --surface: #17211c;
  --text: #e9efe8;
  --sidebar-text: #e8e2d3;
  --danger-soft: #3a211d;
  --warn-soft: #392f1a;
  --ok-soft: #1b3227;
  --info-soft: #1d2c36;
  --clay: #b9714a;
  --clay-2: #c9825b;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 15px;
}

a { color: inherit; }
a:hover { color: var(--clay); }

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.01em; }
h1, .display { font-family: var(--display); font-weight: 400; }

p { margin: 0; }

button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: #d9c7a8; color: #1c2a22; }

/* ---------------------------------------------------------------- layout */

body.has-sidebar { padding-left: 258px; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: 258px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(700px 300px at 10% 0%, #24513e 0%, transparent 60%),
    var(--forest);
  color: var(--sidebar-text);
  border-right: 1px solid #0f2a20;
}

.brand {
  display: block;
  padding: 1.5rem 1.35rem 1.1rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.brand:hover { color: var(--sidebar-text); }
.brand-mark {
  font-family: var(--display);
  font-size: 1.42rem;
  letter-spacing: .02em;
  color: #fffdf6;
  display: block;
  line-height: 1.1;
}
.brand-sub {
  display: block;
  margin-top: .3rem;
  font-size: .66rem;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem .7rem 1.2rem;
  scrollbar-width: thin;
}
.nav-group { margin-bottom: 1.05rem; }
.nav-label {
  padding: .18rem .65rem .42rem;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8fa695;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .65rem;
  margin-bottom: .12rem;
  border-radius: 8px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: .9rem;
  line-height: 1.25;
  transition: background .14s ease, color .14s ease;
}
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link.is-active {
  background: #f3ecdc;
  color: #1d3a2c;
  font-weight: 600;
}
.nav-link .nav-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #6f8a78; flex: 0 0 auto;
}
.nav-link.is-active .nav-dot { background: var(--clay); }
.nav-badge {
  margin-left: auto;
  font-size: .66rem;
  font-weight: 700;
  background: rgba(255,255,255,.12);
  color: #f3ecdc;
  border-radius: 99px;
  padding: .08rem .4rem;
  min-width: 1.2rem;
  text-align: center;
}
.nav-link.is-active .nav-badge { background: #e2d3b7; color: #3c2a18; }

.sidebar-foot {
  border-top: 1px solid rgba(255,255,255,.09);
  padding: .9rem 1rem 1.05rem;
  font-size: .78rem;
  color: var(--sidebar-muted);
}
.sidebar-foot .who { color: #f3ecdc; font-size: .83rem; }
.sidebar-foot .role { text-transform: uppercase; letter-spacing: .12em; font-size: .6rem; margin-top: .15rem; }
.sidebar-actions { display: flex; gap: .4rem; margin-top: .7rem; }
.sidebar-actions form { display: inline; }
.icon-btn {
  border: 1px solid rgba(255,255,255,.18);
  background: transparent;
  color: #d9e4da;
  border-radius: 7px;
  padding: .28rem .5rem;
  font-size: .72rem;
  cursor: pointer;
  text-decoration: none;
}
.icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }

.topbar { display: none; }

.page {
  max-width: 1420px;
  margin: 0 auto;
  padding: 2.2rem 2.4rem 4rem;
}
.page-wide { max-width: none; }

.page-head { margin-bottom: 1.6rem; }
.eyebrow {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: .45rem;
}
.page-head h1 { font-size: clamp(1.9rem, 3vw, 2.5rem); line-height: 1.1; }
.page-head .lead { color: var(--muted); margin-top: .45rem; max-width: 70ch; font-size: .95rem; }
.page-actions { display: flex; gap: .55rem; flex-wrap: wrap; margin-top: 1rem; }

.crumbs { font-size: .78rem; color: var(--muted); margin-bottom: .7rem; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- cards */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}
.card-flush { padding: 0; overflow: hidden; }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.card-head h2 { font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.card-head .sub { color: var(--muted); font-size: .78rem; margin-top: .2rem; }
.card-head a { font-size: .78rem; color: var(--clay); text-decoration: none; }
.card-head a:hover { text-decoration: underline; }

.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-2-1 { grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); }
.grid-1-2 { grid-template-columns: minmax(0,1fr) minmax(0,1.65fr); }
.stack { display: grid; gap: 1.1rem; }
.mt { margin-top: 1.1rem; }
.mt-lg { margin-top: 1.8rem; }

/* ---------------------------------------------------------------- KPI */

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; }
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem 1rem;
  position: relative;
  overflow: hidden;
}
.kpi .k-label {
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.kpi .k-value {
  font-family: var(--display);
  font-size: clamp(1.65rem, 2.4vw, 2.15rem);
  line-height: 1.15;
  margin-top: .35rem;
  letter-spacing: -.01em;
}
.kpi .k-note { font-size: .75rem; color: var(--muted); margin-top: .35rem; }
.kpi .k-note strong { color: var(--text); font-weight: 600; }
.kpi.accent { border-left: 3px solid var(--clay); }
.kpi.warn { border-left: 3px solid var(--gold); }
.kpi.bad { border-left: 3px solid var(--danger); }

/* ---------------------------------------------------------------- pills */

.pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .16rem .5rem;
  border-radius: 99px;
  font-size: .69rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  background: var(--mist);
  color: #33463a;
  border: 1px solid transparent;
}
html[data-theme="dark"] .pill { color: #bcd0c1; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.clay { background: #f0e2d6; color: var(--clay-2); }
html[data-theme="dark"] .pill.clay { background: #35251c; color: #d79a74; }
.pill.line { background: transparent; border-color: var(--line); color: var(--muted); }
.pill .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ---------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
.data-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.data-table th {
  position: sticky; top: 0;
  text-align: left;
  font-size: .63rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: .65rem .7rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table td {
  padding: .62rem .7rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(149,80,45,.035); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .strong { font-weight: 600; }
.data-table .muted { color: var(--muted); }
.data-table a.rowlink { text-decoration: none; }
.data-table a.rowlink:hover { color: var(--clay); text-decoration: underline; }
.data-table td.tight { padding-top: .45rem; padding-bottom: .45rem; }
.empty { padding: 2.2rem 1.2rem; text-align: center; color: var(--muted); font-size: .88rem; }

/* ---------------------------------------------------------------- forms */

.field { display: grid; gap: .32rem; }
.field label { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .55rem .65rem;
  font-size: .9rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid rgba(149,80,45,.25);
  outline-offset: 1px;
  border-color: var(--clay);
}
.field textarea { min-height: 86px; resize: vertical; }
.field .hint { font-size: .72rem; color: var(--muted); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .8rem; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .8rem; }
.inline-form { display: inline; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 38px;
  padding: .48rem .95rem;
  border-radius: 9px;
  border: 1px solid transparent;
  background: var(--clay);
  color: #fff8ee;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: var(--clay-2); color: #fff; }
.btn-secondary { background: transparent; border-color: var(--line); color: var(--text); }
.btn-secondary:hover { border-color: var(--clay); color: var(--clay); background: transparent; }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--clay); background: transparent; }
.btn-sm { min-height: 30px; padding: .22rem .6rem; font-size: .76rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.search {
  display: flex; align-items: center; gap: .5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: .4rem .8rem;
  min-width: 220px;
}
.search input { border: 0; background: transparent; outline: none; width: 100%; font-size: .85rem; }
.search svg { flex: 0 0 auto; opacity: .45; }

.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.toolbar .spacer { flex: 1; }

.message {
  border-radius: var(--radius-sm);
  padding: .7rem .9rem;
  font-size: .85rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}
.message.success { background: var(--ok-soft); color: var(--ok); border-color: #cbe0d1; }
.message.error { background: var(--danger-soft); color: var(--danger); border-color: #eccfc8; }
.message.info { background: var(--info-soft); color: var(--info); }

/* ---------------------------------------------------------------- calendar */

.cal-nav { display: flex; align-items: center; gap: .5rem; }
.cal-nav .month { font-family: var(--display); font-size: 1.3rem; min-width: 10rem; text-align: center; }
.cal-scroll { overflow-x: auto; }
.cal {
  --days: 30;
  min-width: 940px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.cal-head {
  display: grid;
  grid-template-columns: 150px repeat(var(--days), minmax(0,1fr));
  border-bottom: 1px solid var(--line);
  background: #faf6ec;
}
html[data-theme="dark"] .cal-head { background: #1b2620; }
.cal-head .h {
  padding: .5rem .25rem;
  text-align: center;
  font-size: .64rem;
  color: var(--muted);
  border-right: 1px solid var(--line-soft);
}
.cal-head .h:last-child { border-right: 0; }
.cal-head .h.weekend { color: var(--clay); }
.cal-head .h.today { background: #efe2cb; color: #5a3a1d; font-weight: 700; }
.cal-head .label { text-align: left; padding-left: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.cal-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  border-bottom: 1px solid var(--line-soft);
  min-height: 54px;
}
.cal-row:last-child { border-bottom: 0; }
.cal-cabin {
  padding: .55rem .8rem;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: center;
  background: var(--surface);
  position: relative; z-index: 2;
}
.cal-cabin a { text-decoration: none; font-size: .8rem; font-weight: 600; line-height: 1.2; }
.cal-cabin a:hover { color: var(--clay); }
.cal-cabin .meta { font-size: .64rem; color: var(--muted); margin-top: .15rem; }
.cal-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--days), minmax(0,1fr));
  align-items: stretch;
  min-height: 54px;
}
.cal-cell { border-right: 1px solid var(--line-soft); }
.cal-cell:last-child { border-right: 0; }
.cal-cell.weekend { background: rgba(149,80,45,.035); }
.cal-cell.today { background: rgba(185,139,74,.16); }
.cal-bars { position: absolute; inset: 5px 0; pointer-events: none; }
.cal-bar {
  position: absolute;
  top: 0; bottom: 0;
  border-radius: 6px;
  background: var(--pine);
  color: #f7f2e6;
  font-size: .68rem;
  line-height: 1.15;
  padding: .3rem .35rem;
  overflow: hidden;
  text-decoration: none;
  pointer-events: auto;
  display: flex; align-items: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  white-space: nowrap;
}
.cal-bar:hover { background: var(--clay); color: #fff; }
.cal-bar.turn { background: var(--gold); color: #2d2411; }
.cal-bar.clash { background: var(--danger); }
.cal-bar .nights { opacity: .75; font-size: .62rem; margin-left: auto; padding-left: .35rem; }

/* ---------------------------------------------------------------- misc */

.list { display: grid; }
.list-row {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: .72rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.list-row:last-child { border-bottom: 0; }
.list-row:first-child { padding-top: 0; }
.list-main { min-width: 0; flex: 1; }
.list-title { font-size: .88rem; font-weight: 600; line-height: 1.3; }
.list-title a { text-decoration: none; }
.list-title a:hover { color: var(--clay); }
.list-sub { font-size: .76rem; color: var(--muted); margin-top: .18rem; }
.list-side { font-size: .74rem; color: var(--muted); text-align: right; white-space: nowrap; }

.split-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--line-soft); }
.split-bar span { display: block; height: 100%; }

.stat-line { display: flex; justify-content: space-between; gap: 1rem; padding: .38rem 0; font-size: .85rem; border-bottom: 1px solid var(--line-soft); }
.stat-line:last-child { border-bottom: 0; }
.stat-line .lbl { color: var(--muted); }
.stat-line .val { font-variant-numeric: tabular-nums; font-weight: 600; }

.note {
  font-size: .78rem;
  color: var(--muted);
  border-left: 2px solid var(--line);
  padding: .15rem 0 .15rem .7rem;
  margin-top: .8rem;
}
.note strong { color: var(--text); }

.delta-up { color: var(--ok); font-size: .74rem; }
.delta-down { color: var(--danger); font-size: .74rem; }
.delta-flat { color: var(--muted); font-size: .74rem; }

.cabin-thumb {
  width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block;
  background: var(--mist);
}
.cabin-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1.1rem; }
.cabin-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  display: flex; flex-direction: column;
  transition: transform .16s ease, border-color .16s ease;
}
.cabin-card:hover { transform: translateY(-2px); border-color: #cdbfa6; color: inherit; }
.cabin-card .body { padding: .8rem .95rem 1rem; }
.cabin-card h3 { font-family: var(--display); font-size: 1.12rem; line-height: 1.2; }
.cabin-card .meta { font-size: .74rem; color: var(--muted); margin-top: .3rem; }
.cabin-card .foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .6rem; }
.cabin-card .rating { font-size: .78rem; font-weight: 700; }
.cabin-card .rating span { color: var(--muted); font-weight: 400; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.hero img { width: 100%; height: 100%; object-fit: cover; min-height: 260px; }
.hero .hero-body { padding: 1.5rem 1.6rem; }
.hero h2 { font-family: var(--display); font-size: 1.7rem; line-height: 1.15; }
.hero .facts { display: flex; flex-wrap: wrap; gap: .45rem; margin: .8rem 0 1rem; }
.hero .addr { color: var(--muted); font-size: .84rem; }

.section-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin: 2rem 0 .8rem;
}
.section-title h2 { font-family: var(--display); font-size: 1.35rem; }
.section-title .sub { color: var(--muted); font-size: .78rem; }

.kv { display: grid; grid-template-columns: 120px 1fr; gap: .35rem .9rem; font-size: .85rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem; flex-wrap: wrap; }
.tab {
  padding: .5rem .8rem;
  font-size: .82rem;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--clay); border-bottom-color: var(--clay); font-weight: 600; }

.progress { height: 5px; background: var(--line-soft); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--pine); }
html[data-theme="dark"] .progress span { background: #6f9c7f; }

.check-row { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem 0; border-bottom: 1px solid var(--line-soft); }
.check-row:last-child { border-bottom: 0; }
.check-row form { display: flex; }
.check-box {
  width: 20px; height: 20px; border: 1.5px solid #b9ae98; border-radius: 6px;
  background: transparent; cursor: pointer; flex: 0 0 auto; margin-top: .1rem;
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
}
.check-box:hover { border-color: var(--clay); }
.check-row.done .check-box { background: var(--pine); border-color: var(--pine); }
.check-row.done .check-title { text-decoration: line-through; color: var(--muted); }
.check-title { font-size: .86rem; font-weight: 500; }
.check-sub { font-size: .75rem; color: var(--muted); margin-top: .1rem; }
.flag { font-size: .6rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--danger); }

.scenario { border-bottom: 1px solid var(--line-soft); padding: 1rem 0; }
.scenario:first-child { padding-top: 0; }
.scenario:last-child { border-bottom: 0; padding-bottom: 0; }
.scenario .num { font-family: var(--display); color: var(--clay); font-size: .9rem; }
.scenario h3 { font-size: .95rem; font-weight: 600; margin: .15rem 0 .35rem; }
.scenario .q { font-style: italic; color: var(--muted); font-size: .84rem; margin-bottom: .45rem; }
.scenario .r { font-size: .87rem; }
.scenario .step { font-size: .78rem; color: var(--muted); margin-top: .5rem; border-left: 2px solid var(--gold); padding-left: .65rem; }
.scenario .cat { font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted-2); }

.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-art {
  background:
    radial-gradient(900px 500px at 20% 0%, #2b5c47 0%, transparent 55%),
    radial-gradient(700px 400px at 100% 100%, #4a2c1c 0%, transparent 50%),
    var(--forest);
  color: #f6f1e4;
  padding: 3.2rem;
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-art .mark { font-family: var(--display); font-size: 2rem; line-height: 1.1; }
.login-art .tag { max-width: 26rem; color: #c7d6c9; font-size: .92rem; line-height: 1.6; }
.login-art .foot { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: #8fa695; }
.login-form-wrap { display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--bg); }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { font-size: 2rem; margin-bottom: .3rem; }
.login-card .lead { color: var(--muted); font-size: .9rem; margin-bottom: 1.6rem; }
.login-card .field { margin-bottom: .9rem; }
.login-card .btn { width: 100%; }
.login-note { margin-top: 1.2rem; font-size: .74rem; color: var(--muted); }

.footnote { margin-top: 2.4rem; font-size: .72rem; color: var(--muted-2); border-top: 1px solid var(--line); padding-top: .8rem; }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .cabin-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 1023px) {
  body.has-sidebar { padding-left: 0; padding-top: 54px; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: fixed; inset: 0 0 auto 0; height: 54px; z-index: 80;
    background: var(--forest); color: #f6f1e4;
    padding: 0 .9rem;
  }
  .topbar-brand { font-family: var(--display); font-size: 1.05rem; color: #fff; text-decoration: none; }
  .topbar button {
    background: transparent; color: #e8e2d3; border: 1px solid rgba(255,255,255,.25);
    border-radius: 7px; padding: .3rem .6rem; font-size: .78rem; cursor: pointer;
  }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; width: 280px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .backdrop { position: fixed; inset: 0; background: rgba(10,20,15,.45); z-index: 55; display: none; }
  body.sidebar-open .backdrop { display: block; }
  .page { padding: 1.5rem 1.15rem 3rem; }
  .grid-2, .grid-2-1, .grid-1-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero img { min-height: 200px; max-height: 240px; }
}

@media (max-width: 720px) {
  .kpis { grid-template-columns: 1fr; }
  .cabin-grid { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .page-head h1 { font-size: 1.8rem; }
  .card { padding: 1rem; }
  .kpi .k-value { font-size: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
