:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif;color:#183f35;background:#f4f7f5;font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;border:1px solid #d9e3dd;border-radius:7px;padding:10px 16px;background:white;color:#20483c}button:hover{background:#edf4ef}button:disabled{opacity:.5;cursor:wait}.primary{background:#176d54;color:white;border-color:#176d54}.primary:hover{background:#11543f}input,select,textarea{width:100%;padding:11px;border:1px solid #cedbd3;border-radius:6px;background:white;color:#163f33;min-width:0}label{display:grid;gap:8px;color:#62776a}small,.muted{color:#798b80}aside{width:210px;position:fixed;inset:0 auto 0 0;background:#fff;border-right:1px solid #dce6df;padding:28px 18px}aside h2{font-size:23px;margin:0 10px 6px}aside small{display:block;letter-spacing:2px;margin:0 10px 35px}nav{display:grid;gap:8px}nav button{text-align:left;border:0}nav .active{color:#146f53;background:#eaf2ed;font-weight:650}main{margin-left:210px;padding:28px 36px}.top{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px;gap:20px}.top h1{font-size:29px;margin:0 0 8px}.actions{display:flex;gap:8px;flex-wrap:wrap}.card{background:white;border:1px solid #e0e8e2;border-radius:10px;padding:24px;margin:18px 0}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:16px}.cards .card{margin:0}.card strong{font-size:26px;display:block;margin:10px 0}.summary-breakdown{display:flex;gap:6px 14px;flex-wrap:wrap;color:#62776a;font-size:13px}.summary-breakdown span{white-space:nowrap}.summary-pair{display:flex;align-items:baseline;gap:18px;flex-wrap:wrap}.summary-pair span{font-size:13px;color:#62776a}.summary-pair b{font-size:17px;color:#183f35;white-space:nowrap}.filters{display:flex;flex-wrap:wrap;gap:12px;margin:20px 0}.filters label{min-width:150px;flex:1;max-width:220px}.table-wrap{overflow:auto;background:white;border:1px solid #dfe6e1;border-radius:8px;margin:20px 0}table{width:100%;border-collapse:collapse;white-space:nowrap}th,td{padding:14px 16px;text-align:left;border-bottom:1px solid #edf1ed}th{background:#f0f5f1;font-size:12px;color:#687d70}td small{display:block;margin-top:5px}.empty{padding:40px;color:#819186;text-align:center}.badge{font-size:12px;border-radius:5px;padding:4px 8px;background:#edf3ed}.danger{color:#ad3434}dialog{width:min(740px,95vw);border:1px solid #d7e1da;border-radius:12px;padding:0;color:inherit}dialog::backdrop{background:#18372f80}dialog header{display:flex;align-items:center;justify-content:space-between;padding:20px 28px;border-bottom:1px solid #dde5df}dialog header h2{margin:0}dialog header button{border:0;font-size:24px}#fields{padding:24px 28px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.full{grid-column:1/-1}dialog footer{padding:20px 28px;background:#f4f7f4;display:flex;justify-content:flex-end;gap:10px}#form-error{margin:0 28px 20px;color:#ad3434}.auth{width:min(520px,94vw);margin:8vh auto;background:white;border:1px solid #dbe5de;border-radius:14px;padding:36px}.auth form{display:grid;gap:20px}.auth h1{margin-bottom:8px}.auth p{line-height:1.8}.auth #auth-error{color:#ad3434}.auth a{color:#176d54}.secret{overflow-wrap:anywhere;background:#f2f5f1;padding:14px;user-select:all;line-height:1.7}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#183f35;color:#fff;padding:14px 24px;border-radius:8px;display:none;z-index:10}.note{padding:14px;background:#edf3eb;border-radius:7px;line-height:1.8}.check{display:flex;align-items:center;gap:8px}.check input{width:auto}.qr{width:200px;height:200px}.metrics{font-size:13px}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:28px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}@media(max-width:850px){aside{position:static;width:100%;padding:20px}aside small{margin-bottom:15px}nav{display:flex;overflow:auto}nav button{white-space:nowrap}main{margin:0;padding:22px 16px}.top{align-items:flex-start}#fields{grid-template-columns:minmax(0,1fr)}.full{grid-column:auto}}

.payment-review{min-width:0;padding:20px;background:#edf3eb;border:1px solid #cbdcd1;border-radius:8px}.payment-review p{margin:0 0 12px}.payment-address{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:22px;font-weight:700;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;user-select:all;margin:8px 0 16px;color:#143e32}.payment-review #payment-copy-status{margin:10px 0 0}

.batch-account-row{padding:14px 0;border-bottom:1px solid #dbe5de}.batch-account-fields{display:flex;gap:14px;align-items:end;flex-wrap:wrap}.batch-account-fields label{flex:1;min-width:160px}.payment-detail-payee,#batch-payee{white-space:pre-wrap;overflow-wrap:anywhere}#batch-accounts{max-height:45vh;overflow:auto}fieldset{min-width:0;border:1px solid #dbe5de;border-radius:8px}

/* Keep long forms and data tables usable on narrow touch screens. */
.mobile-nav{display:none}
dialog{max-height:calc(100dvh - 24px);overflow:hidden}
dialog form{display:flex;flex-direction:column;max-height:calc(100dvh - 24px)}
dialog header,dialog footer{flex:0 0 auto}
#fields{min-height:0;overflow-y:auto}#fields>*{min-width:0}
.table-wrap{max-width:100%;-webkit-overflow-scrolling:touch}
@media(max-width:850px){
 aside{display:flex;align-items:center;justify-content:space-between;gap:12px;position:relative;padding:14px 16px}
 aside h2{font-size:20px;margin:0}
 aside small{font-size:10px;margin:2px 0 0;letter-spacing:1px}
 .desktop-nav{display:none}
 .mobile-nav{display:block;position:relative}
 .mobile-nav summary{list-style:none;cursor:pointer;border:1px solid #d9e3dd;border-radius:8px;background:white;padding:10px 14px;min-height:44px;color:#20483c;font-weight:600;white-space:nowrap}
 .mobile-nav summary::-webkit-details-marker{display:none}
 .mobile-nav nav{position:absolute;right:0;top:calc(100% + 8px);z-index:30;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;width:min(320px,calc(100vw - 32px));max-height:65dvh;overflow:auto;padding:10px;background:white;border:1px solid #d9e3dd;border-radius:10px;box-shadow:0 12px 32px #183f3529}
 .mobile-nav nav button{min-height:44px;padding:10px;text-align:center}
 main{min-width:0;padding:18px 16px calc(24px + env(safe-area-inset-bottom))}
 .top{display:block;margin-bottom:18px}
 .top h1{font-size:25px}
 .top .actions{margin-top:12px;align-items:center}
 .top .actions span{margin-right:auto;overflow-wrap:anywhere}
 .actions button{min-height:44px}
 .filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .filters label{min-width:0;max-width:none}
 .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .cards .card{min-width:0;padding:16px}
 .cards .card:first-child{grid-column:1/-1}
 .card strong{font-size:24px}
 .summary-pair{gap:4px 12px}
 input,select,textarea{font-size:16px;min-height:44px}
 .table-wrap{overflow-x:auto;overscroll-behavior-inline:contain}
 th,td{padding:12px}
 .auth{width:100%;min-height:100dvh;margin:0;padding:28px 20px;border:0;border-radius:0}
 dialog{width:100vw;max-width:none;height:100dvh;max-height:100dvh;inset:0;margin:0;padding:0;border:0;border-radius:0}
 dialog form{height:100%;max-height:100dvh}
 dialog header{padding:12px 16px}
 dialog header h2{font-size:20px}
 dialog header button{min-width:44px;min-height:44px;padding:4px}
 #fields{flex:1 1 auto;padding:16px;gap:14px;grid-template-columns:minmax(0,1fr)}
 #fields .full{grid-column:1}
 #form-error{margin:0 16px 10px}
 dialog footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom));gap:10px}
 dialog footer button{flex:1;min-height:44px}
 .payment-address{font-size:17px}
 #batch-accounts{max-height:none}
 #toast{max-width:calc(100vw - 24px);bottom:calc(16px + env(safe-area-inset-bottom))}
}
@media(max-width:360px){.filters{grid-template-columns:1fr}.cards{grid-template-columns:1fr}.cards .card:first-child{grid-column:auto}}

.project-spend{border-top:1px solid #e3ebe5;margin-top:18px;padding-top:14px;max-height:240px;overflow-y:auto}
.project-spend-title{display:flex;justify-content:space-between;gap:8px;align-items:baseline;font-weight:600;margin-bottom:10px}
.project-spend-title small{font-size:11px;font-weight:400;white-space:nowrap;letter-spacing:0}
.project-spend-row{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:7px 0;border-top:1px solid #f0f3f0}
.project-spend-row span{min-width:0;overflow-wrap:anywhere}
.project-spend-row small{font-size:11px;letter-spacing:0}
.project-spend-row b{white-space:nowrap;font-variant-numeric:tabular-nums}
.project-spend-row b small{color:#738b7e;font-weight:400;margin-left:6px}
.project-spend-entry+.project-spend-entry{border-top:1px solid #f0f3f0}.project-spend-entry .project-spend-row{border-top:0}.project-spend-compare{color:#738b7e;font-size:11px;line-height:1.5;padding:0 0 8px;overflow-wrap:anywhere}
@media(max-width:600px){.report-cards{grid-template-columns:1fr}.report-cards .card:first-child{grid-column:auto}}
.dashboard-section{margin:28px 0 36px}.dashboard-section h2{font-size:20px;margin:0 0 16px}.dashboard-buyer{margin:26px 0 32px}.dashboard-buyer h3{font-size:17px;margin:0 0 12px}.dashboard-compare{font-size:12px;color:#62776a;margin-top:12px;line-height:1.6}.dashboard-compare span{display:block}
.dashboard-section .project-spend{max-height:none;overflow:visible}
.change-up{color:#c62828}.change-down{color:#16804a}
.balance-edit{padding:4px 10px;font-size:12px;margin-top:5px}
.account-status{margin-top:18px}
.payment-review .payment-address-warning{padding:14px;margin:12px 0 0;background:#fff3dc;border:1px solid #e8bd66;border-radius:6px;color:#805017;line-height:1.6}
.status-badge{display:inline-flex;align-items:center;padding:4px 9px;border:1px solid transparent;border-radius:6px;font-size:13px;font-weight:650;line-height:1.5;white-space:nowrap;vertical-align:middle}.status-submitted{color:#92400e;background:#fff3df;border-color:#f6d799}.status-approved{color:#1d4ed8;background:#eff6ff;border-color:#bfdbfe}.status-paid,.status-pending{color:#6b21a8;background:#f5f3ff;border-color:#ddd6fe}.status-completed{color:#166534;background:#ecfdf3;border-color:#bbf7d0}.status-returned{color:#b42318;background:#fff1f0;border-color:#fecaca}.status-cancelled,.status-unknown{color:#59616c;background:#f0f2f4;border-color:#d9dee5}
.account-name{display:block;line-height:1.5}.account-id{display:flex;align-items:baseline;gap:7px;margin-top:7px;color:#123f34;white-space:nowrap}.account-id-label{flex:none;padding:1px 5px;border:1px solid #cbded4;border-radius:4px;background:#edf5f0;font-size:11px;font-weight:650;color:#3f6355}.account-id strong{font-size:16px;font-weight:750;line-height:1.5;font-variant-numeric:tabular-nums;letter-spacing:.3px;user-select:all}
.payment-detail-payee{min-width:220px;max-width:320px;line-height:1.5}
#receipt-new-project{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}#receipt-new-project legend{padding:0 6px;color:#62776a;font-size:13px}@media(max-width:850px){#receipt-new-project{grid-template-columns:minmax(0,1fr)}}
#receipt-new-project[hidden]{display:none}
.data-table{min-width:0}.table-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:12px 0 24px;color:#62776a;font-size:13px}.table-pagination label{display:flex;align-items:center;gap:8px;margin:0}.table-pagination select{width:auto;min-width:88px;padding:8px 10px}.table-pagination .actions{margin:0;gap:8px}@media(max-width:600px){.table-pagination{gap:10px}.table-pagination>span{flex-basis:100%}}

.account-project-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px;margin:12px 0}.account-project-name{margin:4px 0;white-space:normal;min-width:180px}.account-project-options .check{display:flex;align-items:center;gap:8px}.account-project-options input[type=checkbox]{width:auto;flex:none}
