.budget-workspace{display:grid;gap:1.35rem;color:var(--text)}
.budget-workspace .panel{padding:1.5rem;min-width:0}
.budget-workspace h3{margin:1.7rem 0 .7rem}
.budget-workspace label{display:grid;gap:.4rem;font-size:.9rem;align-content:start}
.budget-workspace input:not([type=checkbox]),.budget-workspace select,.budget-workspace textarea{width:100%;box-sizing:border-box;border:1px solid var(--field-border);border-radius:.65rem;min-height:2.6rem;padding:.6rem .7rem;background:var(--surface);color:inherit;font:inherit}
.budget-workspace textarea{min-height:5rem}
.budget-workspace input:disabled,.budget-workspace select:disabled{opacity:.75;background:var(--surface-soft)}
.budget-actions{display:flex;flex-wrap:wrap;align-items:end;gap:.65rem}
.budget-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.85rem;align-items:end}
.budget-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}
.budget-metrics article{display:grid;gap:.4rem}
.budget-metrics h2{font-family:inherit;font-size:1.6rem;margin:.2rem 0}
.budget-workspace small{display:block;font-size:.78rem;line-height:1.5;color:var(--muted-strong)}
.budget-table-scroll{overflow-x:auto;margin-top:1rem;max-width:100%}
.budget-table{width:100%;border-collapse:collapse;font-size:.88rem}
.budget-table th{text-align:left;padding:.8rem;border-bottom:2px solid var(--line);color:var(--muted-strong);font-size:.77rem;white-space:nowrap}
.budget-table td{padding:.85rem .8rem;border-bottom:1px solid var(--line);vertical-align:top;min-width:90px}
.budget-table td input:not([type=checkbox]){min-width:95px}
.budget-table td:first-child{min-width:130px}
.budget-table td:has(input[type=checkbox]):first-child{min-width:25px}
.budget-tag{display:inline-flex;padding:.3rem .65rem;border-radius:1rem;background:var(--accent-soft);font-size:.78rem;font-weight:700;white-space:nowrap}
.budget-tabs{display:flex;gap:.4rem;overflow-x:auto;border-bottom:1px solid var(--line);padding-bottom:.5rem}
.budget-tabs button{border:0;background:transparent;color:inherit;padding:.75rem 1rem;white-space:nowrap;border-radius:.65rem;font:inherit;cursor:pointer}
.budget-tabs button.active{background:var(--accent);color:var(--on-accent)}
.budget-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:1rem}
.budget-wide{grid-column:1/-1}
.budget-fieldset{border:0;padding:0;margin:0;min-width:0}
.budget-check{display:flex!important;align-items:center;gap:.65rem!important;margin:1rem 0}
.budget-check input{width:1.1rem;height:1.1rem}
.budget-line-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:1.2rem}
.budget-line-list{display:grid;align-content:start;gap:.6rem}
.budget-line-choice{display:grid;gap:.35rem;width:100%;text-align:left;background:var(--surface);border:1px solid var(--line);padding:1rem;border-radius:.8rem;color:inherit;font:inherit;cursor:pointer;margin:.4rem 0}
.budget-line-choice.active{border-color:var(--accent);background:var(--surface-soft)}
.budget-line-editor{min-width:0}
.budget-closed,.budget-closed input,.budget-closed strong{color:var(--budget-closed)!important}
.budget-unsigned,.budget-unsigned input,.budget-unsigned strong{color:var(--budget-unsigned)!important}
.budget-open,.budget-open input{color:var(--budget-open)}
.budget-negative{color:var(--danger-ink)!important}
.budget-warning{padding:1rem 1.2rem;border:1px solid var(--warning-border);background:var(--warning-soft);border-radius:.85rem;margin:.7rem 0;color:var(--warning-ink)}
.budget-warning p{margin:.3rem 0}
.budget-warning-text{color:var(--warning-ink)!important;margin-top:.4rem}
.budget-private-banner{padding:1rem;border:1px solid var(--budget-private-border);background:var(--budget-private-bg);border-radius:.7rem;color:var(--budget-unsigned)}
.budget-save-bar{display:flex;align-items:end;gap:1rem;border-top:1px solid var(--line);margin-top:1.5rem;padding-top:1rem}
.budget-save-bar label{flex:1}
.budget-repeater{border:1px solid var(--line);border-radius:.8rem;padding:1rem;margin:1rem 0;align-items:end}
.budget-month-strip{display:flex;overflow-x:auto;gap:1rem;padding:1rem 0}
.budget-month-strip label{min-width:140px}
.budget-timeline{border-left:2px solid var(--timeline-line);padding-left:1.2rem}
.budget-timeline article{border-bottom:1px solid var(--line);padding:1rem 0}
.budget-timeline time{display:block;color:var(--muted-strong);font-size:.8rem}
.budget-upload{position:relative;border:2px dashed var(--field-border);border-radius:1rem;min-height:110px;padding:1.5rem;display:grid;align-content:center!important;cursor:pointer}
.budget-upload input[type=file]{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.budget-total{font-weight:700;background:var(--surface-soft)}
.budget-floater{position:fixed;right:1.5rem;bottom:1.5rem;max-width:440px;z-index:1000;box-shadow:var(--shadow-popover);background:var(--warning-soft);border:1px solid var(--warning-border);border-radius:1rem;padding:1rem 1.3rem;color:var(--warning-ink)}
.budget-workspace details.panel>summary{font-weight:700;cursor:pointer}
.budget-workspace details[open]>summary{margin-bottom:1rem}
.staff-cost-layout{display:grid;grid-template-columns:290px minmax(0,1fr);gap:1.35rem;align-items:start}
.staff-cost-roster{position:sticky;top:1rem;max-height:82vh;overflow:auto}
.staff-cost-roster h2{font-size:1.2rem;margin:.2rem 0 1rem}
.staff-cost-person{display:flex;align-items:center;gap:.85rem;width:100%;padding:.95rem .7rem;margin:.35rem 0;border:1px solid transparent;border-radius:.9rem;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer}
.staff-cost-person.active{background:var(--accent-soft);border-color:var(--accent)}
.staff-cost-person:hover{border-color:var(--field-border)}
.staff-cost-avatar{display:grid;place-items:center;flex:0 0 2.7rem;height:2.7rem;border-radius:.9rem;background:var(--surface-soft);color:var(--accent);font-weight:700;font-size:.85rem}
.staff-cost-person strong{font-size:.9rem}
.staff-cost-detail{min-height:540px}
.staff-cost-profile-heading{display:flex;justify-content:space-between;align-items:start;gap:1rem;margin-bottom:1.6rem}
.staff-cost-profile-heading h2{margin:.4rem 0}
.staff-cost-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;margin-bottom:1.2rem}
.staff-cost-kpis article{display:grid;gap:.6rem;padding:1.3rem;border:1px solid var(--line);border-radius:1rem;background:var(--surface-soft)}
.staff-cost-kpis article>span{font-size:.8rem;color:var(--muted-strong)}
.staff-cost-kpis article>strong{font-size:1.8rem;letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.staff-cost-kpis .staff-cost-highlight{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
.staff-cost-kpis .staff-cost-highlight>span,.staff-cost-kpis .staff-cost-highlight small{color:var(--on-accent)}
.staff-cost-calculation{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--line);border-radius:1rem;margin:1rem 0;overflow:hidden}
.staff-cost-calculation>div{display:grid;gap:.55rem;padding:1.1rem;border-right:1px solid var(--line)}
.staff-cost-calculation>div:last-child{border-right:0}
.staff-cost-calculation span{font-size:.75rem;color:var(--accent);font-weight:700}
.staff-cost-comparisons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.2rem 1.5rem;padding:.3rem 0}
.staff-cost-comparisons p{font-size:.8rem;color:var(--muted-strong)}
.staff-cost-comparisons strong{display:block;font-size:1.1rem;color:var(--text);padding:.3rem 0;font-variant-numeric:tabular-nums}
.staff-cost-inputs{padding:1.1rem 0;border-top:1px solid var(--line);margin:.5rem 0}
.staff-cost-inputs summary{font-weight:700;cursor:pointer;margin-bottom:1.2rem}
.staff-cost-source{padding:1rem;background:var(--surface-soft);border-radius:.8rem;font-size:.8rem;overflow-wrap:anywhere}
.staff-cost-apply{border:1px solid var(--budget-private-border);background:var(--budget-private-bg);border-radius:1rem;padding:1.3rem;margin-bottom:1.3rem}
.staff-cost-apply .budget-form-grid{margin:1rem 0}
.staff-cost-empty{display:grid;align-content:center;min-height:400px;max-width:550px;margin:auto}
@media(max-width:1200px){.staff-cost-layout{grid-template-columns:235px minmax(0,1fr)}.staff-cost-calculation{grid-template-columns:1fr}.staff-cost-calculation>div{border-right:0;border-bottom:1px solid var(--line)}.staff-cost-calculation>div:last-child{border-bottom:0}}
@media(max-width:850px){.staff-cost-layout{grid-template-columns:1fr}.staff-cost-roster{position:static;max-height:330px}.staff-cost-detail{min-height:0}}
@media(max-width:520px){.staff-cost-kpis,.staff-cost-comparisons{grid-template-columns:1fr}.staff-cost-profile-heading{flex-direction:column}}
@media(max-width:1050px){.budget-line-layout{grid-template-columns:1fr}
.budget-line-list{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
}
@media(max-width:650px){.budget-workspace .panel{padding:1rem}
.budget-save-bar{align-items:stretch;flex-direction:column}
.budget-metrics{grid-template-columns:1fr}
.budget-form-grid{grid-template-columns:1fr}
.budget-floater{left:1rem;right:1rem;bottom:1rem}
.budget-tabs{margin-right:-.5rem}
}
