:root{--bg:#eef2f0;--surface:#fff;--soft:#f7faf8;--ink:#1c2522;--muted:#64716c;--line:#d8e0dc;--primary:#176b52;--dark:#0f4d3d;--blue:#2563a8;--gold:#9a6a12;--red:#b42318;--shadow:0 18px 40px #15201c17;--radius:8px;--font:"Segoe UI",Arial,sans-serif}*{box-sizing:border-box}body{background:var(--bg);color:var(--ink);font:15px var(--font);margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}.app-shell{grid-template-columns:248px minmax(0,1fr);min-height:100vh;display:grid}.sidebar{color:#f3fbf7;background:#172521;padding:22px 16px}.brand{align-items:center;gap:12px;padding:0 8px 22px;display:flex}.brand-mark{color:#172521;background:#f2c94c;border-radius:8px;place-items:center;width:42px;height:42px;font-weight:800;display:grid}.brand strong,.brand span{display:block}.brand span{color:#aab8b2;margin-top:3px;font-size:12px}.nav-list{gap:6px;display:grid}.nav-item{color:#d8e5df;text-align:left;background:0 0;border:0;border-radius:8px;width:100%;min-height:42px;padding:0 12px}.nav-item:hover,.nav-item.active{color:#fff;background:#ffffff1a}.workspace{min-width:0;padding:24px}.topbar{justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px;display:flex}.eyebrow{color:var(--muted);margin:0 0 3px;font-size:13px}h1,h2{letter-spacing:0;margin:0}h1{font-size:30px;line-height:1.15}h2{font-size:18px}.top-actions,.inline-actions,.dialog-actions{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.button,.icon-button{border:1px solid #0000;border-radius:8px;min-height:38px;padding:0 14px;font-weight:700}.button.primary{background:var(--primary);color:#fff}.button.primary:hover{background:var(--dark)}.button.secondary{color:var(--primary);border-color:var(--line);background:#fff}.button.quiet{color:var(--muted);border-color:var(--line);background:0 0}.button.danger{background:var(--red);color:#fff}.button.full{width:100%}.icon-button{background:var(--soft);width:38px;color:var(--ink);padding:0;font-size:18px}.view{display:none}.view.active{display:block}.metric-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px;display:grid}.metric,.panel,.report-tile{border:1px solid var(--line);box-shadow:var(--shadow);background:#fff;border-radius:8px}.metric{border-left:5px solid var(--primary);min-height:116px;padding:18px}.metric.accent-blue{border-left-color:var(--blue)}.metric.accent-gold{border-left-color:var(--gold)}.metric span,.report-tile span{color:var(--muted);margin-bottom:12px;font-size:13px;display:block}.metric strong{font-size:28px;line-height:1.1;display:block}.split-layout,.form-layout{grid-template-columns:minmax(300px,.95fr) minmax(420px,1.4fr);gap:16px;display:grid}.panel{min-width:0;padding:16px}.compact-panel{max-width:760px}.section-heading{justify-content:space-between;align-items:center;gap:14px;margin-bottom:14px;display:flex}.action-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;display:grid}.action-button{border:1px solid var(--line);background:var(--soft);min-height:82px;color:var(--ink);text-align:left;border-radius:8px;align-items:center;gap:12px;padding:14px;display:flex}.action-button b{min-width:42px;height:38px;color:var(--primary);background:#e3f2ed;border-radius:8px;place-items:center;display:grid}.table-wrap{border:1px solid var(--line);border-radius:8px;overflow-x:auto}table{border-collapse:collapse;width:100%;min-width:680px}th,td{border-bottom:1px solid var(--line);text-align:left;vertical-align:middle;padding:11px 12px}th{color:#fff;white-space:nowrap;background:#2f6f62;font-size:13px}tbody tr:nth-child(2n){background:#f2f8f6}tbody tr:last-child td{border-bottom:0}.number{text-align:right;font-variant-numeric:tabular-nums}.actions-col{text-align:right;width:210px}.row-actions{flex-wrap:wrap;justify-content:flex-end;gap:8px;display:flex}.small-action{border:1px solid var(--line);min-height:30px;color:var(--ink);background:#fff;border-radius:8px;padding:0 10px;font-weight:700}.small-action.danger{color:var(--red);background:#ffe8e5;border-color:#ffc7c1}.empty-row{color:var(--muted);text-align:center}.status{min-height:26px;color:var(--dark);background:#e3f2ed;border-radius:999px;align-items:center;padding:0 10px;font-size:12px;font-weight:700;display:inline-flex}.status.inactive{color:#5f666b;background:#eef0f2}.search-input,.report-select,input,select,textarea{border:1px solid var(--line);color:var(--ink);background:#fff;border-radius:8px}.search-input,.report-select{min-height:38px;padding:0 11px}.stack-form{gap:13px;display:grid}label{color:var(--muted);gap:7px;font-size:13px;font-weight:700;display:grid}input,select,textarea{min-height:40px;color:var(--ink);padding:8px 10px;font-weight:500}textarea{resize:vertical}.two-col{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;display:grid}.report-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;display:grid}.report-tile{min-height:104px;box-shadow:none;padding:16px}.report-tile strong{font-size:22px;display:block}dialog{border:0;border-radius:8px;width:min(620px,100vw - 28px);padding:0;box-shadow:0 28px 80px #00000047}dialog::backdrop{background:#11181673}.dialog-form{gap:14px;padding:18px;display:grid}.dialog-heading{justify-content:space-between;align-items:center;gap:12px;display:flex}.danger-copy{color:#7a1b14;background:#ffe8e5;border-radius:8px;margin:0;padding:12px;font-weight:700}.notice-copy{color:#6d4b0f;background:#fff4d8;border-radius:8px;margin:0;padding:12px;font-weight:700;line-height:1.45}.confirm-copy{color:var(--dark);background:#e3f2ed;border-radius:8px;margin:0;padding:12px;font-weight:800}.confirm-details{border:1px solid var(--line);background:var(--soft);border-radius:8px;grid-template-columns:auto minmax(0,1fr);gap:8px 12px;margin:0;padding:12px;display:grid}.confirm-details dt{color:var(--muted);font-size:12px;font-weight:800}.confirm-details dd{color:var(--ink);word-break:break-word;margin:0;font-weight:700}.toast{color:#fff;max-width:min(360px,100vw - 36px);min-height:42px;box-shadow:var(--shadow);z-index:10;background:#172521;border-radius:8px;align-items:center;padding:10px 14px;display:none;position:fixed;bottom:18px;right:18px}.toast.show{display:flex}@media (width<=1080px){.app-shell{grid-template-columns:1fr}.sidebar{z-index:8;padding:12px;position:sticky;top:0}.brand{padding:0 4px 10px}.nav-list{grid-template-columns:repeat(9,minmax(0,1fr));overflow-x:auto}.nav-item{text-align:center;min-width:112px}.metric-grid,.report-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.split-layout,.form-layout{grid-template-columns:1fr}}@media (width<=720px){.workspace{padding:16px}.topbar,.section-heading{flex-direction:column;align-items:stretch}.top-actions,.inline-actions{width:100%}.top-actions .button,.inline-actions .button,.search-input,.report-select{flex:140px}.metric-grid,.report-grid,.action-grid,.two-col{grid-template-columns:1fr}h1{font-size:24px}}.hidden{display:none!important}.form-actions{gap:10px;display:grid}.location-report-panel,.employee-report-panel,.payment-report-panel,.contract-work-report-panel,.entry-panel{margin-top:16px}.location-report-table,.report-detail-table{margin-top:14px}.report-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:14px;display:grid}.report-subheading{margin-bottom:8px}.db-status{color:#5f666b;white-space:nowrap;background:#eef0f2;border-radius:999px;align-items:center;min-height:30px;padding:0 10px;font-size:12px;font-weight:800;display:inline-flex}.db-status.connected{color:#0f4d3d;background:#e3f2ed}.db-status.pending{color:#9a6a12;background:#fff4d8}.attendance-report-detail{margin-top:16px}.report-filters{justify-content:flex-end}.wide-table{min-width:1160px}.contract-work-table{margin-top:14px}.report-filters .button{flex:none}.login-screen{background:linear-gradient(135deg,#e9f3ef 0%,#f7faf8 52%,#eef2f0 100%);place-items:center;min-height:100vh;padding:22px;display:grid}.login-panel{border:1px solid var(--line);width:min(430px,100vw - 36px);box-shadow:var(--shadow);background:#fff;border-radius:8px;gap:16px;padding:24px;display:grid}.login-brand{color:var(--ink);padding:0 0 6px}.login-brand span{color:var(--muted)}.login-panel h1{font-size:26px}.password-field{grid-template-columns:minmax(0,1fr) auto;gap:8px;display:grid}.password-field input{min-width:0}.password-toggle{min-width:76px}.login-actions{gap:10px;display:grid}.login-message{min-height:20px;color:var(--muted);margin:0;font-weight:700}.login-message.error{color:var(--red)}.login-message.success{color:var(--primary)}.user-chip{border:1px solid var(--line);min-height:30px;color:var(--muted);text-overflow:ellipsis;white-space:nowrap;background:#fff;border-radius:999px;align-items:center;max-width:220px;padding:0 10px;font-size:12px;font-weight:800;display:inline-flex;overflow:hidden}@media (width<=720px){.user-chip{justify-content:center;width:100%;max-width:none}}@media (width<=640px){body{background:#f4f7f5;font-size:14px}.app-shell{min-height:100dvh;display:block}.sidebar{z-index:20;padding:10px 12px 12px;position:sticky;top:0;box-shadow:0 8px 20px #0000001f}.brand{gap:10px;padding:0 2px 10px}.brand-mark{width:36px;height:36px}.brand span{font-size:11px}.nav-list{scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;gap:8px;padding-bottom:2px;display:flex;overflow-x:auto}.nav-list::-webkit-scrollbar{display:none}.nav-item{text-align:center;white-space:nowrap;scroll-snap-align:start;flex:none;min-width:auto;min-height:38px;padding:0 12px}.workspace{padding:14px 12px 22px}.topbar{gap:12px;margin-bottom:14px;display:grid}.topbar>div:first-child{min-width:0}.eyebrow{font-size:12px}h1{font-size:22px}h2{font-size:17px}.top-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;display:grid}.top-actions .user-chip,.top-actions .db-status{grid-column:1/-1;justify-content:center;width:100%;max-width:none}.button,.icon-button{min-height:42px;padding:0 12px}.button{font-size:14px}.panel{border-radius:8px;padding:12px;box-shadow:0 10px 28px #15201c12}.metric-grid,.report-grid,.action-grid,.split-layout,.form-layout,.two-col,.report-detail-grid{grid-template-columns:1fr;gap:10px}.metric{min-height:88px;padding:13px}.metric span,.report-tile span{margin-bottom:7px}.metric strong{font-size:24px}.report-tile{min-height:84px;padding:13px}.report-tile strong{font-size:19px}.section-heading{gap:10px;margin-bottom:10px}.inline-actions,.report-filters{grid-template-columns:1fr;gap:8px;width:100%;display:grid}.inline-actions .button,.search-input,.report-select,.report-filters .button{flex:auto;width:100%}.action-button{min-height:64px;padding:12px}.action-button b{min-width:34px;height:34px}input,select,textarea{min-height:44px;font-size:16px}.stack-form{gap:11px}.table-wrap{background:0 0;border:0;overflow:visible}table,table.wide-table{width:100%;min-width:0;display:block}thead{display:none}tbody{gap:10px;width:100%;display:grid}tbody tr{border:1px solid var(--line);background:#fff;border-radius:8px;display:block;overflow:hidden;box-shadow:0 8px 22px #15201c0f}tbody tr:nth-child(2n){background:#fff}tbody tr:last-child td{border-bottom:1px solid var(--line)}td{border-bottom:1px solid var(--line);text-align:left;word-break:break-word;grid-template-columns:minmax(96px,42%) minmax(0,1fr);align-items:center;gap:10px;width:100%;min-height:42px;padding:10px 12px;display:grid}td:before{color:var(--muted);text-align:left;white-space:normal;font-size:12px;font-weight:800}.number{text-align:left}.actions-col{text-align:left;width:auto}.row-actions{grid-template-columns:repeat(auto-fit,minmax(76px,1fr));justify-content:stretch;gap:7px;display:grid}.small-action{text-align:center;min-height:36px;padding:0 8px}.empty-row{text-align:center;display:block}.empty-row:before{content:none!important}#balanceTable td:first-child:before{content:"Employee"}#balanceTable td:nth-child(2):before{content:"Status"}#balanceTable td:nth-child(3):before{content:"Hours"}#balanceTable td:nth-child(4):before{content:"Balance"}#balanceTable td:nth-child(5):before{content:"Actions"}#employeeTable td:first-child:before{content:"ID"}#employeeTable td:nth-child(2):before{content:"Name"}#employeeTable td:nth-child(3):before{content:"Status"}#employeeTable td:nth-child(4):before{content:"Hire Date"}#employeeTable td:nth-child(5):before{content:"Rate"}#employeeTable td:nth-child(6):before{content:"Balance"}#employeeTable td:nth-child(7):before{content:"Actions"}#attendanceTable td:first-child:before{content:"Date"}#attendanceTable td:nth-child(2):before{content:"Employee"}#attendanceTable td:nth-child(3):before{content:"Start"}#attendanceTable td:nth-child(4):before{content:"End"}#attendanceTable td:nth-child(5):before{content:"Break"}#attendanceTable td:nth-child(6):before{content:"Site"}#attendanceTable td:nth-child(7):before{content:"Work"}#attendanceTable td:nth-child(8):before{content:"Bonus"}#attendanceTable td:nth-child(9):before{content:"Total"}#attendanceTable td:nth-child(10):before{content:"Note"}#attendanceTable td:nth-child(11):before{content:"Actions"}#attendanceReportTable td:first-child:before{content:"Date"}#attendanceReportTable td:nth-child(2):before{content:"Employee"}#attendanceReportTable td:nth-child(3):before{content:"Site"}#attendanceReportTable td:nth-child(4):before{content:"Start"}#attendanceReportTable td:nth-child(5):before{content:"End"}#attendanceReportTable td:nth-child(6):before{content:"Break"}#attendanceReportTable td:nth-child(7):before{content:"Work"}#attendanceReportTable td:nth-child(8):before{content:"Bonus"}#attendanceReportTable td:nth-child(9):before{content:"Total"}#attendanceReportTable td:nth-child(10):before{content:"Rate"}#attendanceReportTable td:nth-child(11):before{content:"Earned"}#attendanceReportTable td:nth-child(12):before{content:"Note"}#attendanceReportTable td:nth-child(13):before{content:"Actions"}#paymentTable td:first-child:before{content:"Date"}#paymentTable td:nth-child(2):before{content:"Employee"}#paymentTable td:nth-child(3):before{content:"Type"}#paymentTable td:nth-child(4):before{content:"Site"}#paymentTable td:nth-child(5):before{content:"Value"}#paymentTable td:nth-child(6):before{content:"Note"}#paymentTable td:nth-child(7):before{content:"Actions"}#locationTable td:first-child:before{content:"Site"}#locationTable td:nth-child(2):before{content:"Status"}#locationTable td:nth-child(3):before{content:"Site Location"}#locationTable td:nth-child(4):before{content:"Records"}#locationTable td:nth-child(5):before{content:"Hours"}#locationTable td:nth-child(6):before{content:"Wages"}#locationTable td:nth-child(7):before{content:"Contracts"}#locationTable td:nth-child(8):before{content:"Adjustments"}#locationTable td:nth-child(9):before{content:"Balance"}#locationTable td:nth-child(10):before{content:"Note"}#locationTable td:nth-child(11):before{content:"Actions"}#contractWorkTable td:first-child:before{content:"Date"}#contractWorkTable td:nth-child(2):before{content:"Work site"}#contractWorkTable td:nth-child(3):before{content:"Work description"}#contractWorkTable td:nth-child(4):before{content:"Contractor"}#contractWorkTable td:nth-child(5):before{content:"Value of work"}#contractWorkTable td:nth-child(6):before{content:"Actions"}#reportEmployeeTable td:first-child:before{content:"ID"}#reportEmployeeTable td:nth-child(2):before{content:"Employee"}#reportEmployeeTable td:nth-child(3):before{content:"Status"}#reportEmployeeTable td:nth-child(4):before{content:"Rate"}#reportEmployeeTable td:nth-child(5):before{content:"Hours"}#reportEmployeeTable td:nth-child(6):before{content:"Wages"}#reportEmployeeTable td:nth-child(7):before{content:"Payments"}#reportEmployeeTable td:nth-child(8):before{content:"Remaining"}#reportEmployeeTable td:nth-child(9):before{content:"Actions"}#reportSiteTable td:first-child:before{content:"Site"}#reportSiteTable td:nth-child(2):before{content:"Site Location"}#reportSiteTable td:nth-child(3):before{content:"Records"}#reportSiteTable td:nth-child(4):before{content:"Hours"}#reportSiteTable td:nth-child(5):before{content:"Wages"}#reportSiteTable td:nth-child(6):before{content:"Contracts"}#reportSiteTable td:nth-child(7):before{content:"Adjustments"}#reportSiteTable td:nth-child(8):before{content:"Balance"}#reportSiteTable td:nth-child(9):before{content:"Actions"}#reportAttendanceTable td:first-child:before{content:"Date"}#reportAttendanceTable td:nth-child(2):before{content:"Employee"}#reportAttendanceTable td:nth-child(3):before{content:"Site"}#reportAttendanceTable td:nth-child(4):before{content:"Hours"}#reportAttendanceTable td:nth-child(5):before{content:"Earned"}#reportAttendanceTable td:nth-child(6):before{content:"Actions"}#reportPaymentTable td:first-child:before{content:"Date"}#reportPaymentTable td:nth-child(2):before{content:"Employee"}#reportPaymentTable td:nth-child(3):before{content:"Type"}#reportPaymentTable td:nth-child(4):before{content:"Site"}#reportPaymentTable td:nth-child(5):before{content:"Value"}#reportPaymentTable td:nth-child(6):before{content:"Note"}#reportPaymentTable td:nth-child(7):before{content:"Actions"}#reportContractWorkTable td:first-child:before{content:"Date"}#reportContractWorkTable td:nth-child(2):before{content:"Work site"}#reportContractWorkTable td:nth-child(3):before{content:"Work description"}#reportContractWorkTable td:nth-child(4):before{content:"Contractor"}#reportContractWorkTable td:nth-child(5):before{content:"Value of work"}#reportContractWorkTable td:nth-child(6):before{content:"Actions"}#logTable td:first-child:before{content:"Date"}#logTable td:nth-child(2):before{content:"Time"}#logTable td:nth-child(3):before{content:"Action"}#logTable td:nth-child(4):before{content:"Item"}#logTable td:nth-child(5):before{content:"User"}#logTable td:nth-child(6):before{content:"Details"}dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 20px);margin:auto}.dialog-form{max-height:calc(100dvh - 20px);padding:14px;overflow-y:auto}.dialog-actions{grid-template-columns:1fr;gap:8px;display:grid}.dialog-actions .button{width:100%}.confirm-details{grid-template-columns:1fr;gap:5px}.confirm-details dt{margin-top:3px}.login-screen{min-height:100dvh;padding:14px}.login-panel{gap:14px;width:100%;padding:18px}.login-panel h1{font-size:24px}.login-brand{padding-bottom:2px}.toast{max-width:none;bottom:12px;left:12px;right:12px}}@media (width<=380px){.top-actions,.row-actions{grid-template-columns:1fr}td{grid-template-columns:1fr;gap:4px}.small-action{width:100%}}.checkbox-row{color:var(--ink);align-items:center;gap:9px;display:flex}.checkbox-row input{width:16px;height:16px;min-height:auto;accent-color:var(--primary);padding:0}.attendance-report-detail .scrollable-table,.employee-report-panel .scrollable-table,.payment-report-panel .scrollable-table,.location-report-panel .scrollable-table,.contract-work-report-panel .scrollable-table,.log-panel .scrollable-table{max-height:min(58vh,620px);overflow:auto}.attendance-report-detail .scrollable-table th,.employee-report-panel .scrollable-table th,.payment-report-panel .scrollable-table th,.location-report-panel .scrollable-table th,.contract-work-report-panel .scrollable-table th,.log-panel .scrollable-table th{z-index:1;position:sticky;top:0}#reports .report-table-wrap{max-height:332px;overflow:auto}#reports .report-table-wrap th{z-index:1;position:sticky;top:0}#reports .reports-detail-grid{grid-template-columns:1fr}#reports .reports-detail-grid>.panel{width:100%}@media (width>=1081px){.sidebar{align-self:start;height:100vh;position:sticky;top:0;overflow-y:auto}}@media (width<=1080px){.sidebar{height:auto;overflow-y:visible}}.dashboard-chart-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:16px;display:grid}.chart-panel{min-height:226px}.chart-bars{gap:14px;display:grid}.chart-row{gap:7px;display:grid}.chart-row-head{justify-content:space-between;align-items:center;gap:12px;display:flex}.chart-row-head span{color:var(--ink);text-overflow:ellipsis;white-space:nowrap;min-width:0;font-weight:800;overflow:hidden}.chart-row-head strong{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:13px}.chart-track{background:#eef2f0;border:1px solid #dfe7e3;border-radius:999px;height:14px;overflow:hidden}.chart-fill{background:var(--primary);border-radius:999px;height:100%;display:block}.chart-fill.blue{background:var(--blue)}.chart-fill.gold{background:var(--gold)}.chart-fill.red{background:var(--red)}.chart-fill.green{background:var(--primary)}.chart-empty{text-align:center;min-height:130px;color:var(--muted);background:var(--soft);border:1px dashed var(--line);border-radius:8px;place-items:center;margin:0;padding:16px;font-weight:800;display:grid}@media (width<=1080px){.dashboard-chart-grid{grid-template-columns:1fr}}@media (width<=640px){.dashboard-chart-grid{gap:10px}.chart-panel{min-height:0}.chart-row-head{align-items:flex-start}.chart-row-head span{white-space:normal}.chart-track{height:16px}}.month-filter{border:1px solid var(--line);min-height:38px;color:var(--muted);background:#fff;border-radius:8px;align-items:center;gap:8px;padding:0 10px;font-size:12px;font-weight:800;display:flex}.month-filter select{min-height:30px;color:var(--ink);background:0 0;border:0;padding:0 4px;font-size:13px;font-weight:800}@media (width<=640px){.month-filter{grid-column:1/-1;justify-content:center;width:100%}.month-filter select{min-width:160px}}button:disabled{cursor:not-allowed;opacity:.55}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline-offset:2px;outline:3px solid #2563a83d}.page-stack{gap:16px;display:grid}dialog[open]{z-index:30;max-height:calc(100dvh - 28px);margin:auto;position:fixed;inset:0;overflow:auto;box-shadow:0 0 0 100vmax #11181673,0 28px 80px #00000047}dialog[open] .dialog-form{max-height:calc(100dvh - 28px);overflow:auto}@media print{.sidebar,.top-actions,dialog[open],.row-actions{display:none!important}.app-shell{display:block}.workspace{padding:0}.panel,.report-tile{break-inside:avoid;box-shadow:none}}
