:root{--navy:#152c37;--ink:#20333d;--muted:#667780;--line:#dce3e5;--green:#246452;--pale:#eaf2ee;--gold:#b78c43}*{box-sizing:border-box}body{margin:0;background:#f6f8f8;font:14px/1.5 system-ui,sans-serif;color:var(--ink)}aside{position:fixed;inset:0 auto 0 0;width:242px;background:var(--navy);color:#fff;padding:30px 22px;display:flex;flex-direction:column}.brand{display:flex;gap:12px;align-items:center;font-weight:700;font-size:13px;letter-spacing:1.2px}.brand small{display:block;font-size:9px;color:#b5c6cb;letter-spacing:1.6px;margin-top:4px}.shield{display:grid;place-items:center;width:40px;height:47px;background:#b99757;color:#162e38;clip-path:polygon(0 0,100% 0,100% 70%,50% 100%,0 70%);font:700 27px Georgia}.workspace{font-size:10px;color:#9eb4bd;letter-spacing:1.6px;margin:42px 0 14px}nav button{display:block;width:100%;text-align:left;border:0;background:none;color:#c1d0d5;padding:13px 15px;margin:4px 0;border-radius:6px;font-size:14px}nav button.active{background:#2d4752;color:white;box-shadow:inset 3px 0 #c3a266}nav button:hover{background:#29424e}.aside-bottom{margin-top:auto;font-size:12px;color:#bdcdd1}.aside-bottom p{font-size:11px;color:#8ca6b0}.dot{display:inline-block;width:7px;height:7px;background:#94b89f;border-radius:50%;margin-right:7px}main{margin-left:242px}header{height:82px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 38px;gap:14px}.crumb{margin-right:auto;color:var(--muted);font-size:12px}.switch{display:flex;gap:10px;align-items:center;font-size:11px}.notice{padding:11px 38px;background:#f1eee6;font-size:11px;color:#6d614a;display:flex;gap:10px;align-items:center}.notice span{font-size:9px;letter-spacing:1px;border:1px solid #bcae91;border-radius:3px;padding:1px 5px}.notice button{margin-left:auto}#content{padding:32px 38px;min-height:75vh}.eyebrow{font-size:10px;letter-spacing:1.8px;color:var(--green);font-weight:700;text-transform:uppercase}h1{font:500 34px/1.2 Georgia,serif;margin:8px 0 10px}h2{font-size:19px;font-weight:650;margin:0 0 8px}h3{font-size:15px;margin:0 0 6px}p{color:var(--muted);margin:6px 0 16px}.title-row{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:25px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:25px 0 28px}.stat{padding:21px;background:white;border:1px solid var(--line);border-radius:8px}.stat label{display:block;font-size:11px;color:var(--muted)}.stat strong{display:block;font-size:27px;font-weight:550;margin-top:6px}.stat.green{background:var(--green);color:white;border-color:var(--green)}.stat.green label{color:#d4e6dd}.toolbar{display:flex;align-items:center;gap:10px;margin:22px 0}.toolbar input{max-width:320px}.toolbar .spacer{margin-left:auto}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.card{background:white;border:1px solid var(--line);border-radius:9px;overflow:hidden}.card-body{padding:20px}.product-art{height:160px;background:#ecf0ef;display:grid;place-items:center;position:relative;overflow:hidden}.product-art svg{height:130px;width:130px;filter:drop-shadow(0 8px 5px #0c23351c)}.product-art img{position:absolute;inset:0;display:block;width:100%;height:100%;min-width:0;min-height:0;object-fit:contain;object-position:center}.product-art .badge{position:absolute;z-index:1;left:14px;top:12px}.price{font-size:21px;font-weight:650}.card p{font-size:12px;min-height:37px}.meta{font-size:11px;color:var(--muted)}.row{display:flex;align-items:center;gap:12px}.between{justify-content:space-between}.card button{margin-top:15px;width:100%}button{cursor:pointer;font:inherit;border-radius:5px;border:1px solid var(--line);padding:9px 14px;background:white;color:var(--ink)}button:hover{filter:brightness(.96)}button.primary{background:var(--green);border-color:var(--green);color:white}button.danger{color:#a34137;border-color:#e0c6c0}button.link{border:0;background:none;padding:0;text-decoration:underline;font-size:inherit;color:inherit}button:disabled{opacity:.45;cursor:not-allowed}input,select,textarea{border:1px solid #ccd6da;border-radius:5px;background:white;padding:9px 10px;color:var(--ink);font:inherit;max-width:100%}input,textarea{width:100%}input[type=checkbox]{width:auto}textarea{min-height:76px;resize:vertical}label.field{display:block;font-size:12px;font-weight:600;margin:13px 0}label.field input,label.field select,label.field textarea{display:block;width:100%;margin-top:5px;font-weight:400}.fields{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}.panel{background:white;border:1px solid var(--line);border-radius:8px;padding:23px;margin:18px 0}.badge{font-size:10px;font-weight:650;border-radius:4px;padding:4px 7px;background:var(--pale);color:var(--green);display:inline-block}.badge.amber{background:#f7efdb;color:#8c6b2b}.badge.gray{background:#eef0f1;color:#64717a}.badge.red{background:#f6e7e4;color:#963d36}.muted{color:var(--muted)}.empty{padding:55px;text-align:center;border:1px dashed #ccd6da;border-radius:8px;background:white}.empty h2{font:25px Georgia}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:15px}.line-item{border-top:1px solid var(--line);padding:16px 0}.line-item p{font-size:12px;margin:5px 0}.line-head{display:flex;justify-content:space-between;gap:15px}.hint{background:#edf3f2;border-left:3px solid #6d9b87;padding:13px 16px;font-size:12px;margin:16px 0;color:#406050}.warn{background:#faf2df;border-color:#cba24c;color:#856429}table{border-collapse:collapse;width:100%;font-size:12px}th,td{text-align:left;padding:13px 10px;border-bottom:1px solid var(--line)}th{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:var(--muted)}td button{font-size:11px;padding:5px 9px;margin:2px}.table-wrap{overflow:auto}dialog{width:710px;max-width:94vw;max-height:90vh;border:0;border-radius:12px;padding:28px;color:var(--ink);box-shadow:0 20px 100px #10272d55}dialog::backdrop{background:#10272d99}dialog.wide{width:850px}.modal-title{display:flex;justify-content:space-between;align-items:start;margin-bottom:15px}.modal-title button{padding:3px 9px}.custom-field{padding:15px;background:#f5f7f7;border:1px solid var(--line);border-radius:6px;margin:12px 0}.custom-field .fields{grid-template-columns:2fr 1fr 1fr}.timeline{border-left:2px solid #d6e4dd;margin-left:5px;padding-left:18px}.timeline p{font-size:12px;margin-bottom:14px}.timeline small{display:block;color:#849097;font-size:10px}footer{padding:20px 38px;color:#8a979d;font-size:10px;border-top:1px solid var(--line)}footer span{float:right}#toast{position:fixed;bottom:25px;right:25px;background:#183a30;color:white;padding:13px 22px;border-radius:7px;box-shadow:0 4px 20px #0002;display:none;max-width:420px;z-index:10}.toast-error{background:#8a3b32!important}.summary{background:#f3f6f4;border-radius:7px;padding:16px;margin:15px 0}.summary .row{margin:6px 0}a{color:var(--green)}.checkrow{display:flex;gap:8px;align-items:center;font-size:12px;margin:12px 0}.pill-tabs button{padding:6px 12px;border:0;background:transparent}.pill-tabs button.active{background:white;box-shadow:0 1px 4px #0001}.pill-tabs{background:#e8eeeb;border-radius:6px;padding:4px;display:flex}.order-label{font:500 23px Georgia}.small{font-size:11px}@media(min-width:1500px){.grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:1050px){aside{width:190px;padding:25px 15px}main{margin-left:190px}header{padding:15px 22px;flex-wrap:wrap;height:auto}.crumb{width:100%}#content{padding:25px 22px}.notice{padding:10px 22px}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stats{gap:8px}.stat{padding:15px}.stat strong{font-size:23px}}@media(max-width:680px){aside{position:static;width:100%;padding:15px}.brand{font-size:12px}.workspace,.aside-bottom{display:none}nav{display:flex;gap:5px;margin-top:10px;overflow:auto}nav button{white-space:nowrap;font-size:12px;padding:8px;width:auto}main{margin:0}header{padding:12px 16px;gap:8px}.notice{padding:10px 16px;flex-wrap:wrap}.notice button{margin-left:0}#content{padding:25px 16px}.stats{grid-template-columns:1fr 1fr}.grid{grid-template-columns:1fr}.title-row{align-items:start}.title-row h1{font-size:28px}.fields{grid-template-columns:1fr}.custom-field .fields{grid-template-columns:1fr}.toolbar{flex-wrap:wrap}.toolbar .spacer{margin-left:0}.stat strong{font-size:25px}footer span{float:none;display:block}dialog{padding:20px}.switch{font-size:10px}.switch select,#person{font-size:12px}}
.receipt-item{break-inside:avoid;border-bottom:1px solid #ccd5d9;padding:14px 0}.receipt table{width:100%}.receipt p{white-space:pre-line}
@media print{body>aside,body>main,#toast,.modal-title,.no-print{display:none!important}body{display:block;background:white;color:black}dialog[open]{position:absolute;display:block!important;inset:0;max-width:none!important;width:100%;max-height:none!important;border:0;padding:0;overflow:visible}dialog::backdrop{background:white}#modalBody{padding:0}.receipt{font:12px Arial;color:black}.receipt .hint{background:white;border:1px solid #aaa}.receipt h2{font-size:20px}.receipt th,.receipt td{padding:6px}.receipt .summary{background:white}}
.photo-preview{display:flex;align-items:center;gap:20px;margin:16px 0}.photo-preview img{width:140px;height:140px;object-fit:contain;border:1px solid #d6dfe0;border-radius:10px;background:#f4f7f6}
.auth-panel{max-width:480px}.auth-panel .field{margin-bottom:15px}#loginError{color:#a22327;font-weight:600}#account{font-weight:650;color:#17324b}header button[hidden]{display:none}#toast{z-index:9999}

.brand-logos{display:flex;align-items:center;gap:5px;flex-shrink:0}
.dept-logo{display:inline-block;width:42px;height:48px;object-fit:contain;background:#fff;border-radius:4px}
.receipt>.dept-logo{width:62px;height:62px;margin:0 8px 8px 0}
.photo-preview img[hidden],label[hidden],header button[hidden]{display:none}
#mobileNav{display:none}
#resendInvite{margin-top:14px}
#portalSettingsForm>.fields{grid-template-columns:repeat(2,minmax(0,1fr))}
#portalSettingsForm>.fields+.fields,#portalSettingsForm h2:not(:first-child){margin-top:20px}

@media(max-width:680px){
  body{font-size:15px}
  aside{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 12px;padding:12px max(14px,env(safe-area-inset-right)) 12px max(14px,env(safe-area-inset-left))}
  .brand{letter-spacing:.7px;gap:8px;min-width:0}
  .brand small{letter-spacing:1px}
  .dept-logo{width:34px;height:40px}
  #mobileNav:not([hidden]){display:block;min-height:44px;background:#243e49;color:white;border-color:#47616d}
  nav{display:none;grid-column:1/-1;overflow:visible}
  nav.menu-open{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
  nav button{white-space:normal;width:100%;min-height:44px;margin:0;font-size:14px;padding:9px 11px}
  header{height:auto;padding:10px 14px;gap:8px}
  .crumb{display:none}
  #account{flex:0 0 100%;overflow-wrap:anywhere}
  header button{min-height:44px;padding:8px 10px;font-size:14px}
  #content{padding:19px 14px}
  h1,.title-row h1{font-size:27px}
  .title-row{flex-direction:column;gap:9px;margin-bottom:17px}
  .title-row p{margin-bottom:4px}
  .panel,.card-body{padding:14px}
  .stats{gap:8px;margin:15px 0 19px;grid-template-columns:repeat(2,minmax(0,1fr))}
  .stat{padding:12px}
  .stat strong{font-size:clamp(17px,5.2vw,25px);overflow-wrap:anywhere}
  input,select,textarea{font-size:16px;min-height:44px;min-width:0}
  input[type=checkbox]{min-height:0;width:20px;height:20px;flex-shrink:0}
  button,.actions a{min-height:44px}
  .actions,.toolbar,.row.between{flex-wrap:wrap}
  .toolbar input{max-width:none}
  .fields,.custom-field .fields,#portalSettingsForm>.fields{grid-template-columns:minmax(0,1fr)}
  dialog,dialog.wide{width:calc(100% - 20px);max-width:none;max-height:calc(100dvh - 20px);padding:14px;margin:auto}
  .modal-title button{min-width:44px}
  .line-head{flex-wrap:wrap}
  .receipt table{table-layout:fixed;overflow-wrap:anywhere}
  .receipt th,.receipt td{padding:7px 4px}
  .table-wrap{max-width:100%;overflow:auto}
  .mobile-records{overflow:visible}
  .mobile-records table,.mobile-records tbody,.mobile-records tr,.mobile-records td{display:block;width:100%;min-width:0}
  .mobile-records thead{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
  .mobile-records tr{border:1px solid var(--line);border-radius:7px;margin-bottom:10px;padding:9px 11px}
  .mobile-records td{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:5px 0;overflow-wrap:anywhere;white-space:normal;border:0}
  .mobile-records td:first-child,.mobile-records td:last-child{display:block}
  .mobile-records td:last-child button{margin:4px 4px 0 0}
  .users-records td:nth-child(2)::before{content:"Status"}
  .users-records td:nth-child(3)::before{content:"Allowance"}
  .users-records td:nth-child(4)::before{content:"Spent"}
  .users-records td:nth-child(5)::before{content:"Reserved"}
  .users-records td:nth-child(6)::before{content:"Available"}
  .product-records td:nth-child(2)::before{content:"Base price"}
  .product-records td:nth-child(3)::before{content:"Options"}
  .product-records td:nth-child(4)::before{content:"Status"}
  .mobile-records td::before{color:var(--muted);font-size:13px}
  #toast{left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));max-width:none}
  footer{padding:16px 14px}
}
@media print{dialog[open]{width:100%;max-height:none}.receipt>.dept-logo{width:56px;height:56px}}

#contractYears[hidden]{display:none}

.preserve-lines{white-space:pre-line;overflow-wrap:anywhere}
.receipt-links a{overflow-wrap:anywhere}
.report-filters .fields{grid-template-columns:repeat(3,minmax(0,1fr))}
.purchase-report{background:white;border:1px solid var(--line);border-radius:10px;padding:clamp(16px,3vw,36px)}
.report-heading{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;border-bottom:3px solid #b78c43;padding-bottom:12px}
.report-heading h1{margin:4px 0}
.report-heading p{margin:4px 0}
.report-heading .dept-logo{width:52px;height:56px}
.report-context{margin:10px 0 16px}
.report-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 20px}
.report-metrics>div{padding:12px;background:#eef5f2;border:1px solid var(--line);border-radius:6px}
.report-metrics span{display:block;color:var(--muted);font-size:12px}
.report-metrics strong{display:block;font-size:clamp(16px,2vw,25px);overflow-wrap:anywhere}
.report-breakdown{margin-bottom:20px}
.report-bar{margin:6px 0 10px}
.report-track{height:6px;background:#e6efeb;border-radius:4px}
.report-track span{display:block;height:100%;border-radius:4px;background:#246452}
.report-table th,.report-table td{vertical-align:top;overflow-wrap:anywhere}
.report-table .report-money{text-align:right;white-space:nowrap}
.report-note{margin:12px 0 0}
@media(max-width:680px){
  .report-filters .fields{grid-template-columns:minmax(0,1fr)}
  .report-heading{flex-wrap:wrap}
  .report-metrics>div{padding:8px}
}
@media print{
  body.print-purchase-report>main{display:block!important;margin:0}
  body.print-purchase-report main>header,body.print-purchase-report main>footer,
  body.print-purchase-report #content>:not(#purchaseReportResult),
  body.print-purchase-report .report-actions{display:none!important}
  body.print-purchase-report #content{padding:0;min-height:0}
  body.print-purchase-report .purchase-report{border:0;padding:0;color:#172b36;print-color-adjust:exact;-webkit-print-color-adjust:exact}
  body.print-purchase-report .report-heading h1{font-size:24pt}
  body.print-purchase-report .report-heading .dept-logo{width:42px;height:45px}
  body.print-purchase-report .report-metrics,body.print-purchase-report .report-breakdown{break-inside:avoid}
  body.print-purchase-report .table-wrap{overflow:visible}
  body.print-purchase-report .report-table{width:100%;table-layout:fixed}
  body.print-purchase-report .report-table thead{display:table-header-group}
  body.print-purchase-report .report-table th,body.print-purchase-report .report-table td{font-size:9pt;padding:5pt;white-space:normal}
  body.print-purchase-report .report-table th:nth-child(1){width:20%}
  body.print-purchase-report .report-table th:nth-child(2){width:24%}
  body.print-purchase-report .report-table th:nth-child(4){width:15%}
  body.print-purchase-report .report-table tr{break-inside:avoid}
}

.agency-signin{background:#eef2f3}
.agency-signin>aside,.agency-signin main>header,.agency-signin main>footer{display:none}
.agency-signin main{margin:0}
.agency-signin #content{min-height:100vh;min-height:100svh;display:grid;place-items:center;padding:clamp(16px,4vw,56px)}
.agency-auth{display:grid;grid-template-columns:1fr 1fr;width:min(100%,1000px);border-radius:18px;overflow:hidden;background:white;box-shadow:0 20px 65px #152c3722;border:1px solid #dbe3e5}
.agency-auth-brand{padding:clamp(28px,5vw,64px);display:flex;flex-direction:column;justify-content:center;align-items:flex-start;background:linear-gradient(145deg,#10242e,#1e4148);color:#fff}
.agency-auth-logos{display:flex;gap:14px;flex-wrap:wrap;align-items:center;margin-bottom:22px}
.agency-auth-logos .dept-logo{width:clamp(104px,11vw,148px);height:clamp(104px,11vw,148px);padding:8px;border-radius:12px}
.agency-auth-logos .shield{width:112px;height:124px;font-size:68px}
.agency-auth-name{color:#d9c28e;font-size:14px;font-weight:650;margin:0 0 7px}
.agency-auth-brand h2{font:500 clamp(32px,4vw,48px)/1.1 Georgia,serif;margin:0}
.agency-auth-form{padding:clamp(28px,5vw,58px);align-self:center;min-width:0}
.agency-auth-form h1{margin:0 0 6px}
.agency-auth-form>p{margin-bottom:24px}
.agency-auth-form .field{margin-bottom:12px}
.agency-auth-form input:not([type=checkbox]),.agency-auth-form button{min-height:46px;font-size:16px}
.agency-password{display:flex;gap:8px;margin-bottom:12px}
.agency-password input{flex:1;min-width:0}
.agency-submit{width:100%;font-weight:650}
.agency-auth-form #loginError:empty{display:none}
@media(max-width:680px){
  .agency-signin #content{place-items:start center;padding:14px}
  .agency-auth{grid-template-columns:minmax(0,1fr);border-radius:13px}
  .agency-auth-brand{padding:24px}
  .agency-auth-logos{margin-bottom:12px}
  .agency-auth-logos .dept-logo{width:92px;height:92px}
  .agency-auth-logos .shield{width:74px;height:80px;font-size:43px}
  .agency-auth-form{padding:24px}
}
