:root{color-scheme:light;font:16px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;color:#182331;background:#f3f5f8;--accent:#1556aa;--line:#dce2ea;--muted:#536173}
*{box-sizing:border-box}[hidden]{display:none!important}
main{width:100%;padding:clamp(16px,3vw,48px)}
header{margin:0 0 24px}h1,h2,p{margin:0}h1{font-size:clamp(26px,5vw,38px);letter-spacing:-.035em}h2{font-size:21px}p{color:var(--muted);margin-top:4px}
section{background:white;border:1px solid var(--line);border-radius:16px;padding:clamp(16px,3vw,28px);margin-bottom:18px}
#login{max-width:460px}form{margin-top:20px;display:grid;gap:14px}
label{min-width:0;display:grid;gap:5px;font-size:14px;font-weight:600}input,button{font:inherit;min-height:44px;border-radius:8px}input{min-width:0;width:100%;background:#fff;padding:7px 10px;border:1px solid #b9c3d0;font-size:16px;color:inherit}button{border:1px solid transparent;background:var(--accent);color:white;padding:7px 15px;font-weight:600;cursor:pointer}button.secondary{background:white;color:var(--accent);border-color:var(--line)}button:disabled{opacity:.55;cursor:default}:focus-visible{outline:2px solid #1556aa;outline-offset:3px}
.top,.pager{display:flex;align-items:center;justify-content:space-between;gap:10px}.top button{flex-shrink:0}
#status:not(:empty),#login-status:not(:empty){margin-top:14px}.error{color:#a72b24}
.table{margin-top:16px;overflow:auto;border:1px solid var(--line);border-radius:8px}table{border-collapse:collapse;width:100%;text-align:left;font-size:14px}td,th{padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap}th{background:#f4f6f9}tr:last-child td{border-bottom:0}.pager{margin-top:14px;justify-content:flex-end}
nav{display:flex;gap:8px;margin-bottom:16px}
nav button[aria-pressed="false"]{background:white;color:var(--accent);border-color:var(--line)}
#withdraw-config-form{max-width:420px}
#withdraw-status:not(:empty),#withdraw-config-status:not(:empty),#withdraw-go-login{margin-top:14px}
#withdraw-config{width:min(460px,calc(100% - 32px));border:1px solid var(--line);border-radius:16px;padding:20px}
#withdraw-config::backdrop{background:#18233165}
.withdraw-actions{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:600px){
  #withdraw-work>section>.top{flex-wrap:wrap;align-items:flex-start}
  #withdraw-work>section>.top>div{min-width:0}
  .withdraw-actions{width:100%}
}
select{min-width:0;min-height:44px;border:1px solid #b9c3d0;border-radius:8px;background:white;padding:7px 10px;font:inherit;color:inherit;font-size:16px}
#withdraw-results h2{overflow-wrap:anywhere}
@media(max-width:600px){#withdraw-results .top{align-items:flex-start;flex-wrap:wrap}}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.split-table{max-height: min(64vh, 720px)}
.split-table table{min-width:1270px;font-size:15px;table-layout:fixed}
.split-table thead th{position:sticky;top:0;z-index:1}
.split-table th:nth-child(1){width:112px}
.split-table th:nth-child(2){width:320px}
.split-table th:nth-child(4){width:125px}
.split-table th:nth-child(5){width:92px}
.split-table th:nth-child(6),.split-table th:nth-child(7),.split-table th:nth-child(8){width:119px}
.split-table th:nth-child(9){width:120px}
.split-table th:nth-child(10){width:65px}
.split-table .amount{text-align:right;font-variant-numeric:tabular-nums}
.split-table .net{font-weight:700}
.split-table .split-name{white-space:normal;overflow-wrap:anywhere}
.split-time small,.split-name small{display:block;color:var(--muted);font-size:13px;font-variant-numeric:tabular-nums}
.split-order{white-space:normal;overflow-wrap:anywhere;font-size:13px;font-variant-numeric:tabular-nums}
.split-order div+div{margin-top:3px}
.split-order small{color:var(--muted);font-size:12px}
main:has(#splits:not([hidden]) #work:not([hidden])){padding-top:clamp(14px,1.5vw,26px)}
main:has(#splits:not([hidden]) #work:not([hidden])) header{margin-bottom:10px}
main:has(#splits:not([hidden]) #work:not([hidden])) header h1{font-size:clamp(24px,3vw,31px)}
main:has(#splits:not([hidden]) #work:not([hidden])) header p{display:none}
#splits :is(#work,#results){padding:10px clamp(12px,1.5vw,22px);margin-bottom:8px}
.split-meta>div{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 12px;min-width:0}
.split-meta h2{font-size:17px}
.split-meta p{font-size:14px;margin:0}
.split-toolbar{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;margin-top:8px}
#splits #dates{display:grid;grid-template-columns:148px auto 148px max-content;align-items:center;gap:6px;margin:0}
.date-presets{display:flex;gap:5px;flex-wrap:wrap}
.split-filters{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:6px;flex:1 1 360px;max-width:490px}
.split-toolbar button,.split-toolbar input,.split-toolbar select,.split-meta button{min-height:40px;padding:5px 10px;font-size:14px}
.split-toolbar select{width:100%}
#lookup-status:not(:empty),#split-empty:not([hidden]){margin-top:5px;font-size:13px}
#split-table{margin-top:8px}
.split-order>div{display:grid;grid-template-columns:2.8em minmax(0,1fr);gap:3px}
.split-order{font-variant-numeric:tabular-nums}
#split-overview{margin-top:6px;padding:4px 10px;background:#f4f7fb;border:1px solid var(--line);border-radius:8px}
#split-overview summary{cursor:pointer;padding:6px 0;font-size:14px}
#split-overview-totals{display:inline-flex;flex-wrap:wrap;gap:2px 14px;margin-left:12px;color:var(--muted);font-variant-numeric:tabular-nums}
#split-overview-note{font-size:13px}
#split-overview-table{margin-top:7px;max-height:min(42vh,360px);background:white}
#split-overview-table th,#split-overview-table td{padding:6px 10px}
#split-overview-table thead th{position:sticky;top:0;z-index:1}
#split-overview-table .amount{text-align:right;font-variant-numeric:tabular-nums}
#split-overview-table tfoot th,#split-overview-table tfoot td{font-weight:700;background:#edf2f8}
@media(max-width:600px){
  #splits #dates{width:100%;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
  #dates button{grid-column:1 / -1}
  .split-filters{flex-basis:100%}
  .split-toolbar button,.split-toolbar input,.split-toolbar select,.split-meta button{min-height:44px}
  #split-overview-totals{display:flex;margin:3px 0 0;gap:2px 9px}
}
.company-filters:not(:empty){display:flex;flex-wrap:wrap;gap:6px 10px;margin-top:14px}
.company-filters label{display:flex;align-items:center;gap:7px;min-height:44px;padding:3px 11px;border:1px solid var(--line);border-radius:8px;overflow-wrap:anywhere;cursor:pointer}
.company-filters input{width:17px;min-height:0;height:17px;flex-shrink:0;accent-color:var(--accent)}
#summary-dates{grid-template-columns:repeat(2,minmax(0,200px)) max-content;align-items:end}
#summary-status:not(:empty){margin-top:14px}
.summary-overview{margin-top:24px;padding:16px 0 20px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.summary-overview h3{margin:0;font-size:17px}
.summary-overview p{font-size:14px}
#summary-overview-table{margin-top:12px}
#summary-overview-table table{min-width:880px}
#summary-overview-table thead th:first-child{width:184px}
#summary-overview-table tbody th{background:white}
#summary-overview-table small{display:block;color:var(--muted);font-weight:400;font-variant-numeric:tabular-nums}
#summary-overview-table tfoot :is(td,th){font-weight:700;background:#edf2f8;border-bottom:0}
.summary-table table{table-layout:fixed;min-width:740px}
.summary-table th,.summary-table td{white-space:normal;overflow-wrap:anywhere}
.summary-table .amount,#withdraw-table .amount{text-align:right;font-variant-numeric:tabular-nums}
.summary-table .summary-date{width:110px;white-space:nowrap;font-variant-numeric:tabular-nums}
@media(max-width:600px){
  #summary-dates{grid-template-columns:1fr}
  .summary-table td,.summary-table th{padding:9px 6px}
  .summary-table .summary-date{width:91px;font-size:13px}
  #summary-overview-table table{min-width:680px}
  #summary-overview-table thead th:first-child{width:130px}
}
.split-table tbody tr.split-row:hover{background:#f8faff}
.split-table .split-row td{padding-block:7px;border-bottom:1px solid var(--line)}
.detail-button{padding:4px 6px;min-height:44px;background:transparent;color:var(--accent);font-size:14px}
.split-detail td{padding:12px 18px;background:#f5f7fb;white-space:normal}
.split-detail dl{margin:0;display:grid;grid-template-columns:max-content minmax(0,1fr);gap:5px 14px}
.split-detail dt{color:var(--muted)}
.split-detail dd{margin:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.table-scroll{margin-top:8px;display:grid;gap:3px;color:var(--muted)}
.table-scroll label{font-size:13px;font-weight:400}
.table-scroll input[type=range]{appearance:none;min-height:26px;height:26px;margin:0;padding:0;border:0;background:transparent;cursor:ew-resize}
.table-scroll input::-webkit-slider-runnable-track{height:8px;background:#dee6ef;border-radius:99px}
.table-scroll input::-webkit-slider-thumb{appearance:none;width:42px;height:12px;margin-top:-2px;background:#61758e;border-radius:99px}
.table-scroll input::-moz-range-track{height:8px;background:#dee6ef;border-radius:99px}
.table-scroll input::-moz-range-thumb{width:42px;height:12px;border:0;background:#61758e;border-radius:99px}
.recon-receivers{margin-top:16px}
#recon-receiver-label{display:block;margin-bottom:5px;font-size:14px;font-weight:600}
.recon-choices{display:flex;gap:8px;flex-wrap:wrap}
.recon-choices button[aria-pressed="true"]{color:#fff;background:var(--accent);border-color:var(--accent)}
.recon-switch{display:flex;gap:8px;margin:16px 0 10px}
.recon-switch [aria-pressed="false"]{background:transparent;border-color:var(--line);color:var(--accent)}
.recon-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-width:640px}
.recon-filters label,.recon-form label{min-width:0}
#recon-count,#recon-status:not(:empty){margin-top:12px}
.recon-table table{min-width:820px}
.recon-table td{white-space:normal}
.recon-table td:first-child{white-space:nowrap}
.recon-table .amount,.recon-number{font-variant-numeric:tabular-nums;text-align:right}
.recon-table .recon-store{min-width:135px}
.recon-table .recon-journal{min-width:180px;overflow-wrap:anywhere}
.recon-positive{color:#176142}
.recon-attention{color:#924d14}
#recon-dialog{width:min(880px,calc(100% - 28px));max-height:88dvh;overflow:auto;border:1px solid var(--line);border-radius:16px;padding:20px;color:var(--text);background:var(--surface,#fff)}
#recon-dialog::backdrop{background:#18233165}
#recon-detail{margin-top:12px}
.recon-detail-block{margin:18px 0}
.recon-detail-block h3{font-size:16px;margin-bottom:6px}
.recon-detail-block li{margin:5px 0;overflow-wrap:anywhere}
.recon-detail-numbers{display:flex;gap:6px 16px;flex-wrap:wrap;margin:8px 0}
.recon-detail-table table{min-width:520px}
.recon-form{display:grid;gap:10px;padding:12px;border:1px solid var(--line);border-radius:10px;margin-top:12px}
.recon-form button,.recon-link-actions button{justify-self:start}
.recon-form input,.recon-form select{width:100%;min-width:0}
.recon-link-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:5px}
#recon-action-status:not(:empty){margin-top:10px}
@media(max-width:600px){
  nav,.recon-top{flex-wrap:wrap}
  .recon-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  #recon-dialog{padding:14px}
}
