@font-face{font-family:"DM Sans";src:url("/finance/dm-sans.woff2") format("woff2");font-style:normal;font-weight:100 1000;font-display:swap}
:root{color-scheme:light;--navy:#142a52;--muted:#4d6380;--blue:#194fa9;--line:#dce6f1;--paper:#fff;--background:#edf3fa;--red:#a82038;--radius:17px;font:15px/1.45 "DM Sans",system-ui,sans-serif;color:var(--navy);background:var(--background)}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0}
h1,h2,h3,p{margin:0}
h1{font-size:clamp(1.65rem,4vw,2.18rem);letter-spacing:-.04em}
h2{font-size:1.23rem;letter-spacing:-.025em}
h3{font-size:1rem}
a{color:var(--blue);text-underline-offset:3px}
button,.button{border:1px solid transparent;border-radius:10px;min-height:42px;padding:8px 13px;font:inherit;font-weight:650;cursor:pointer;background:var(--blue);color:white;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap}
button:hover,.button:hover{filter:brightness(.92)}
button:disabled{opacity:.6;cursor:not-allowed}
.quiet,.secondary{background:#f2f6fc;color:var(--navy);border-color:var(--line)}
.danger{background:#fff2f4;color:var(--red);border-color:#edc6ce}
input,select,textarea{width:100%;min-height:42px;border:1px solid #c8d7e6;border-radius:9px;background:#fff;color:var(--navy);padding:8px 10px;font:inherit}
input[type=checkbox]{width:21px;min-height:21px;margin:5px;accent-color:var(--blue)}
label{display:grid;gap:5px;font-size:.88rem;font-weight:620}
.credential-field{display:grid;gap:5px;min-width:0}
.credential-input{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px}
.credential-input button{padding-inline:10px}
.credential-input svg{width:21px;height:21px}
.remember-login{display:flex;align-items:center;gap:7px;width:fit-content;min-height:42px}
textarea{min-height:88px;resize:vertical}
:focus-visible{outline:3px solid #137acc;outline-offset:3px}
#workspace{display:grid;grid-template-columns:244px minmax(0,1fr);min-height:100dvh}
#rail{height:100dvh;position:sticky;top:0;display:flex;flex-direction:column;background:white;border-right:1px solid var(--line);padding:24px 14px 18px;gap:28px}
.brand{display:flex;gap:11px;align-items:center;padding:0 6px;line-height:1.25}
.brand img{width:36px;height:38px;object-fit:contain;border-radius:6px}
.brand strong{font-size:1.07rem}
.brand small,.muted{color:var(--muted)}
.brand small{display:block;font-size:.72rem;margin-top:3px}
nav{display:grid;gap:5px;overflow:auto}
nav a{min-height:43px;display:flex;align-items:center;gap:9px;text-decoration:none;color:var(--navy);border-radius:10px;padding:8px 10px;font-weight:590}
nav a:hover,nav a[aria-current=page]{background:#e9f1ff;color:#154caf}
.icon{display:inline-grid;place-items:center;width:26px;height:25px;color:#2162bb;font-size:1.05rem;flex:none}
.identity{margin-top:auto;display:grid;gap:8px;padding:0 6px}
#account{font-size:.83rem;color:var(--muted)}
main{padding:29px clamp(15px,3.1vw,46px) 50px;max-width:1600px;width:100%;margin:auto 0;align-self:start}
.mast{display:flex;align-items:end;flex-wrap:wrap;justify-content:space-between;gap:15px}
#period{display:flex;align-items:end;gap:8px;flex-wrap:wrap}
#period input,#period select{width:auto;max-width:100%}
#year-field input{width:110px}
#period-label{color:var(--muted);margin:12px 0 16px}
#notice{background:#e6f2ff;padding:12px 14px;border-radius:10px;margin:10px 0}
#notice.error,.error{color:var(--red);background:#fff0f3}
.card,.panel,.stat{background:white;border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 6px 18px #1b4b7a08}
.panel{padding:clamp(14px,2vw,23px);margin:0 0 16px}
.hero{background:linear-gradient(115deg,#11274c,#2159ae);color:white;border:0}
.hero .muted,.hero a{color:#e1edff}
.hero a{display:inline-block;margin-top:11px}
.hero .hero-amount{font-size:clamp(1.75rem,4vw,2.4rem);font-weight:760;letter-spacing:-.045em;margin-top:5px}
.stats,.overview{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:12px;margin:0 0 16px}
.overview{grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr))}
.stat,.card{padding:15px;min-width:0}
.stat .label{color:var(--muted);font-weight:650;font-size:.84rem}
.stat strong{display:block;font-size:clamp(1.13rem,2.5vw,1.63rem);overflow-wrap:anywhere;letter-spacing:-.035em;margin-top:5px}
.card{display:grid;gap:8px}
.card a{font-weight:690}
.toolbar,.row-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.toolbar{margin:0 0 14px}
.toolbar h2{margin-right:auto}
.row-actions{margin-top:10px}
.row-actions button,.row-actions a{font-size:.85rem}
.list{display:grid;gap:9px}
.list article{border:1px solid var(--line);background:#fbfdff;border-radius:12px;padding:12px;overflow-wrap:anywhere}
.record-title{display:flex;justify-content:space-between;gap:12px;font-weight:710}
.record-details{margin-top:4px;font-size:.88rem;color:var(--muted)}
.alert{color:var(--red);font-weight:670}
.table-wrap{overflow:auto}
table{border-collapse:collapse;width:100%;min-width:590px}
th,td{padding:9px 10px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere}
th{font-weight:710;background:#edf4ff}
.permissions td:not(:first-child),.permissions th:not(:first-child){text-align:center}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.form-grid .wide{grid-column:1/-1}
.form-stack{display:grid;gap:12px}
dialog{margin:auto;max-height:90dvh;width:min(725px,calc(100% - 20px));max-width:none;border:1px solid var(--line);border-radius:16px;color:var(--navy);padding:18px;box-shadow:0 22px 85px #0b224554}
dialog::backdrop{background:#1025468c}
dialog header{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:15px}
#auth{min-height:100dvh;display:grid;place-items:center;padding:20px;background:radial-gradient(ellipse at 14% 15%,#dae9fc,#edf3fa 65%)}
#auth>.panel{width:min(100%,420px);padding:26px;display:grid;gap:21px}
#auth .brand{padding:0}
#auth .brand img{width:46px;height:48px}
#menu{display:none;margin-bottom:8px}
.preview{display:block;max-width:100%;max-height:200px;border-radius:10px}
.note{margin-bottom:12px;padding:10px 12px;background:#f1f6fd;border-radius:9px;color:var(--muted)}
summary{cursor:pointer;font-weight:650}
pre{white-space:pre-wrap;font-size:.83rem;overflow-wrap:anywhere}
@media(max-width:850px){
 #workspace{display:block}
 #menu{display:inline-flex}
 #rail{display:none;position:relative;height:auto;border-right:0;border-bottom:1px solid var(--line);padding:14px;gap:12px}
 body.menu-open #rail{display:flex}
 nav{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
 .identity{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap}
 main{padding-top:17px}
}
@media(max-width:530px){
 .form-grid{grid-template-columns:1fr}
 #period{width:100%}
 #period label{flex:1;min-width:130px}
 #period input,#period select{width:100%}
 .record-title{display:block}
 button,.button{min-height:44px}
}
