:root {
    font-family:Inter,system-ui,-apple-system,sans-serif;
    color:#152d26;
    background:#f3f6f2;
    --line:#dbe4dc;
    --muted:#52675d;
    --green:#07553e;
    --mint:#dcf0e4;
    --white:#fcfdfb;
}
* { box-sizing:border-box; }
body { margin:0; }
[hidden] { display:none!important; }
h1,h2,p,dl,dd { margin:0; }
h1 { font-size:clamp(1.9rem,4vw,2.8rem); letter-spacing:-.055em; line-height:1.06; }
h2 { font-size:1.14rem; letter-spacing:-.024em; margin-bottom:12px; }
button,input,select { font:inherit; }
button,input,select { min-height:42px; border:1px solid var(--line); border-radius:8px; padding:7px 11px; color:inherit; background:var(--white); }
button { cursor:pointer; font-weight:650; }
button:hover { background:var(--mint); }
button:disabled { opacity:.58; cursor:default; }
button.primary { color:white; background:var(--green); border-color:var(--green); }
button.primary:hover:not(:disabled) { background:#0d7052; }
:focus-visible { outline:2px solid #1e966d; outline-offset:2px; }
.login { width:min(calc(100% - 32px),430px); margin:14vh auto 24px; padding:30px; background:var(--white); border:1px solid var(--line); border-radius:16px; }
.login h1 { font-size:1.94rem; margin-top:22px; }
.login p { margin:12px 0; color:var(--muted); }
.brand { display:flex; align-items:center; gap:8px; font-size:1.18rem; font-weight:800; letter-spacing:-.05em; white-space:nowrap; }
.brand span { display:grid; place-items:center; height:32px; width:32px; border-radius:8px; background:var(--green); color:#fff; }
.brand b { color:#316451; font-size:.8em; padding-left:7px; border-left:1px solid var(--line); }
.workspace { display:grid; grid-template-columns:225px minmax(0,1fr); min-height:100dvh; }
aside { position:sticky; top:0; display:flex; flex-direction:column; min-width:0; height:100dvh; padding:20px 14px; border-right:1px solid var(--line); background:#eaf1ea; }
nav { display:grid; gap:5px; margin-top:28px; }
nav button { text-align:left; border:0; background:transparent; }
nav button[aria-current] { color:var(--green); background:var(--mint); box-shadow:inset 3px 0 var(--green); }
footer { display:grid; gap:10px; margin-top:auto; overflow-wrap:anywhere; font-size:.83rem; color:var(--muted); }
main { width:min(100%,1250px); padding:clamp(18px,3vw,40px); margin:0 auto; }
.top { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; margin-bottom:18px; }
.top p,.muted { color:var(--muted); margin-top:6px; line-height:1.4; }
#status { color:var(--green); margin-bottom:12px; min-height:1.3em; }
#status:empty,#login-status:empty { display:none; }
[data-error] { color:#972b25!important; }
.view { display:grid; gap:14px; }
.metrics,.overview-grid { display:grid; gap:14px; grid-template-columns:repeat(3,minmax(0,1fr)); }
.overview-grid { grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); }
.metrics > div,.card { min-width:0; padding:16px; border-radius:12px; border:1px solid var(--line); background:var(--white); }
.metrics > div:first-child { color:white; background:var(--green); border-color:var(--green); }
.metrics dt { font-size:.86rem; line-height:1.25; }
.metrics dd { font-size:clamp(1.45rem,3vw,2.1rem); font-weight:800; margin-top:7px; font-variant-numeric:tabular-nums; }
.visit-days { display:grid; gap:8px; list-style:none; padding:0; margin:0; }
.visit-days li { display:grid; grid-template-columns:62px minmax(0,1fr) minmax(45px,auto); gap:10px; align-items:center; font-size:.89rem; }
meter { width:100%; height:18px; }
meter::-webkit-meter-optimum-value { background:#13845e; }
.facts > div { display:flex; justify-content:space-between; gap:10px; padding:8px 0; border-bottom:1px solid var(--line); font-size:.93rem; }
.facts > div:last-child { border-bottom:0; }
.facts dd { font-weight:750; }
.table-wrap { max-width:100%; overflow:auto; }
table { width:100%; border-collapse:collapse; font-size:.86rem; text-align:left; }
th,td { padding:9px 8px; border-bottom:1px solid var(--line); vertical-align:top; overflow-wrap:anywhere; }
th { background:#edf5ee; font-weight:750; }
tbody tr:last-child td { border-bottom:0; }
.empty { color:var(--muted); font-size:.91rem; }
.editing { display:grid; gap:12px; }
.editing h2 { margin:0; }
.editing label { display:grid; gap:5px; }
.editing input,.editing select { width:100%; min-width:0; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.editing label.check { display:flex; gap:8px; align-items:center; }
.editing input[type=checkbox] { width:16px; min-height:16px; accent-color:var(--green); }
.actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.editing > button { justify-self:start; }
#market { display:block; margin:6px 0 12px; max-width:100%; }
.price-edit { display:flex; flex-wrap:wrap; gap:7px; align-items:center; }
.price-edit input { width:112px; }
@media(max-width:760px) {
    .workspace { display:block; }
    aside { position:static; height:auto; padding:12px; border-right:0; border-bottom:1px solid var(--line); }
    nav { display:flex; overflow:auto; margin:10px 0; }
    nav button { white-space:nowrap; }
    footer { display:flex; justify-content:space-between; align-items:center; gap:8px; }
    .overview-grid { grid-template-columns:1fr; }
    .metrics { gap:6px; }
    .metrics > div { padding:9px; }
    .metrics dt { font-size:.75rem; }
    th,td { min-width:90px; }
}
@media(max-width:425px) {
    .metrics,.form-grid { grid-template-columns:1fr; }
    .metrics > div { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; }
    .metrics dd { margin:0; }
}
