:root{color-scheme:light;--background:#f1f5ef;--surface:#fff;--text:#17291d;--muted:#4d6253;--border:#d1ded3;--accent:#245c34;--button-text:#fff;--alert:#8e2727;--header:#163824;--header-text:#fff}
:root[data-theme=dark]{color-scheme:dark;--background:#111a14;--surface:#19271e;--text:#edf5ee;--muted:#b1c4b5;--border:#395044;--accent:#9ad4a6;--button-text:#15281b;--alert:#ffc0ba;--header:#1c3826}
*{box-sizing:border-box}
body{margin:0;background:var(--background);color:var(--text);font:1rem/1.5 system-ui,sans-serif}
a{color:var(--accent);text-underline-offset:.18em}
.top{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem max(1rem,calc((100vw - 68rem)/2));background:var(--header);color:var(--header-text);flex-wrap:wrap}
.top a{color:inherit}
.brand{font-weight:750;text-decoration:none}
.brand span{display:block;font-size:.875rem;font-weight:500}
nav,.heading{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}
main{max-width:70rem;margin:auto;padding:2.25rem 1rem 3rem}
.heading{justify-content:space-between;margin-bottom:1.25rem}
h1,h2,p{margin-top:0}
h1{font-size:clamp(1.8rem,4vw,2.5rem);line-height:1.2;margin-bottom:0}
h2{font-size:1.25rem;margin:.75rem 0 .35rem}
.panel{background:var(--surface);border:1px solid var(--border);border-radius:1rem;padding:1.25rem}


.cards,.fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(16rem,100%),1fr));gap:1rem}
.cards{margin:0;padding:0;list-style:none}
.badge{background:var(--background);border:1px solid var(--border);border-radius:999px;padding:.2rem .55rem;font-size:.875rem}
.muted,dt{color:var(--muted)}
dd{margin:0;font-weight:650;overflow-wrap:anywhere}
.stack{display:grid;gap:1rem}
label{display:grid;gap:.3rem;font-weight:600}
input,select,button,.button{font:inherit;border-radius:.55rem;padding:.55rem .8rem}
input,select{width:100%;border:1px solid var(--border);background:var(--surface);color:var(--text)}
button,.button{display:inline-block;border:1px solid transparent;background:var(--accent);color:var(--button-text);cursor:pointer;text-decoration:none;font-weight:650}
button[hidden]{display:none}
.secondary{background:transparent;border-color:currentColor;color:inherit}
fieldset{border:1px solid var(--border);border-radius:.55rem;padding:.75rem 1rem}
.check{display:flex;align-items:center;gap:.5rem;margin:.35rem 0}
.check input{width:auto}
.alert{color:var(--alert);font-weight:650}
:focus-visible{outline:3px solid #df910c;outline-offset:3px}

.login-page {
  --login-bg: #e9eee7;
  --login-surface: #fbfcf8;
  --login-ink: #142a20;
  --login-muted: #52635a;
  --login-line: #d6dfd6;
  --login-field: #fff;
  --login-action: #1b5237;
  --login-action-ink: #fff;
  background: radial-gradient(ellipse at 72% 12%, #f6f4df55, transparent 47%), var(--login-bg);
  color: var(--login-ink);
}
:root[data-theme=dark] .login-page {
  --login-bg: #0d1b14;
  --login-surface: #14251c;
  --login-ink: #f1f5ec;
  --login-muted: #afc0b4;
  --login-line: #3c5445;
  --login-field: #1b3025;
  --login-action: #b0d9a6;
  --login-action-ink: #142c20;
}
.login-page main {
  min-height: 100svh;
  max-width: 78rem;
  display: grid;
  align-items: center;
  padding: clamp(1rem, 5vw, 4rem);
}
.login-card {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 39rem;
  overflow: hidden;
  border: 1px solid var(--login-line);
  border-radius: 1.7rem;
  background: var(--login-surface);
  box-shadow: 0 24px 72px #10251a24;
}
.login-landscape {
  padding: clamp(1.5rem, 4vw, 3.3rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fffdf1;
  background:
    linear-gradient(160deg, #0a271cdf 1%, #19392538 42%, #0a261ae8 87%),
    #17412b url("/login-highlands.jpg") center 50% / cover no-repeat;
}
.login-brand { display: flex; align-items: center; gap: .8rem; font-size: 1.05rem; font-weight: 750; }
.login-brand i {
  width: 2.3rem;
  height: 1.55rem;
  background: #e2e8aa;
  clip-path: polygon(0 100%, 34% 23%, 46% 50%, 68% 0, 100% 100%, 74% 72%, 68% 49%, 55% 77%, 34% 61%);
}
.login-product {
  margin: 0 0 .9rem;
  font-size: clamp(2.8rem, 6.2vw, 5.1rem);
  letter-spacing: -.075em;
  line-height: .94;
  font-weight: 760;
}
.login-product span { color: #e4e7a9; }
.login-intro > p:last-child { max-width: 23rem; margin-bottom: 0; color: #f1f2e2; }
.login-panel {
  padding: clamp(1.25rem, 5vw, 4rem);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 1.5rem;
  min-width: 0;
}
.login-tools { display: flex; justify-content: flex-end; }
.login-tools button {
  color: var(--login-muted);
  border-color: var(--login-line);
  border-radius: 99rem;
  font-size: .875rem;
}
.login-content { align-self: center; width: 100%; max-width: 25rem; margin: 0 auto 2rem; }
.login-content h1 { font-size: clamp(2.2rem, 4vw, 3rem); letter-spacing: -.055em; margin-bottom: .45rem; }
.login-subtitle { color: var(--login-muted); margin-bottom: 2rem; }
.login-form { display: grid; gap: .5rem; }
.login-form label { font-size: .95rem; }
.login-form input {
  background: var(--login-field);
  border-color: var(--login-line);
  color: var(--login-ink);
  min-height: 3.15rem;
  border-radius: .7rem;
  margin-bottom: .75rem;
}
.password-field { position: relative; }
.password-field input { padding-right: 7rem; }
.password-toggle {
  position: absolute;
  right: .3rem;
  top: .27rem;
  min-height: 2.6rem;
  background: transparent;
  color: var(--login-muted);
  font-size: .875rem;
}
.login-submit {
  background: var(--login-action);
  color: var(--login-action-ink);
  border-radius: .7rem;
  min-height: 3.15rem;
  margin-top: .55rem;
}
.login-submit:hover { filter: brightness(1.12); }
@media (max-width: 45rem) {
  .login-card { grid-template-columns: 1fr; min-height: 0; border-radius: 1.2rem; }
  .login-landscape { min-height: 13.5rem; gap: 1.3rem; background-position: center 47%; }
  .login-product { font-size: clamp(2.4rem, 8vw, 3.4rem); }
  .login-product br { display: none; }
  .login-panel { gap: 1rem; }
  .login-content { margin-bottom: .55rem; }
}

.report-card { margin-top: 1rem; }
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
  gap: .75rem;
  margin: .8rem 0 0;
}
.metrics > div {
  padding: .8rem .9rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: .65rem;
}
.metrics dt { font-size: .9rem; }
.metrics dd { font-size: 1.15rem; }
.table-scroll { overflow-x: auto; }
.table-scroll table { width: 100%; border-collapse: collapse; text-align: left; }
.table-scroll th, .table-scroll td { border-bottom: 1px solid var(--border); padding: .65rem; }
.table-scroll th, .table-scroll .money { white-space: nowrap; }
.table-scroll td { overflow-wrap: anywhere; }
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: .55rem;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  padding: .55rem .8rem;
  resize: vertical;
}
.report-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.history { padding-left: 1.5rem; overflow-wrap: anywhere; }
