*{box-sizing:border-box}html{background:#edf2f7;color:#192f46;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,textarea,select{touch-action:manipulation}button,a{transition:background .12s}button{cursor:pointer}button:disabled{cursor:default;opacity:.5}input,textarea,select{display:block;width:100%;min-width:0;border:1px solid #d7e1ec;border-radius:6px;padding:10px;background:#fff;color:#192f46;outline:none}input:focus,textarea:focus,select:focus{border-color:#5289bb;box-shadow:0 0 0 3px #deebf7}textarea{resize:vertical;line-height:1.6}input:disabled{background:#f0f4f8;color:#74869a}label{display:flex;flex-direction:column;gap:7px;font-size:10px;font-weight:650;letter-spacing:.4px;color:#607589}label input,label textarea,label select{font-size:13px;letter-spacing:0;font-weight:400}h1,h2,h3,p{margin-top:0}h1,h2,h3{color:#19364f}h1{font-size:34px;letter-spacing:-1.1px;margin:0}h2{font-size:25px;letter-spacing:-.5px;margin-bottom:10px}h3{font-size:15px}.button{border:1px solid transparent;padding:9px 13px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;gap:6px;font-size:12px;font-weight:600;text-decoration:none;white-space:nowrap;line-height:1.4;cursor:pointer;background:none;color:#204d72}.button:hover{background:#dce8f3}.primary,.primary:hover{background:#194a75;color:#fff;border-color:#194a75}.primary:hover{background:#123d64}.secondary{background:#fff;border-color:#d7e1ec;color:#244766}.secondary:hover{background:#f1f5fa}.ghost{color:#47647d}.active{background:#dce9f5}.light{color:#fff;border-color:#64819b}.light:hover{background:#2e5c83}.link{color:#245580;padding:4px 0;border:0;text-decoration:underline;text-underline-offset:3px;font-size:11px}.remove{font-size:21px;padding:2px 7px;color:#6b7f91}.muted{color:#61758a;line-height:1.7}.small{font-size:11px}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:700;color:#6a8197;margin-bottom:9px}.masthead{background:#183e62;color:#fff;padding:20px 34px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:12px}.brand img{width:54px;height:54px;object-fit:contain}.brand strong{font-size:18px;letter-spacing:1px}.brand span{display:block;font-size:10px;letter-spacing:2.2px;margin-top:4px}.header-tools{display:flex;align-items:center;gap:13px}.header-tools>span{font-size:12px;opacity:.65;margin-right:12px}.shell{max-width:1650px;padding:18px 30px 25px;margin:auto}.shell>nav{display:flex;gap:8px;border-bottom:1px solid #d8e2ec;padding-bottom:15px}.refresh{margin-left:auto}.titlebar{display:flex;justify-content:space-between;align-items:center;margin:25px 0;gap:15px}.titlebar p:last-child{margin:7px 0 0;font-size:13px}.workspace{display:grid;grid-template-columns:300px minmax(0,1fr);align-items:start;gap:24px}.invoice-list{position:sticky;top:16px;padding:20px 16px;background:white;border:1px solid #d8e2ec;border-radius:10px}.invoice-list h3{margin-bottom:16px}.invoice-list>input{font-size:12px}.invoice-list>select{margin-top:10px;font-size:12px}.list-total{display:flex;justify-content:space-between;border-top:1px solid #d8e2ec;padding-top:15px;margin-top:15px;font-size:12px}#invoice-rows{max-height:650px;overflow:auto;margin-top:15px}.invoice-row{display:block;width:100%;border:0;border-bottom:1px solid #dbe4ed;background:white;text-align:left;color:inherit;padding:15px 10px}.invoice-row:hover{background:#f1f6fb}.invoice-row.selected{background:#dceaf7;border-left:3px solid #194a75}.invoice-row>div:first-child{display:flex;gap:9px;align-items:center;font-size:12px}.invoice-row>div:first-child>span{font-size:10px;color:#687c8e}.badge{font-size:9px;background:#edf2f7;padding:3px 6px;border-radius:4px;margin-left:auto;font-style:normal;color:#526d84}.badge.paid{background:#dcefe4;color:#267050}.invoice-row>strong{display:block;margin:10px 0 4px;font-size:13px;overflow:hidden;text-overflow:ellipsis}.invoice-row>small{display:block;font-size:10px;color:#6b8094}.row-totals{display:flex;justify-content:space-between;gap:8px;margin-top:13px}.row-totals span{font-size:9px;color:#6b8094}.row-totals b{display:block;font-size:10px;color:#1e3d57;margin-top:4px;font-weight:500;font-variant-numeric:tabular-nums}.welcome{background:#fff;padding:60px 25px 30px;text-align:center;border:1px solid #d8e2ec;border-radius:10px;min-height:510px}.welcome h2{font-size:36px;line-height:1.15;margin:18px 0}.welcome>p.muted{margin-bottom:26px}.welcome-icon{width:70px;height:70px;background:#eaf1f8;border-radius:20px;display:grid;place-items:center;margin:0 auto 24px;color:#194a75;font-size:36px}.welcome-note{margin-top:45px;border-top:1px solid #dce4ee;padding-top:24px;font-size:10px;letter-spacing:1.4px;font-weight:650;color:#476981}.welcome-note small{display:block;font-size:10px;letter-spacing:0;font-weight:400;color:#6a8094;margin-top:10px}#editor{min-width:0}.editor-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}.editor-toolbar>div:last-child{display:flex;gap:6px}.editor-toolbar strong{font-size:15px}.editor-toolbar .small{margin-left:8px}.paper{background:#fff;border:1px solid #d8e2ec;border-radius:7px;box-shadow:0 5px 16px #183e6209;padding:28px}.paper-heading{display:flex;align-items:center;gap:14px;margin-bottom:28px}.paper-heading img{width:82px;height:82px;object-fit:contain}.paper-heading h2{font-size:16px;letter-spacing:0;color:#194a75;margin:0}.paper-heading p{font-size:10px;line-height:1.7;color:#647e93;margin:7px 0 0}.invoice-word{margin-left:auto;font-size:27px;color:#194a75}.invoice-word small{display:block;text-align:right;font-size:12px;margin-top:6px;font-weight:650}.details{display:grid;grid-template-columns:1fr 1fr;gap:25px;margin-bottom:28px}.client,.job{display:flex;flex-direction:column;gap:10px}.client h3{background:#194a75;color:white;font-size:10px;letter-spacing:1px;margin:0;padding:7px 10px}.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.terms{font-size:12px;letter-spacing:0;font-weight:400;color:#284d6c;min-height:37px;line-height:37px;margin:0}.table-scroll{overflow:auto}.line-table{border-collapse:collapse;width:100%;table-layout:fixed;min-width:640px}.line-table th{background:#194a75;color:white;text-align:left;font-size:9px;letter-spacing:.3px;padding:10px 5px;line-height:1.5}.line-table th:first-child{width:31%;padding-left:10px}.line-table th:nth-child(2){width:17%;text-align:right}.line-table th:nth-child(3){width:10%;text-align:right}.line-table th:nth-child(4){width:17%;text-align:right}.line-table th:nth-child(5){width:20%;text-align:right}.line-table th:last-child{width:5%}.line-table td{padding:6px 3px;border-bottom:1px solid #d8e2ec}.line-table input{font-size:12px;padding:7px 5px;text-align:right;height:34px}.line-table td:first-child input{text-align:left}.money{font-variant-numeric:tabular-nums;white-space:nowrap;text-align:right;font-size:12px;font-weight:550}.add-row{display:flex;align-items:center;gap:12px;margin:16px 0 27px}.invoice-bottom{display:grid;grid-template-columns:1.1fr 1fr;gap:28px}.credit-total{display:flex;align-items:center;gap:10px;color:#194a75;font-size:10px;font-weight:700}.credit-total strong{margin-left:auto;font-size:17px;font-variant-numeric:tabular-nums}.invoice-bottom textarea{margin-top:5px}.totals>div{padding:9px;display:flex;justify-content:space-between;font-size:13px;border-bottom:1px solid #d8e2ec;font-variant-numeric:tabular-nums}.totals .grand{background:#194a75;color:white;font-size:20px;padding:13px 10px}.totals>.button{width:100%;margin-top:15px;font-size:11px}.filename{padding-top:16px;margin:22px 0 0;border-top:1px solid #d8e2ec;font-size:10px;color:#6a8094;overflow-wrap:anywhere}.payment-history{margin-top:25px;border-top:1px solid #d8e2ec;padding-top:15px}.payment-history h3{font-size:13px}.payment-history>div{display:flex;justify-content:space-between;padding:8px 0;font-size:12px}.panel{background:white;border:1px solid #d8e2ec;border-radius:10px;padding:28px}.panel-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:25px}.panel-heading h2{margin-bottom:7px}.panel-heading p{font-size:12px;margin-bottom:0}.filters{background:#f0f4f8;padding:17px;display:flex;gap:13px;align-items:flex-end;flex-wrap:wrap;border-radius:7px;margin-bottom:20px}.filters label:nth-child(4){flex:1;min-width:140px}.summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:12px}.summary>div{border:1px solid #d8e2ec;border-radius:7px;padding:15px}.summary span{display:block;font-size:10px;color:#6b8094;margin-bottom:10px}.summary strong{font-size:22px;font-variant-numeric:tabular-nums}.summary>.grand{background:#194a75;color:#fff}.summary>.grand span{color:#d2e4f3}.report-tools{display:flex;align-items:center;gap:8px;margin:20px 0}.report-tools p{margin:0 auto 0 0}.report-table{width:100%;border-collapse:collapse;min-width:650px}.report-table th{background:#f0f4f8;color:#637e95;letter-spacing:.6px;font-size:10px;text-align:left;padding:13px 12px}.report-table td{border-bottom:1px solid #dce5ee;font-size:12px;padding:13px 12px}.empty{text-align:center;padding:42px 10px;color:#6a8094;font-size:12px}.empty h3{font-size:15px}.empty p{line-height:1.6}footer{border-top:1px solid #d8e2ec;margin-top:30px;padding:17px 0 0;display:flex;justify-content:space-between;font-size:10px;color:#6d8295}.auth{min-height:100vh;display:flex;align-items:center;justify-content:center;gap:75px;padding:35px}.auth-intro{max-width:420px}.auth-intro>img{width:110px;height:110px;margin-bottom:20px}.auth-intro h1{font-size:58px;line-height:1.05;margin-bottom:25px}.auth-intro>p:last-child{color:#6a8094;line-height:1.8}.auth-card{width:420px;background:white;border:1px solid #d8e2ec;border-radius:12px;padding:35px;box-shadow:0 10px 40px #183e6212}.auth-card h2{font-size:27px}.auth-card>p.muted{font-size:13px;margin-bottom:25px}.auth-card form{display:flex;flex-direction:column;gap:18px}.auth-card form label{font-size:12px}.auth-links{display:flex;justify-content:space-between;margin:20px 0}.notice{background:#e7f1fa;padding:13px;line-height:1.6;border-radius:7px;font-size:12px}.boot{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:25px;text-align:center}.boot img{width:100px;margin-bottom:30px}.boot h1{font-size:30px}.boot p{color:#6a8094}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#194a75;color:#fff;padding:14px 20px;border-radius:8px;box-shadow:0 6px 25px #0002;z-index:1000;font-size:13px;max-width:90vw;text-align:center}#toast:empty,#toast[hidden]{display:none}#toast.error{background:#943f32}dialog{border:1px solid #d8e2ec;border-radius:12px;background:white;color:#19364f;padding:28px;max-width:500px;width:calc(100% - 36px);box-shadow:0 15px 60px #11283f33}dialog::backdrop{background:#152b4366}dialog h2{font-size:23px}dialog p{line-height:1.7;font-size:13px}dialog form{display:flex;flex-direction:column;gap:16px}dialog label{font-size:11px}.modal-actions{display:flex;gap:9px;justify-content:flex-end;margin-top:24px}.export-file{padding:20px;background:#edf3f9;border:1px solid #d6e4f0;border-radius:7px;color:#194a75;font-weight:600;font-size:13px;overflow-wrap:anywhere;margin:20px 0}
@media(max-width:1200px){.workspace{grid-template-columns:265px minmax(0,1fr);gap:18px}.shell{padding:16px 22px}.paper{padding:20px}.paper-heading h2{font-size:13px}.paper-heading img{width:62px;height:62px}.invoice-word{font-size:22px}.details{gap:16px}.header-tools>span{display:none}.invoice-bottom{gap:18px}.credit-total{font-size:9px}.credit-total strong{font-size:15px}}
@media(max-width:1000px){.workspace{grid-template-columns:1fr}.invoice-list{position:static}#invoice-rows{max-height:260px}.invoice-row{padding:12px}.row-totals{justify-content:flex-start;gap:30px}.header-tools{gap:7px}.masthead{padding:18px 22px}.auth{gap:35px}.auth-intro h1{font-size:44px}.details{gap:25px}.paper-heading h2{font-size:17px}.paper-heading img{width:80px;height:80px}}
@media(max-width:650px){.masthead{padding:14px}.brand img{width:40px;height:40px}.brand strong{font-size:14px}.brand span{font-size:8px;letter-spacing:1.5px}.header-tools .button{font-size:10px;padding:7px}.shell{padding:14px}.shell>nav{gap:2px;overflow:auto}.shell>nav .button{padding:8px 10px;font-size:11px}.titlebar h1{font-size:28px}.titlebar p:last-child{font-size:11px}.titlebar{margin:21px 0}.details,.invoice-bottom{grid-template-columns:1fr}.paper{padding:16px}.paper-heading{gap:10px}.paper-heading h2{font-size:12px}.paper-heading img{width:58px;height:58px}.paper-heading p{font-size:9px}.invoice-word{display:none}.editor-toolbar{align-items:flex-start}.editor-toolbar .button{font-size:10px;padding:8px}.editor-toolbar>div:last-child{flex-wrap:wrap}.add-row{flex-direction:column;align-items:flex-start;gap:9px}.panel{padding:17px}.panel-heading{align-items:flex-start}.panel-heading h2{font-size:21px}.panel-heading .button{font-size:10px}.panel-heading p{font-size:11px}.panel-heading>label{max-width:130px}.filters{padding:12px;gap:10px}.summary{grid-template-columns:1fr 1fr}.summary strong{font-size:20px}.report-tools{flex-wrap:wrap}.report-tools p{width:100%}.welcome{padding:40px 18px}.welcome h2{font-size:29px}.welcome>p.muted{font-size:12px}.auth{padding:20px}.auth-intro{display:none}.auth-card{width:100%;max-width:420px;padding:26px}.auth-card h2{font-size:25px}.credit-total{font-size:10px}.credit-total strong{font-size:17px}footer>span{display:none}dialog{padding:22px}}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.tracker-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.tracker-panel .panel-heading{margin-bottom:20px}.tracker-panel h2 span{font-weight:400;color:#6b8094}.tracker-table{min-width:1120px}.tracker-table thead th{background:#4478a8;color:#fff;padding:14px 12px;white-space:nowrap}.report-table th.money{text-align:right}.tracker-table tbody tr:nth-child(odd){background:#eaf1f8}.tracker-table tbody tr:nth-child(even){background:#f8fafd}.tracker-table tbody tr:hover{background:#dceaf7}.tracker-table td{padding:16px 12px;vertical-align:middle}.tracker-table .tracker-customer{min-width:200px;max-width:280px;white-space:normal}.tracker-customer strong{display:block;font-size:12px;font-weight:650}.tracker-customer small{display:block;font-size:10px;color:#6b8094;margin-top:7px}.tracker-customer .badge{margin-left:6px}.date-cell{white-space:nowrap}.invoice-inclusive{color:#286da9}.paid-amount{color:#28704f}.outstanding-amount{color:#b62f36}.report-table tfoot th,.report-table tfoot td{padding:17px 12px;background:#dce8f4;border-top:2px solid #779abc;font-size:12px;font-weight:750}.tracker-table tfoot th{text-align:left}.tracker-key,.expense-note{margin:18px 0 0}.sort-button{padding:0;color:white;font-size:10px;font-weight:700;letter-spacing:.5px}.sort-button:hover{background:transparent;text-decoration:underline}.segmented{display:inline-flex;gap:2px;background:#f0f4f8;padding:4px;border:1px solid #d8e2ec;border-radius:7px}.segmented .button{font-size:11px}.segmented .active{background:#194a75;color:white}.report-tools .segmented+p{margin-left:10px}.category-table{min-width:560px}.category-table tbody tr:nth-child(odd){background:#f3f7fb}.tracker-scroll{max-height:65vh}.tracker-table thead{position:sticky;top:0;z-index:1}.tracker-table tfoot{position:sticky;bottom:0;z-index:1}
@media(max-width:650px){.tracker-summary{grid-template-columns:1fr}.tracker-filters label{flex:1;min-width:125px}.tracker-summary>div{display:flex;align-items:center;justify-content:space-between}.tracker-summary span{margin:0}.report-tools .segmented+p{margin-left:0}.tracker-scroll{max-height:70vh}}


/* Download button visibility update */
button.button[data-action="tracker-csv"],
button.button[data-action="tracker-pdf"],
button.button[data-action="expense-csv"],
button.button[data-action="expense-pdf"],
button.button[data-action="aging-csv"],
button.button[data-action="aging-pdf"],
button.button[data-action="invoice-pdf"] {
  background: #194a75 !important;
  color: #fff !important;
  border-color: #194a75 !important;
}
button.button[data-action="tracker-csv"]:hover:not(:disabled),
button.button[data-action="tracker-pdf"]:hover:not(:disabled),
button.button[data-action="expense-csv"]:hover:not(:disabled),
button.button[data-action="expense-pdf"]:hover:not(:disabled),
button.button[data-action="aging-csv"]:hover:not(:disabled),
button.button[data-action="aging-pdf"]:hover:not(:disabled),
button.button[data-action="invoice-pdf"]:hover:not(:disabled) { background: #123d64 !important; border-color: #123d64 !important; }
