@font-face{font-family:Inter;src:url('/inter.woff') format('woff');font-style:normal;font-weight:100 599;font-display:swap}
@font-face{font-family:Inter;src:url('/inter-bold.woff') format('woff');font-style:normal;font-weight:600 900;font-display:swap}
:root{color-scheme:light;--ink:#21182c;--muted:#6a6076;--brand:#502781;--purple:#7545ab;--dark:#211630;--base:#f6f3fa;--line:#e9e1ef;--soft:#f4ecfb;--paper:#fff;--green:#176451;--red:#a02d4f;--amber:#8b531a;font:14px/1.45 Inter,system-ui,sans-serif;color:var(--ink);background:var(--base)}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0}
h1,h2,h3,p{margin:0}
h1{font-size:clamp(31px,4.8vw,47px);line-height:1.08;letter-spacing:-.06em}
h2{font-size:17px;letter-spacing:-.03em}
h3{font-size:14px}
small,.muted{color:var(--muted)}
a{color:var(--brand)}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
button:disabled{cursor:wait;opacity:.65}
:focus-visible{outline:3px solid #a674d9;outline-offset:3px}
.masthead{position:sticky;top:0;z-index:3;background:var(--dark);color:white;box-shadow:0 3px 18px #27173512}
.mast-inner{max-width:1440px;min-height:70px;margin:auto;padding:0 clamp(16px,4vw,54px);display:flex;align-items:center;gap:clamp(12px,3.8vw,54px)}
.brand{display:inline-flex;align-items:center;flex:none;gap:11px;text-decoration:none;color:white;font-weight:700;white-space:nowrap}
.brand img{width:59px;height:auto}
.brand span{border-left:1px solid #6a547c;padding-left:11px}
nav{align-self:stretch;display:flex;gap:18px;align-items:stretch}
nav a{display:grid;place-items:center;text-align:center;padding:0 6px;text-decoration:none;color:#e5d9ee;white-space:nowrap;font-size:13px;border-bottom:3px solid transparent}
nav a:hover,nav a[aria-current=page]{color:white;border-color:#bf91ef}
.account{margin-left:auto;display:flex;align-items:center;gap:10px;min-width:0}
.account-name{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.account-name small{color:#d0bedf;display:block;font-size:10px}
.avatar{width:34px;height:34px;flex:none;border-radius:50%;background:#553871;color:#fff;display:grid;place-items:center;font-weight:700}
.logout{color:#e0cdee;font-size:12px;text-decoration:none}
main{max-width:1440px;margin:auto;padding:30px clamp(16px,4vw,54px) 54px}
.hero{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin:1px 0 25px}
.hero p{color:var(--muted);margin-top:8px}
.button,.icon-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid transparent;border-radius:9px;padding:9px 14px;background:var(--brand);color:white;text-decoration:none;font-weight:700;white-space:nowrap}
.button:hover{background:#412164}
.secondary,.icon-btn{background:white;border-color:#e4d9ec;color:var(--brand)}
.secondary:hover,.icon-btn:hover{background:#f3ebfa}
.icon-btn{width:36px;height:36px;font-size:21px;padding:0}
.destructive{background:#8f2646}
.destructive:hover{background:#78223b}
.link{vertical-align:baseline;border:0;background:none;color:var(--brand);padding:0;font:inherit;font-weight:700;text-align:left;text-decoration:none}
.link:hover{text-decoration:underline}
.kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:17px}
.panel,.kpi{background:var(--paper);border:1px solid var(--line);border-radius:15px;box-shadow:0 3px 9px #28134205}
.kpi{display:block;text-align:left;padding:13px 13px 12px;min-width:0}
button.kpi:hover{border-color:#be9adc}
.kpi-top{display:flex;align-items:center;justify-content:space-between;gap:4px;font-weight:700;font-size:11px}
.k-icon{min-width:26px;min-height:26px;display:grid;place-items:center;border-radius:8px;background:var(--soft);color:var(--brand);font-size:14px}
.kpi-value{display:block;font-size:28px;letter-spacing:-.055em;line-height:1.16;margin:8px 0 4px;font-weight:700;font-variant-numeric:tabular-nums}
.kpi small{display:block;font-size:10px;white-space:normal}
.kpi small.red,.red,.error{color:var(--red)}
.grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:15px;margin-bottom:17px}
.panel{padding:17px;min-width:0}
.panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:13px;margin-bottom:14px}
.panel-head p{font-size:12px;margin-top:3px;color:var(--muted)}
.legend{display:flex;gap:11px;flex-wrap:wrap;font-size:10px;color:var(--muted);padding-top:5px}
.legend i{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:4px}
.chart-scroll{overflow:auto}
.chart{min-width:445px;margin-top:9px}
.chart-inner{height:176px;display:grid;grid-template-columns:28px minmax(0,1fr);grid-template-rows:1fr 29px}
.chart-axis{display:flex;flex-direction:column;justify-content:space-between;text-align:right;padding-right:8px;line-height:.8;font-size:10px;color:var(--muted)}
.chart-plot,.chart-months{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:3px}
.chart-plot{background:repeating-linear-gradient(to top,#ece5f0 0px,#ece5f0 1px,transparent 1px,transparent 25%);border-top:1px solid #ece5f0}
.bar-group{display:flex;align-items:end;justify-content:center;gap:2px;min-width:0}
.bar{width:22%;max-width:13px;min-width:4px;border-radius:3px 3px 0 0;height:var(--bar);background:var(--tone)}
.chart-months span{text-align:center;align-self:center;font-size:10px;color:var(--muted);white-space:nowrap}
.deadline{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--line)}
.deadline:first-child{padding-top:0}
.deadline:last-child{border-bottom:0}
.deadline div{min-width:0}
.deadline div small{display:block;font-size:11px;overflow-wrap:anywhere}
.pill{border-radius:999px;background:#eee5f8;color:#562f84;display:inline-block;padding:3px 8px;font-size:11px;font-weight:700;white-space:nowrap}
.pill.red{background:#f9e6ed;color:var(--red)}
.pill.green{background:#e5f4ed;color:var(--green)}
.pill.amber{background:#fbefdb;color:var(--amber)}
.pill.gray{background:#ede9f1;color:#665a72}
.table-scroll{overflow:auto}
table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}
td,th{padding:11px 8px;border-bottom:1px solid #f0eaf3;vertical-align:middle}
th{white-space:nowrap;background:#f8f4fb;color:#554a65;font-size:11px;font-weight:700}
th:first-child{border-radius:7px 0 0 0}
th:last-child{border-radius:0 7px 0 0}
td:first-child,td.limits{white-space:nowrap}
td.subject{min-width:135px}
tbody tr:hover{background:#fcfafd}
tbody tr:last-child td{border:0}
tbody tr.late{background:#fff9fa}
tbody tr.void td:first-child .link{text-decoration:line-through;color:#6b6073}
td small{display:block;font-size:10px}
.empty{padding:24px 9px;text-align:center;color:var(--muted)}
.empty strong{display:block;font-size:13px;color:var(--ink);margin-bottom:3px}
.empty-icon{display:grid;place-items:center;margin:0 auto 8px;background:var(--soft);color:var(--brand);border-radius:12px;width:34px;height:34px}
.filters{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:14px}
.filters .query{grid-column:span 2}
.filters label,.form-grid label,.confirm-dialog label,.admin-form label{display:grid;gap:4px;font-size:12px;font-weight:700}
input:not([type=checkbox]):not([type=file]),select,textarea{width:100%;border:1px solid #dfd6e7;border-radius:8px;background:white;padding:8px 9px;min-width:0;min-height:36px}
textarea{resize:vertical}
form input[type=checkbox]{accent-color:var(--brand)}
.toolbar,.pager,.form-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.toolbar{justify-content:space-between;padding:0 0 12px}
.pager{justify-content:flex-end;margin-top:13px}
.actions{display:flex;gap:7px;flex-wrap:wrap;align-items:center}
.drawer{position:fixed;margin:0 0 0 auto;right:0;left:auto;top:0;bottom:0;width:min(680px,100%);max-width:none;height:100dvh;max-height:none;border:0;padding:0;color:var(--ink);background:white;box-shadow:-15px 0 52px #21163033}
.drawer[open]{display:grid;grid-template-rows:auto minmax(0,1fr)}
dialog::backdrop{background:#23183072}
.drawer-bar{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding:17px 22px;border-bottom:1px solid var(--line)}
.drawer-bar h2{font-size:25px}
.drawer-bar p{font-size:12px;color:var(--muted);margin-top:3px}
.drawer-body{overflow:auto;padding:19px 22px 30px}
.detail-top{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.detail-section{margin:20px 0 0;padding:16px 0 0;border-top:1px solid var(--line)}
.detail-section h3{margin-bottom:9px}
dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin:0}
dt{font-size:11px;font-weight:700;color:var(--muted)}
dd{margin:3px 0 0;overflow-wrap:anywhere;white-space:pre-wrap}
.file-list,.history-list,.help-list{list-style:none;margin:0;padding:0}
.file-row,.history-list li{display:flex;gap:9px;align-items:center;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--line);font-size:12px}
.file-row:last-child,.history-list li:last-child{border:0}
.file-row .file-info{display:flex;align-items:center;gap:9px;min-width:0}
.file-row strong{display:block;word-break:break-word}
.file-thumb{width:35px;height:40px;border-radius:6px;object-fit:cover;background:var(--soft);display:grid;place-items:center;color:var(--brand);flex:none;font-size:10px;font-weight:700}
.file-tools a,.file-tools button{font-size:11px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.form-grid .wide{grid-column:1/-1}
.form-grid label.check,.admin-form label.check{display:flex;align-items:center;gap:8px}
.segment{display:flex;gap:6px;background:#f6f0fa;padding:4px;border-radius:10px;margin-bottom:14px}
.segment label{flex:1;cursor:pointer;position:relative}
.segment input{position:absolute;opacity:0}
.segment label span{display:block;text-align:center;padding:8px;border-radius:8px;font-weight:700;color:var(--brand)}
.segment input:focus-visible+span{outline:2px solid var(--purple)}
.segment input:checked+span{background:var(--brand);color:white}
.drop{margin:16px 0 7px;background:#f9f5fc;border:1px dashed #b99ad0;border-radius:10px;text-align:center;padding:15px 9px}
.drop[data-over=true]{background:#eeDdf9}
.drop p{color:var(--muted);font-size:12px;margin:4px 0 9px}
.drop .actions{justify-content:center}
.upload-item{padding:7px 0;border-bottom:1px solid var(--line)}
.upload-item progress{width:100%;height:10px;accent-color:var(--purple)}
.form-actions{justify-content:flex-end;margin-top:15px}
.error:empty{display:none}
.error{margin:10px 0;font-size:12px}
.notice{padding:9px 11px;background:var(--soft);color:var(--brand);border-radius:8px;margin:0 0 13px;font-size:12px}
.confirm-dialog{max-width:min(420px,calc(100% - 22px));width:100%;border:1px solid var(--line);border-radius:13px;padding:19px;color:var(--ink)}
.confirm-dialog p{margin:5px 0 12px;color:var(--muted)}
.help-list li{padding:11px 0;border-bottom:1px solid var(--line)}
.help-list li:last-child{border:0}
.help-list p{margin-top:4px;color:var(--muted)}
.splash{margin:50px auto;padding:30px;max-width:480px;text-align:center;background:white;border:1px solid var(--line);border-radius:15px}
.splash .button{margin-top:15px}
.admin-form{display:grid;gap:10px;align-items:end;margin:8px 0 15px}
.config-table{margin-top:12px}
#toast{position:fixed;z-index:5;bottom:17px;right:17px;max-width:calc(100vw - 34px);padding:11px 16px;background:var(--dark);color:white;box-shadow:0 5px 19px #24193333;border-radius:9px}
@media(max-width:1060px){.kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.account-name{display:none}}
@media(max-width:750px){.mast-inner{flex-wrap:wrap;gap:0;min-height:56px;padding:6px 15px 0}.mast-inner nav{order:3;width:100%;overflow:auto;gap:9px;min-height:42px}.account{gap:6px}.grid{grid-template-columns:1fr}.hero{align-items:flex-start}.filters{grid-template-columns:repeat(3,minmax(0,1fr))}.filters .query{grid-column:1/-1}}
@media(max-width:420px){main{padding-top:19px}.hero{flex-wrap:wrap;margin-bottom:16px}.kpis{gap:6px}.kpi{padding:8px}.kpi-top{font-size:9px}.k-icon{min-width:19px;min-height:20px}.kpi-value{font-size:22px}.panel{padding:12px}.drawer-bar,.drawer-body{padding-left:14px;padding-right:14px}.account .avatar{display:none}.filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
.login-page{min-height:100dvh;display:grid;place-items:center;padding:20px;background:#f6f2fa}
.login-card{width:min(420px,100%);padding:38px 39px;border-radius:18px;background:white;border:1px solid var(--line);box-shadow:0 15px 42px #29114712;margin:0}
.login-brand{width:max-content;max-width:100%;padding:9px 11px;background:var(--dark);border-radius:10px;margin-bottom:23px}
.login-brand img{width:66px}
.login-card h1{font-size:31px}
.login-card .sub{margin-top:6px;color:var(--muted)}
.login-card form{display:grid;gap:12px;margin-top:21px}
.login-card label{display:grid;gap:4px;font-weight:700;font-size:13px}
.login-card input{min-height:38px}
.login-card .error{margin:0}
.login-card .link{display:block;text-align:left;margin-top:15px}
button.logout{background:transparent;border:0;padding:5px}
@media(max-width:450px){.login-card{padding:27px}}

.procurement { --paper:#fff; --base:#f5f2f9; }
.procurement .mast-inner{max-width:1500px}
.procurement main{max-width:1500px}
.procurement .hero h1{font-size:clamp(30px,4vw,49px);overflow-wrap:anywhere}
.procurement .hero-actions,.action-row{display:flex;flex-wrap:wrap;gap:8px}
.bare{border:0;background:transparent}
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin:0 0 17px}
.metric{padding:16px 17px 14px;text-decoration:none;color:var(--ink)}
.metric:hover{border-color:#b98bd8}
.metric strong{display:block;font-size:clamp(20px,2.35vw,35px);line-height:1.25;letter-spacing:-.055em;margin:9px 0 4px;overflow-wrap:anywhere}
.metric small{font-size:12px}
.metric .kpi-top{color:#584b62;font-size:12px;line-height:1.2;gap:9px}
.metric-icon{background:#f0e5fa;color:#61358e;border-radius:8px;padding:5px;min-width:26px;text-align:center}
.chart-grid{display:grid;grid-template-columns:minmax(0,1.22fr) minmax(0,1fr);gap:16px}
.procurement .panel{padding:20px;margin-bottom:16px}
.bars{display:grid;gap:12px;padding:4px 0}
.bar-row{display:grid;grid-template-columns:minmax(70px,1fr) minmax(35px,1.5fr) minmax(30px,auto);align-items:center;gap:10px;font-size:12px}
.bar-row strong{text-align:right;font-variant-numeric:tabular-nums}
.bar-row meter{width:100%;height:9px;display:block;appearance:none;background:#f0e9f7;border-radius:7px;overflow:hidden}
meter::-webkit-meter-bar{background:#f0e9f7;border:0;box-shadow:none;height:9px}
meter::-webkit-meter-optimum-value{background:#8353b1;border-radius:7px}
meter::-moz-meter-bar{background:#8353b1;border-radius:7px}
meter.blue::-webkit-meter-optimum-value{background:#5864a6}
meter.blue::-moz-meter-bar{background:#5864a6}
meter.gold::-webkit-meter-optimum-value{background:#a27137}
meter.gold::-moz-meter-bar{background:#a27137}
.procurement .table-wrap{overflow:auto}
.procurement table{width:100%;border-collapse:collapse;font-size:13px}
.procurement th,.procurement td{padding:11px 9px;text-align:left;border-bottom:1px solid #eee9f3}
.procurement th{color:#67576e;background:#f8f5fa;font-size:11px;white-space:nowrap}
.procurement td:first-child{min-width:115px}
.procurement td:has(input):first-child{min-width:20px}
.procurement .align-right{text-align:right}
.procurement .amount{white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:700}
.code{display:block;color:#6e5c80;font-size:11px;font-weight:600;margin-top:3px}
.purchase-title{font-weight:700;text-decoration:none}
.purchase-title:hover{text-decoration:underline}
.status{display:inline-flex;padding:4px 8px;border-radius:7px;white-space:nowrap;font-size:11px;font-weight:700;background:#efebf2;color:#594963}
.status.purple{background:#efe3fc;color:#5d3288}.status.blue{background:#e8edfb;color:#36457c}
.status.amber{background:#f9eddd;color:#79501f}.status.green{background:#e4f4eb;color:#245c44}.status.red{background:#f8e6ec;color:#963456}
.urgent{margin-left:5px;color:#8e3b54}
.procurement .empty{border:1px dashed #e0d4eb;border-radius:10px;padding:20px;background:#fbf9fd;color:#6e5f7b;text-align:left}
.filters{display:grid;grid-template-columns:minmax(200px,2fr) minmax(140px,1fr) minmax(140px,1fr) auto;align-items:end;gap:12px}
.procurement label,.dialog-form label{display:grid;gap:6px;font-weight:700;font-size:12px}
.procurement input:not([type=checkbox]),.procurement select,.procurement textarea{width:100%;min-width:0;min-height:40px;padding:8px 10px;border:1px solid #ded3e6;border-radius:8px;background:#fff}
.procurement input[type=checkbox]{accent-color:#6b3aa3;width:15px;height:15px;flex:none}
.procurement textarea{resize:vertical}
.procurement .check-label{display:flex;align-items:center;gap:7px;min-height:40px}
.result-meta{margin:17px 0 8px;color:var(--muted);font-size:12px}
.pagination{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:11px;margin-top:12px;font-size:12px;color:var(--muted)}
.form-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(245px,1fr);gap:16px}
.form-layout aside{align-self:start;position:sticky;top:88px}
.fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.wide{grid-column:1/-1}
.item-row{display:grid;grid-template-columns:minmax(110px,2fr) minmax(65px,.8fr) minmax(83px,1fr) 65px 36px;gap:8px;align-items:end;margin-bottom:9px}
.item-row .icon-btn{min-height:40px}
.totals{margin:0 0 23px}
.totals div{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid var(--line)}
.totals div:last-child{font-weight:800;font-size:17px}
.totals dd,.info-grid dd{margin:0;overflow-wrap:anywhere}
.steps{list-style:none;padding:0;margin:10px 0;display:grid;gap:8px}
.steps li{display:flex;align-items:center;gap:8px;color:#63546c}
.steps li>span{display:grid;place-items:center;min-width:27px;height:27px;border-radius:50%;background:#eee7f5;font-weight:800;color:#644480}
.steps small{display:block;font-size:11px}
.steps.flow{display:flex;flex-wrap:wrap;gap:10px}
.steps.flow li{background:#f8f5fb;padding:10px 12px;border-radius:9px;flex:1;min-width:160px}
.steps li.current{background:#eee2fd;color:#57267e}.steps li.complete{background:#eaf5ee;color:#235f43}
.steps li.complete>span{background:#d5eddd;color:#245d43}
.form-actions{display:grid;gap:8px}
.form-error{color:#963456;margin:8px 0}
.form-error:empty{display:none}
.detail-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.detail-cols{grid-template-columns:minmax(0,1.55fr) minmax(0,1fr)}
.info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}
.info-grid dt{font-size:11px;color:var(--muted);margin-bottom:3px}
.info-grid dd{font-weight:650}
.table-wrap+.info-grid{margin-top:14px}
.justification{margin-top:15px}.justification p{margin-top:5px;white-space:pre-wrap;overflow-wrap:anywhere}
.document-list,.timeline{list-style:none;padding:0;margin:0 0 8px}
.document-list li,.document-list div{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.timeline li{border-left:2px solid #e5d6f2;padding:0 0 13px 13px;font-size:12px}
.timeline li:last-child{padding-bottom:0}
.timeline small{display:block;margin:3px 0;overflow-wrap:anywhere}
.timeline p{white-space:pre-wrap;overflow-wrap:anywhere}
.procurement dialog{border:1px solid var(--line);padding:23px;border-radius:16px;background:white;color:var(--ink);width:min(540px,calc(100% - 28px));max-height:85vh;box-shadow:0 20px 75px #21163044}
.procurement dialog::backdrop{background:#21163080}
.procurement dialog h2{padding-right:36px;margin:0 0 12px;overflow-wrap:anywhere}
.close-dialog{position:absolute;right:10px;top:10px}
.dialog-form{display:grid;gap:11px;margin-top:12px}
.dialog-form .button{justify-self:start}
.notice-body{margin:12px 0}
.lot-actions,.invite-code{margin-top:13px;margin-bottom:10px}
.settings-sub,.team-list{margin-top:18px}.settings-sub+div{margin:10px 0 15px}
#member-form>.action-row{margin-top:12px}
.toast{position:fixed;right:18px;bottom:18px;z-index:5;max-width:min(390px,calc(100% - 36px));padding:13px 17px;background:#321d46;color:white;border-radius:9px;box-shadow:0 8px 30px #21163044}
@media(max-width:930px){.filters{grid-template-columns:repeat(2,minmax(0,1fr))}.chart-grid{gap:13px}.metric{padding:11px}}
@media(max-width:710px){.chart-grid,.form-layout{grid-template-columns:1fr}.form-layout aside{position:static}.metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.procurement .panel{padding:14px}.chart-grid{gap:0}}
@media(max-width:410px){.fields,.filters{grid-template-columns:1fr}.item-row{grid-template-columns:repeat(2,minmax(0,1fr));border-bottom:1px solid var(--line);padding-bottom:8px}.item-row label:first-child{grid-column:1/-1}.metric small{font-size:11px}.procurement .hero-actions{width:100%}}
