:root{--bg:#f4f6f8;--ink:#172b33;--muted:#70818a;--line:#e3e9eb;--green:#137a66;--red:#b54747;--nav:#142e36}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:3px}button{cursor:pointer;border:1px solid var(--line);background:white;border-radius:8px;padding:10px 15px;color:var(--ink)}button:hover{background:#edf4f3}button.primary{background:var(--green);color:white;border-color:var(--green)}button.danger{color:var(--red)}button:disabled{opacity:.45;cursor:default}input,select,textarea{border:1px solid #d4dfe2;background:white;border-radius:7px;padding:10px;width:100%;color:var(--ink)}textarea{min-height:95px;resize:vertical}label{display:block;font-size:12px;color:var(--muted);margin:14px 0 6px}h1{font-size:29px;letter-spacing:-1px;margin:0 0 9px;font-weight:650}h2{font-size:18px;margin:0 0 18px}h3{font-size:14px;margin:0 0 12px}.muted{color:var(--muted)}.small{font-size:12px}.mono{font-variant-numeric:tabular-nums}.shell{display:grid;grid-template-columns:230px 1fr;min-height:100vh}.sidebar{background:var(--nav);color:#d5e1e3;padding:30px 17px;position:fixed;width:230px;height:100vh;display:flex;flex-direction:column}.brand{font-size:20px;font-weight:700;color:white;padding:0 12px}.brand span{color:#72c7b3}.brand-sub{padding:8px 12px 32px;font-size:11px;color:#85a4ad;letter-spacing:1.3px;text-transform:uppercase}.navlabel{font-size:10px;color:#7997a0;margin:24px 12px 10px;text-transform:uppercase;letter-spacing:1.4px}.nav{display:flex;flex-direction:column;gap:5px}.nav button{text-align:left;background:none;border:0;color:#b8ced3;padding:12px}.nav button.active{background:#27444d;color:white}.nav button i{font-style:normal;display:inline-block;width:24px;opacity:.75}.profile{margin-top:auto;padding:18px 10px 0;border-top:1px solid #33505a}.profile button{padding:5px 0;background:none;border:0;color:#9db4bb}.main{grid-column:2;padding:28px 38px 60px;min-width:0}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:34px;color:var(--muted);font-size:12px}.local{display:inline-flex;gap:7px;align-items:center}.dot{width:6px;height:6px;border-radius:50%;background:#43b79a}.heading{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:28px}.heading p{margin:0;color:var(--muted);line-height:1.6}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:22px}.stat{background:white;border:1px solid var(--line);padding:21px;border-radius:10px}.stat .value{font-size:28px;margin:17px 0 8px;font-weight:600;letter-spacing:-.6px}.stat .caption{color:var(--muted);font-size:12px}.positive{color:var(--green)}.negative{color:var(--red)}.panel{background:white;border:1px solid var(--line);border-radius:10px;padding:23px;margin-bottom:20px;min-width:0}.two{display:grid;grid-template-columns:1.5fr 1fr;gap:20px}.pill{display:inline-block;background:#eef3f4;border-radius:5px;font-size:11px;padding:5px 8px;white-space:nowrap}.pill.green{color:#137561;background:#e6f4ef}.pill.red{color:#aa3e3e;background:#fcecec}.pill.amber{color:#9a6a26;background:#fbf3e4}.note{background:#edf4f5;padding:14px 17px;border-radius:7px;color:#4e6972;line-height:1.6;margin-bottom:20px;font-size:12px}.note.red{background:#fff0ee;color:#a84545}.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 20px}.toolbar input{max-width:300px}.toolbar select{width:auto;max-width:250px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap}th{font-weight:500;color:var(--muted);font-size:11px;text-align:left;background:#f8fafb;padding:12px 13px;border-bottom:1px solid var(--line)}td{padding:15px 13px;border-bottom:1px solid #edf1f3;font-size:12px}tr.clickable{cursor:pointer}tr.clickable:hover{background:#f5f9f8}.name{font-weight:600;font-size:13px;margin-bottom:5px}.empty{text-align:center;color:var(--muted);padding:35px 20px;line-height:1.8}.row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 0;border-bottom:1px solid #edf1f3}.row:last-child{border:0}.row p{margin:5px 0 0}.actions{display:flex;gap:8px;flex-wrap:wrap}.pager{display:flex;justify-content:space-between;align-items:center;margin-top:18px;color:var(--muted);font-size:12px}.login{max-width:430px;margin:10vh auto;padding:35px;background:white;border:1px solid var(--line);border-radius:14px}.login .brand{color:var(--ink);padding:0;margin-bottom:30px}.login h1{font-size:24px}.login button{width:100%;margin-top:24px}.overlay{position:fixed;inset:0;background:#10262e75;z-index:10;display:flex;justify-content:flex-end}.drawer{width:min(900px,95vw);height:100vh;overflow:auto;background:var(--bg);padding:28px 32px;box-shadow:-10px 0 50px #10262e22}.drawerhead{display:flex;justify-content:space-between;gap:20px;margin-bottom:22px}.tabs{display:flex;gap:7px;margin:18px 0;flex-wrap:wrap}.tabs button.active{background:var(--nav);color:white}.event{position:relative;padding:0 0 25px 24px;border-left:1px solid #d8e4e6;margin-left:5px}.event:before{content:'';position:absolute;left:-4px;top:4px;width:7px;height:7px;background:var(--green);border-radius:50%}.event p{white-space:pre-wrap;line-height:1.65;margin:10px 0}.event-meta{font-size:11px;color:var(--muted);margin-top:9px}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}.full{grid-column:1/-1}.checkbox-row{padding:14px 0;border-bottom:1px solid var(--line)}.checkbox-row select{margin:8px 0}.error{color:var(--red);white-space:pre-wrap;line-height:1.6}#toast{display:none;position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#173c36;color:white;padding:14px 23px;z-index:100;border-radius:9px;max-width:85vw;box-shadow:0 5px 30px #0002}pre{white-space:pre-wrap;word-break:break-word;font-size:12px;line-height:1.65;background:#f6f8f9;padding:15px;border-radius:7px}.loading{padding:100px;text-align:center;color:var(--muted)}.reviewtext{white-space:pre-wrap;line-height:1.65}.section-number{color:var(--green);font-size:11px;font-weight:600;letter-spacing:1px;margin-bottom:10px}.report-line{padding:10px;border-left:2px solid #dce7e7;margin:10px 0;white-space:pre-wrap}.warning-count{font-size:11px;background:#f7ece7;color:#a96749;padding:3px 7px;border-radius:4px}@media(min-width:1500px){.main{padding-left:55px;padding-right:55px}}@media(max-width:1100px){.cards{grid-template-columns:repeat(2,1fr)}.two{grid-template-columns:1fr}.main{padding:25px}.sidebar{width:195px}.shell{grid-template-columns:195px 1fr}}@media(max-width:720px){.shell{display:block}.sidebar{position:relative;width:100%;height:auto;padding:16px}.brand-sub,.navlabel,.profile{display:none}.nav{flex-direction:row;overflow:auto;margin-top:15px}.nav button{white-space:nowrap;font-size:12px}.main{padding:20px 14px}.topbar{margin-bottom:22px}.heading{align-items:flex-start}.heading h1{font-size:24px}.cards{gap:9px}.stat{padding:16px}.stat .value{font-size:23px}.panel{padding:17px}.drawer{padding:23px 17px;width:100vw}.formgrid{grid-template-columns:1fr}.heading .actions{max-width:130px}}
/* Shared debt breakdown: total, fines, rent, summary, other balances. */
.balance-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:9px;overflow:hidden;margin:15px 0 20px}.balance-cell{background:white;padding:15px 16px;min-width:0;display:flex;flex-direction:column;gap:10px}.balance-cell>span{font-size:11px;color:var(--muted);line-height:1.4}.balance-cell strong{font-size:17px;font-weight:600;overflow-wrap:anywhere}.balance-total{background:#eaf3f0}.balance-total>span{color:var(--green);font-weight:600}.balance-summary{background:#f0f4fa}.balance-cell small{font-size:10px}.baseline-info{margin-bottom:12px}.balance-table-wrap{max-height:70vh;border:1px solid var(--line);border-radius:7px}.balance-table{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0}.balance-table td,.balance-table th{min-width:145px;text-align:right}.balance-table td:first-child,.balance-table th:first-child{min-width:270px;max-width:320px;text-align:left}.balance-table .driver-fixed{position:sticky;left:0;background:white;z-index:2;border-right:1px solid var(--line)}.balance-table thead th{position:sticky;top:0;z-index:3;background:#f5f8fa}.balance-table thead .driver-fixed{z-index:4;background:#f5f8fa}.balance-table .total-column{background:#f0f7f4;font-weight:650}.balance-table .summary-column{background:#f3f6fc}.balance-table tfoot th,.balance-table tfoot td{border-top:2px solid #cfdcde;background:#f5f8fa;padding:15px 13px}.balance-table .warning-count{margin-top:6px;display:inline-block}.balance-table tbody tr:hover td{background:#f3f8f6}.pager{flex-wrap:wrap;gap:12px}@media(max-width:720px){.balance-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.balance-cell{padding:12px}.balance-cell strong{font-size:15px}.balance-table td:first-child,.balance-table th:first-child{min-width:185px;max-width:200px}.balance-table .name{white-space:normal}.balance-table td,.balance-table th{min-width:120px}}
.summary-excluded{font-size:10px;color:#5d6892;background:#e7ecf7;border-radius:4px;padding:4px 7px;margin-top:6px;display:inline-block}.summary-purpose{white-space:normal;max-width:160px;line-height:1.4;margin:5px 0 0 auto;color:var(--muted)}.summary-explanation{padding:14px 16px;border:1px solid var(--line);background:white;border-radius:8px;font-size:12px;line-height:1.6;margin-bottom:18px}.summary-explanation p{margin:6px 0;color:var(--muted);white-space:pre-wrap}.summary-explanation button{font-size:12px;margin-top:8px;display:block}.check-label{display:flex;align-items:flex-start;gap:10px;font-size:14px;color:var(--ink);line-height:1.5;padding:14px;background:#f0f4fa;border-radius:7px}.check-label input{width:18px;height:18px;flex-shrink:0;margin-top:2px;accent-color:var(--green)}
.staff-actions{display:flex;flex-direction:column;align-items:flex-end;gap:9px;flex-shrink:0}.staff-actions button{font-size:11px;padding:7px 10px}.staff-row{align-items:flex-start}.staff-row .name .pill{margin-left:5px}.team-result-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin:22px 0}.team-result-stats>div{padding:17px;background:#f3f7f6;border-radius:8px;display:flex;flex-direction:column;gap:10px}.team-result-stats span{font-size:11px;color:var(--muted)}.team-result-stats strong{font-size:21px;font-variant-numeric:tabular-nums}.self-result{background:#edf7f2}.self-result .pill{margin-left:8px}.result-bar{margin-top:8px;width:140px;background:#e6edeb;border-radius:4px;height:4px;overflow:hidden}.result-bar span{display:block;background:#65aa98;height:100%}@media(max-width:720px){.team-result-stats{grid-template-columns:1fr}.staff-row{flex-wrap:wrap}.staff-actions{flex-direction:row;align-items:center}}
.transfer-comment{white-space:pre-wrap;max-width:310px;line-height:1.5;font-size:11px}.staff-row p{white-space:normal}.table-wrap .actions{min-width:170px}.heading h2{margin-bottom:0}
.direction-overview{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:22px}.direction-brief{border:1px solid var(--line);border-top:4px solid #137a66;border-radius:10px;background:white;padding:24px}.direction-brief h2{margin:8px 0 20px}.direction-amount{font-size:30px;font-weight:650;letter-spacing:-.6px}.brief-dismissed{border-top-color:#4b6795}.brief-dismissed .section-number{color:#4b6795}.direction-brief button{margin-top:10px}.direction-section{border-top:3px solid #137a66;padding-top:24px;margin-top:36px;margin-bottom:34px}.direction-section>.heading{margin-bottom:18px}.direction-section .heading h2{font-size:24px;margin:8px 0}.direction-dismissed{border-top-color:#4b6795}.direction-dismissed>.heading .section-number{color:#4b6795}.direction-section>.two{margin-bottom:0}.direction-tabs button{font-weight:550}@media(max-width:720px){.direction-overview{grid-template-columns:1fr}.direction-amount{font-size:26px}.direction-section .heading h2{font-size:21px}.direction-section>.heading{align-items:flex-start}}
.dismissal-info{display:flex;align-items:center;gap:14px;padding:14px 17px;background:white;border:1px solid var(--line);border-radius:9px;margin-bottom:16px;flex-wrap:wrap}.dismissal-info>div{display:flex;flex-direction:column;gap:7px;min-width:140px}.dismissal-info strong{font-size:19px}.dismissal-info button{margin-left:auto;font-size:12px}.dismissal-filters{align-items:flex-end;padding-top:3px;border-top:1px solid var(--line)}.date-filter{width:180px}.date-filter input,.date-filter select{width:100%;max-width:none}.date-filter label{margin-top:12px}.date-filter:last-of-type{width:190px}@media(max-width:720px){.date-filter,.date-filter:last-of-type{width:calc(50% - 8px)}.dismissal-info button{margin-left:0}}
.work-conditions{border:1px solid var(--line);border-radius:9px;padding:16px 18px;background:#fff;margin:0 0 17px}.work-conditions-title{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.work-conditions-title h3{margin:0}.work-conditions dl{display:grid;grid-template-columns:1fr 1fr;gap:14px 24px;margin-bottom:0}.work-conditions dt{font-size:11px;color:var(--muted);margin-bottom:6px}.work-conditions dd{margin:0;font-size:13px;line-height:1.5;white-space:pre-wrap}.review-removal-note{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.review-removal-note button{margin-left:auto;font-size:12px}@media(max-width:720px){.work-conditions dl{grid-template-columns:1fr}}
.fine-price-example{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:20px 0}.fine-price-example>div{background:#f3f7f6;padding:13px;border-radius:7px;display:flex;flex-direction:column;gap:10px}.fine-price-example span{font-size:11px;color:var(--muted);line-height:1.5}.fine-price-example strong{font-size:18px}.fine-checkbox{width:18px;height:18px;accent-color:var(--green)}.fine-address{white-space:normal;max-width:230px;line-height:1.5}@media(max-width:720px){.fine-price-example{grid-template-columns:repeat(2,1fr)}}
.fleet-case{border:1px solid var(--line,#dce5e8);border-radius:10px;padding:12px;margin:10px 0}.fleet-case summary{cursor:pointer;font-weight:600;padding:6px}.fleet-wallet{margin-bottom:20px}.fleet-wallet p{margin:6px 0}
.fleet-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:22px}.fleet-stats .value{font-size:28px}@media(max-width:900px){.fleet-stats{grid-template-columns:1fr}}

.driver-picker{position:relative}.driver-matches{position:absolute;top:calc(100% + 5px);left:0;right:0;z-index:10;max-height:280px;overflow-y:auto;background:white;border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 25px #172b3320}.driver-matches[hidden]{display:none}.driver-matches button{display:flex;flex-direction:column;gap:5px;width:100%;border:0;border-radius:0;border-bottom:1px solid var(--line);text-align:left;padding:12px 14px}.driver-matches button:last-child{border-bottom:0}.driver-matches button.active,.driver-matches button:hover{background:#e6f4ef}.driver-matches span{color:var(--muted);font-size:12px}

.column-sort{display:inline-flex;align-items:center;gap:8px;border:0;border-radius:4px;background:transparent;padding:2px 0;font:inherit;color:inherit;text-align:inherit;white-space:nowrap}.column-sort:hover{background:transparent;color:var(--green)}.sort-arrow{font-size:12px;opacity:.45;min-width:12px}th[aria-sort="ascending"] .column-sort,th[aria-sort="descending"] .column-sort{color:var(--green);font-weight:650}th[aria-sort="ascending"] .sort-arrow,th[aria-sort="descending"] .sort-arrow{opacity:1}

.owner-highlight{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:17px 20px;background:#e6f4ef;border:1px solid #c9e5dc;border-radius:9px;margin:14px 0 20px}.owner-highlight>div{display:flex;flex-direction:column;gap:7px}.owner-highlight strong{font-size:17px}.owner-highlight button{white-space:normal}@media(max-width:720px){.owner-highlight{align-items:flex-start;flex-direction:column}}

.directory-ownership{display:flex;flex-direction:column;align-items:flex-start;gap:9px;margin-top:10px;white-space:normal}.directory-ownership button{padding:7px 10px;font-size:12px}.directory-ownership>span{overflow-wrap:anywhere}

.brand-identity{display:flex;align-items:center;gap:10px;padding:0 6px;letter-spacing:0}.brand-identity img{display:block;flex-shrink:0;border-radius:8px}.brand-copy{font-size:16px;font-weight:650;line-height:1.4;white-space:nowrap}.brand .brand-copy span{display:block;color:#d5e1e3;font-size:14px;font-weight:500}.brand-identity+.brand-sub{padding:13px 6px 20px;font-size:10px;letter-spacing:1.1px;color:#c1b49b}.auth-brand{text-align:center;margin-bottom:28px}.auth-brand>img{display:block;margin:0 auto 18px;border-radius:10px}.auth-brand-name{font-size:21px;font-weight:650;line-height:1.4;color:var(--ink);letter-spacing:-.4px}.auth-brand-sub{font-size:10px;letter-spacing:1.8px;color:var(--muted);margin-top:8px}.login{margin-top:5vh;margin-bottom:5vh}@media(max-width:720px){.sidebar .brand-identity{padding:0}.brand-copy{font-size:16px}.auth-brand-name{font-size:19px}.login{margin:20px 14px;padding:26px;max-width:430px}}

/* Read-only presentation; API permissions remain enforced on the server. */
body[data-read-only="true"] .drawer form,body[data-read-only="true"] .drawer button:not([data-tab]):not(#close){display:none}

/* Driver cards use the full browser viewport; other dialogs retain their size. */
.drawer.driver-card{width:100vw;max-width:none;height:100vh;overflow-anchor:none}

/* Compact driver overview: dismissal, work conditions, then manager on the right. */
.driver-overview{display:flex;align-items:stretch;gap:14px;margin:0 0 20px}
.driver-overview>.dismissal-info{flex:0 0 190px;margin:0;align-content:center}
.driver-overview>.dismissal-info>div{min-width:0}
.driver-overview>.dismissal-info button{margin-left:0}
.driver-overview>.work-conditions{flex:1 1 0;min-width:0;margin:0}
.driver-overview .work-conditions-title{align-items:flex-start}
.driver-overview .work-conditions dl{display:flex;flex-wrap:wrap;gap:12px 24px;margin-top:12px}
.driver-overview .work-conditions dl>div{flex:1 1 150px}
.driver-overview>.owner-highlight{flex:0 0 310px;margin:0;flex-direction:column;align-items:flex-start;justify-content:center;gap:12px}
.driver-overview>.owner-highlight button{font-size:12px}
@media(max-width:900px){.driver-overview{flex-wrap:wrap}.driver-overview>.dismissal-info{flex:0 1 190px}.driver-overview>.work-conditions{flex:1 1 300px}.driver-overview>.owner-highlight{flex:1 1 100%;flex-direction:row;align-items:center;justify-content:space-between}}
@media(max-width:540px){.driver-overview>.dismissal-info,.driver-overview>.work-conditions{flex-basis:100%}.driver-overview>.owner-highlight{flex-direction:column;align-items:flex-start}}
