:root{--bg:#f7f7f2;--paper:#fffef9;--paper-strong:#fff;--ink:#1f2328;--muted:#66707a;--line:#d8d2c4;--line-strong:#232323;--green:#198754;--green-soft:#e7f5ec;--yellow:#946200;--yellow-soft:#fff2bf;--red:#b42318;--red-soft:#fff0ed;--blue:#1f6feb}*{box-sizing:border-box}html,body{min-height:100%}body{color:var(--ink);letter-spacing:0;background:linear-gradient(#f7f7f2,#f7f7f2) padding-box padding-box,repeating-linear-gradient(0deg,#1f232806 0 1px,#0000 1px 24px);margin:0;font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif}button,input,select,textarea{font:inherit}.shell{width:min(1280px,100% - 32px);margin:0 auto;padding:22px 0 56px}.topbar{border-bottom:2px solid var(--line-strong);justify-content:space-between;align-items:center;gap:18px;margin-bottom:18px;padding-bottom:16px;display:flex}.topbar-tools{justify-content:flex-end;align-items:center;gap:10px;min-width:0;display:flex}.brand,.profile-head,.account-chip{align-items:center;gap:12px;display:flex}.mark,.avatar{border:2px solid var(--line-strong);width:44px;height:44px;color:var(--ink);background:#ffe26f;border-radius:7px;place-items:center;font-weight:900;display:grid}.avatar{background:#c9e8ff}.brand h1,.profile-panel h2,.main-panel h2{color:#111;margin:0;font-size:22px;line-height:1.15}.brand p,.profile-panel p,.main-panel p,.account-copy span,td span,.staff-card span,.staff-reference,.bb-link,.muted{color:var(--muted);margin:0;font-size:13px;line-height:1.45}.account-chip{border:1px solid var(--line);background:var(--paper-strong);border-radius:7px;min-width:0;max-width:100%;padding:8px 10px}.account-copy{min-width:0;display:grid}.account-copy strong,.account-copy span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.account-dot{background:var(--green);border-radius:50%;width:10px;height:10px}.button{border:2px solid var(--line-strong);cursor:pointer;border-radius:7px;min-height:36px;padding:0 14px;font-weight:800}.button-primary{background:var(--green);color:#fff}.button-secondary{color:var(--ink);background:#fff;border-width:1px}.login-shell{place-items:center;min-height:100vh;padding:24px;display:grid}.login-panel{border:2px solid var(--line-strong);background:var(--paper);border-radius:9px;width:min(430px,100%);padding:26px}.login-panel h1{margin:18px 0 8px;font-size:34px;line-height:1}.login-panel p{color:var(--muted);margin:0 0 18px;line-height:1.5}.notice{background:var(--red-soft);color:var(--red);border:1px solid #ff9a92;border-radius:7px;margin:0 0 16px;padding:10px 12px;font-size:14px;font-weight:650}.dashboard-grid{grid-template-columns:280px minmax(0,1fr);align-items:start;gap:16px;display:grid}.profile-panel,.main-panel{border:1px solid var(--line);background:var(--paper-strong);border-radius:9px;min-width:0}.profile-panel{border-width:2px;border-color:var(--line-strong);padding:16px;position:sticky;top:16px}.profile-head{border-bottom:1px solid var(--line);align-items:flex-start;padding-bottom:16px}.stat-list{gap:0;margin-top:10px;display:grid}.stat-list>div{border-bottom:1px solid var(--line);justify-content:space-between;gap:12px;padding:11px 0;display:flex}.stat-list>div:last-child{border-bottom:0}.stat-list span,dt{color:var(--muted);font-size:12px;font-weight:700}.stat-list strong{font-size:15px}.grouped-panel,.ledger-panel,.staff-panel,.sync-panel{grid-column:2}.section-title{border-bottom:1px solid var(--line);background:#fffaf0;border-radius:9px 9px 0 0;justify-content:space-between;align-items:flex-start;gap:16px;padding:15px 16px;display:flex}.section-title h2{font-size:21px}.counter{border:1px solid var(--line-strong);color:var(--ink);background:#fff;border-radius:999px;flex-shrink:0;padding:4px 9px;font-size:12px;font-weight:800}.sync-actions{flex-wrap:wrap;justify-content:flex-end;gap:8px;display:flex}.top-sync-actions{flex-wrap:nowrap}button:disabled{cursor:wait;opacity:.62}.sync-overlay{z-index:50;background:#1f23287a;place-items:center;padding:18px;display:grid;position:fixed;inset:0}.sync-modal{border:2px solid var(--line-strong);background:var(--paper-strong);border-radius:9px;width:min(520px,100%);box-shadow:0 22px 70px #1f23283d}.sync-modal-head{border-bottom:1px solid var(--line);background:#fffaf0;border-radius:7px 7px 0 0;justify-content:space-between;align-items:flex-start;gap:14px;padding:17px 18px;display:flex}.sync-modal-head h2{color:#111;margin:0;font-size:22px;line-height:1.15}.sync-modal-head p{color:var(--muted);margin:4px 0 0;font-size:13px;line-height:1.45}.sync-step-list{gap:0;margin:0;padding:8px 18px;list-style:none;display:grid}.sync-step{min-height:46px;color:var(--muted);border-bottom:1px solid #ebe6da;grid-template-columns:30px 1fr;align-items:center;gap:10px;display:grid}.sync-step:last-child{border-bottom:0}.sync-step span{border:1px solid var(--line);width:24px;height:24px;color:var(--muted);background:#f5f4ef;border-radius:50%;place-items:center;font-size:12px;font-weight:900;display:grid}.sync-step strong{font-size:14px}.sync-step-active{color:var(--ink)}.sync-step-active span{background:var(--yellow-soft);color:var(--yellow);border-color:#d6aa35;box-shadow:0 0 0 3px #d6aa3538}.sync-step-complete{color:var(--green)}.sync-step-complete span{background:var(--green-soft);color:var(--green);border-color:#73c78d}.sync-step-error{color:var(--red)}.sync-step-error span{background:var(--red-soft);color:var(--red);border-color:#ff9a92}.sync-modal-actions{justify-content:flex-end;padding:0 18px 18px;display:flex}.table-wrap,.group-table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:14px}th,td{text-align:left;vertical-align:top;border-bottom:1px solid #ebe6da;padding:12px 16px}th{color:#4d5560;font-size:12px;font-weight:850}td{min-width:0}td strong,td span,.bb-link{display:block}.numeric{text-align:right;white-space:nowrap}.pill{border:1px solid var(--line);text-transform:capitalize;white-space:nowrap;border-radius:999px;align-items:center;min-height:24px;padding:2px 8px;font-size:12px;font-weight:800;display:inline-flex}.pill-success{background:var(--green-soft);color:var(--green);border-color:#73c78d}.pill-warning{background:var(--yellow-soft);color:var(--yellow);border-color:#d6aa35}.pill-danger{background:var(--red-soft);color:var(--red);border-color:#ff9a92}.pill-muted{color:var(--muted);background:#f5f4ef}.empty-row{color:var(--muted);text-align:center;padding:32px 16px}.staff-ledger{gap:10px;padding:14px;display:grid}.staff-group{border:1px solid var(--line);background:#fff;border-radius:8px;overflow:hidden}.staff-group[open]{border-color:var(--line-strong)}.staff-group summary{cursor:pointer;grid-template-columns:minmax(180px,1fr) minmax(360px,1.45fr) auto;align-items:center;gap:16px;min-height:72px;padding:12px 14px;display:grid}.staff-group summary:after{border:1px solid var(--line-strong);content:"+";border-radius:50%;justify-self:end;place-items:center;width:28px;height:28px;font-weight:900;display:grid}.staff-group[open] summary:after{content:"-"}.staff-group summary::marker{content:""}.staff-group summary>div:first-of-type{gap:2px;min-width:0;display:inline-grid}.staff-group summary strong,.staff-group summary span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.staff-group summary span{color:var(--muted);font-size:13px}.staff-reference{color:var(--blue);text-overflow:ellipsis;white-space:nowrap;font-weight:750;text-decoration:underline;display:block;overflow:hidden}.bb-link{width:max-content;color:var(--blue);margin-top:3px;font-size:13px;font-weight:800;text-decoration:underline}.staff-group summary dl{grid-template-columns:repeat(4,minmax(78px,1fr));gap:10px;margin:0;display:grid}.staff-group summary dd{margin:2px 0 0;font-weight:850}.group-table-wrap{border-top:1px solid var(--line)}.compact-table th,.compact-table td{padding:10px 14px}.ledger-panel table{table-layout:fixed}.ledger-col-reference{width:13%}.ledger-col-staff{width:14%}.ledger-col-event{width:23%}.ledger-col-date{width:12%}.ledger-col-status{width:15%}.ledger-col-money{width:8%}.ledger-col-paid-date{width:9%}.ledger-panel .status-cell .pill{text-align:center;white-space:normal;justify-content:center;max-width:100%;line-height:1.2}.ledger-panel td strong,.ledger-panel td span{overflow-wrap:anywhere}.empty-group{text-align:center;padding:16px 0}.staff-grid{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px;padding:14px;display:grid}.staff-card{border:1px solid var(--line);background:#fff;border-radius:8px;gap:12px;padding:12px;display:grid}.staff-card>div:first-child{gap:2px;display:grid}.staff-card dl{grid-template-columns:repeat(3,1fr);gap:8px;margin:0;display:grid}.staff-card dt,.staff-card dd{margin:0}.staff-card dd{font-weight:850}.timeline{gap:12px;padding:14px;display:grid}.timeline-row{border-bottom:1px solid var(--line);grid-template-columns:auto 1fr auto;align-items:center;gap:8px 12px;padding-bottom:12px;display:grid}.timeline-row p{grid-column:2/-1}@media (max-width:860px){.shell{width:min(100% - 20px,720px);padding-top:12px}.topbar,.topbar-tools,.section-title{flex-direction:column;align-items:stretch}.sync-actions{justify-content:flex-start}.account-chip{justify-content:space-between}.top-sync-actions{justify-content:stretch}.top-sync-actions .button{flex:1}.dashboard-grid,.grouped-panel,.ledger-panel,.staff-panel,.sync-panel{grid-column:auto;grid-template-columns:1fr;display:grid}.profile-panel{position:static}.staff-group summary{grid-template-columns:1fr auto}.staff-group summary>div:first-of-type{grid-area:1/1}.staff-group summary:after{grid-area:1/2}.staff-group summary dl{grid-area:2/1/auto/-1;grid-template-columns:repeat(2,minmax(0,1fr))}.timeline-row{grid-template-columns:1fr}.timeline-row p{grid-column:auto}}@media (max-width:520px){.login-panel{padding:20px}.login-panel h1{font-size:30px}.account-chip{flex-wrap:wrap;justify-content:flex-start;display:flex}.account-chip form,.account-chip .button,.sync-actions,.sync-actions .button{width:100%}.sync-modal-head{display:grid}.staff-card dl{grid-template-columns:1fr}}
