:root{--bg: #fafafa;--surface: #ffffff;--subtle: #f5f5f5;--border: #eaeaea;--border-strong: #d4d4d4;--text: #111111;--text-muted: #737373;--text-faint: #d4d4d4;--accent: #111111;--accent-hover: #262626;--radius: 10px}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text);font-size:14px;line-height:1.4;-webkit-font-smoothing:antialiased}.topbar{position:sticky;top:0;z-index:100;background:#fff;border-bottom:1px solid var(--border);padding-top:env(safe-area-inset-top)}.topbar-inner{max-width:1440px;margin:0 auto;height:52px;padding:0 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.topbar-left,.topbar-right,.period-picker{display:flex;align-items:center;gap:8px}.brand-title{font-size:15px;font-weight:700;letter-spacing:-.01em;margin-right:6px}.period-select{padding:6px 10px;border:1px solid var(--border);border-radius:8px;font-size:13px;font-weight:600;background:var(--surface);color:var(--text);cursor:pointer}.period-select:focus{outline:none;border-color:var(--text)}button,a.dropdown-item{font-family:inherit;font-size:13px;font-weight:500;border:none;background:transparent;color:var(--text);cursor:pointer;display:inline-flex;align-items:center;gap:6px;text-decoration:none;border-radius:8px;transition:background .12s,color .12s}.icon-btn{width:32px;height:32px;padding:0;justify-content:center;border:1px solid var(--border);background:var(--surface);color:var(--text)}.icon-btn:hover{background:var(--subtle)}.btn-primary,.btn-primary-sm{background:var(--accent);color:#fff;padding:7px 14px;font-weight:600}.btn-primary:hover,.btn-primary-sm:hover{background:var(--accent-hover)}.btn-primary-sm{padding:5px 10px;font-size:12.5px}.btn-ghost,.btn-ghost-sm{border:1px solid var(--border);background:var(--surface);padding:7px 12px}.btn-ghost-sm{padding:5px 10px;font-size:12.5px}.btn-ghost:hover,.btn-ghost-sm:hover{background:var(--subtle)}.btn-text{padding:4px 8px;font-size:12.5px;color:var(--text)}.btn-text:hover{background:var(--subtle)}.btn-text-danger{color:#b91c1c}.btn-text-danger:hover{background:#fef2f2}.btn-danger{background:#b91c1c;color:#fff;padding:7px 16px;font-weight:600}.btn-danger:hover{background:#991b1b}.confirm-text{margin:0 0 18px;font-size:14px;line-height:1.5}.saving-dot{font-size:12px;color:var(--text-muted)}.menu-anchor{position:relative}.dropdown-menu{position:absolute;top:calc(100% + 6px);right:0;min-width:185px;background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:4px;box-shadow:0 8px 24px #00000014;display:flex;flex-direction:column;z-index:40}.dropdown-item{width:100%;padding:9px 10px;border-radius:7px;font-size:13px;color:var(--text);justify-content:flex-start}.dropdown-item:hover{background:var(--subtle)}.dropdown-divider{height:1px;background:var(--border);margin:4px 0}.dropdown-item-danger{color:#b91c1c}.pin-screen{min-height:100vh;min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));background:var(--bg)}.pin-card{width:100%;max-width:320px;background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:24px 20px 20px;display:flex;flex-direction:column;align-items:center;text-align:center}.pin-icon-wrap{width:40px;height:40px;border-radius:999px;background:var(--subtle);display:grid;place-items:center;margin-bottom:10px;color:var(--text)}.pin-title{margin:0 0 4px;font-size:17px;font-weight:700}.pin-subtitle{margin:0 0 18px;font-size:12.5px;color:var(--text-muted)}.pin-dots{height:28px;display:flex;align-items:center;justify-content:center;gap:10px}.pin-dots-placeholder{letter-spacing:6px;font-size:18px;color:var(--text-faint)}.pin-dot{width:11px;height:11px;border-radius:999px;background:var(--text)}.pin-error-slot{min-height:22px;margin:6px 0 10px;display:flex;align-items:center;justify-content:center}.pin-error{font-size:12px;color:#b91c1c;font-weight:500}.pin-pad{width:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:16px}.pin-key{height:52px;border-radius:12px;border:1px solid var(--border);background:var(--surface);font-size:19px;font-weight:600;color:var(--text);justify-content:center;-webkit-user-select:none;user-select:none}.pin-key:hover:not(:disabled){background:var(--subtle)}.pin-key:active:not(:disabled){background:var(--border)}.pin-key-aux{border-color:transparent;font-size:13px;color:var(--text-muted)}.pin-key:disabled{opacity:.35;cursor:default}.pin-submit-btn{width:100%;height:42px;justify-content:center;border-radius:10px;font-size:14px}.pin-submit-btn:disabled{opacity:.4;cursor:default}.pin-form-stack{display:flex;flex-direction:column;gap:12px;margin-bottom:14px}.pin-form-stack label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--text-muted)}.pin-form-stack input{padding:8px 10px;border:1px solid var(--border-strong);border-radius:8px;font-size:15px;letter-spacing:3px;color:var(--text);background:var(--surface)}.modal-error{font-size:12.5px;color:#b91c1c;margin-bottom:12px}.main-content{max-width:1440px;margin:0 auto;padding:14px 16px 40px}.loading-state{text-align:center;padding:64px 16px;color:var(--text-muted)}.empty-state{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;padding:64px 16px}.empty-state p{margin:0}.period-empty-btn{height:36px;padding:0 12px;font-size:13.5px;font-weight:600}.summary-strip{display:flex;align-items:center;justify-content:space-between;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:10px 16px;margin-bottom:14px;font-variant-numeric:tabular-nums}.strip-item{display:flex;align-items:baseline;gap:8px;flex:1;justify-content:center}.strip-label{font-size:12px;color:var(--text-muted)}.strip-value{font-size:15px;font-weight:600}.strip-item-total .strip-value{font-weight:700}.strip-sub{font-size:12px;color:var(--text-muted)}.strip-divider{width:1px;height:20px;background:var(--border)}.tabs-bar{display:flex;gap:18px;border-bottom:1px solid var(--border);margin-bottom:14px}.tab-btn{padding:8px 2px;border-radius:0;color:var(--text-muted);border-bottom:2px solid transparent;margin-bottom:-1px;font-size:13.5px}.tab-btn:hover{color:var(--text)}.tab-btn.active{color:var(--text);font-weight:600;border-bottom-color:var(--text)}.timesheet-section,.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:clip}.timesheet-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-bottom:1px solid var(--border)}.segmented{display:inline-flex;background:var(--subtle);padding:2px;border-radius:8px;gap:2px}.seg-btn{padding:5px 10px;font-size:12.5px;color:var(--text-muted);border-radius:6px}.seg-btn.active{background:var(--surface);color:var(--text);font-weight:600;box-shadow:0 1px 2px #0000000f}.table-scroll-container{overflow:auto;max-height:calc(100vh - 180px);-webkit-overflow-scrolling:touch;width:100%}.timesheet-table{width:100%;border-collapse:separate;border-spacing:0;font-variant-numeric:tabular-nums}.timesheet-table th,.timesheet-table td{border-right:1px solid var(--border);border-bottom:1px solid var(--border);text-align:center;white-space:nowrap}.timesheet-table th:last-child,.timesheet-table td:last-child{border-right:none}.timesheet-table thead th{position:sticky;top:0;z-index:10;background:var(--surface);color:var(--text-muted);font-weight:600;font-size:11.5px;letter-spacing:.02em;padding:10px 6px;border-bottom:1px solid var(--border-strong)}.timesheet-table .sticky-col{position:sticky;left:0;z-index:15;min-width:88px;text-align:left;padding:0 10px;background:var(--surface);border-right:1px solid var(--border-strong)}.timesheet-table thead .corner-cell{z-index:25}.emp-header-cell{min-width:76px}.row-total-header{min-width:72px}.half-spacer-row td{height:10px;background:var(--bg);border-right:none}.day-cell{padding:0 10px;font-size:12.5px}.day-cell-inner{display:flex;align-items:center;justify-content:space-between;gap:6px;height:31px}.day-num{font-weight:600}.day-weekday{font-size:11px;color:var(--text-muted)}.row-weekend td,.row-weekend .sticky-col{background:#fcfcfc}.data-cell{padding:0}.cell-input{width:100%;min-width:70px;height:31px;border:none;outline:none;background:transparent;text-align:center;font-family:inherit;font-size:13px;font-variant-numeric:tabular-nums;color:var(--text);padding:0 4px}.cell-input:focus{background:var(--subtle);box-shadow:inset 0 0 0 1.5px var(--text)}.cell-input-zero{color:var(--text-faint)}.cell-input-active{font-weight:500}.cell-input-rate{color:var(--text-muted);font-weight:600}.row-total-cell{color:var(--text-muted);font-size:12px;padding:0 8px}.summary-row td{height:33px;background:var(--subtle)}.summary-row .sticky-col{background:var(--subtle);font-size:11px;font-weight:600;color:var(--text-muted);letter-spacing:.02em}.summary-hours-row td{border-top:1px solid var(--border-strong);font-weight:600}.summary-rate-row td,.summary-rate-row .sticky-col{background:var(--surface)}.summary-pay-row td{font-weight:700;border-bottom:1px solid var(--border-strong)}.summary-val{padding:0 8px;font-size:12.5px}.pay-val{color:var(--text)}.daily-view{background:var(--surface)}.daily-header{padding:10px 12px 8px;border-bottom:1px solid var(--border)}.daily-nav-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.daily-nav-arrows{display:flex;align-items:center;gap:6px}.daily-arrow-btn{width:32px;height:32px;padding:0;justify-content:center;border:1px solid var(--border);border-radius:8px;background:var(--surface)}.daily-arrow-btn:disabled{opacity:.3}.daily-date-label{display:flex;align-items:baseline;justify-content:center;width:132px;gap:5px;padding:0 4px;font-size:14.5px;font-variant-numeric:tabular-nums;white-space:nowrap}.daily-meta-sep{color:var(--text-faint)}.rate-chip-btn{padding:5px 10px;font-size:12px;font-weight:600;border:1px solid var(--border);border-radius:999px;color:var(--text-muted)}.rate-chip-btn.active{background:var(--text);color:#fff;border-color:var(--text)}.day-chip-strip{display:flex;gap:4px;overflow-x:auto;-webkit-overflow-scrolling:touch;padding:2px 0;scrollbar-width:none}.day-chip-strip::-webkit-scrollbar{display:none}.day-chip{flex:0 0 auto;min-width:38px;height:42px;padding:2px 4px;border-radius:8px;color:var(--text-muted);display:flex;flex-direction:column;align-items:center;justify-content:center}.day-chip.half-split{margin-left:10px}.day-chip.active{background:var(--text);color:#fff}.chip-num{font-size:13px;font-weight:600;line-height:1.1}.chip-wd{font-size:9.5px;opacity:.7}.mobile-rates-panel{margin-top:10px;padding-top:10px;border-top:1px solid var(--border);display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:6px}.mobile-rate-row{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:4px 8px;border:1px solid var(--border);border-radius:8px}.mobile-rate-name{font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis}.daily-list{display:flex;flex-direction:column}.daily-row-wrap{border-bottom:1px solid var(--border)}.daily-row-wrap:last-child{border-bottom:none}.daily-row-wrap.expanded{background:#fafafa}.daily-row{display:flex;align-items:center;justify-content:space-between;padding:8px 14px;min-height:48px;cursor:pointer}.daily-row-left{display:flex;flex-direction:column;gap:1px}.daily-emp-title-row{display:flex;align-items:center;gap:5px}.daily-chevron{color:var(--text-muted);transition:transform .16s ease;flex-shrink:0}.daily-chevron.open{transform:rotate(180deg);color:var(--text)}.daily-emp-name{font-size:14px;font-weight:600}.daily-emp-sub{font-size:11.5px;color:var(--text-muted);font-variant-numeric:tabular-nums;padding-left:20px}.mobile-num-input{width:64px;height:36px;border:1px solid var(--border);border-radius:8px;text-align:center;font-size:15px;font-weight:600;color:var(--text);background:var(--subtle);font-variant-numeric:tabular-nums}.mobile-num-input.is-zero{color:var(--text-muted);font-weight:400}.mobile-num-input:focus{outline:none;border-color:var(--text);background:var(--surface)}.mobile-rate-input{width:54px;height:32px;font-size:14px}.preset-row{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;padding:0 14px 10px}.preset-btn{height:34px;padding:0;justify-content:center;border-radius:7px;border:1px solid var(--border);background:var(--surface);font-size:13px;font-weight:500}.preset-btn.active{background:var(--text);color:#fff;border-color:var(--text)}.muted{color:var(--text-muted)}.add-employee-form{display:flex;gap:8px;padding:12px 14px;border-bottom:1px solid var(--border)}.add-employee-form input[type=text]{flex:1;min-width:160px;padding:7px 10px;border:1px solid var(--border);border-radius:8px;font-size:13.5px}.add-employee-form input:focus{outline:none;border-color:var(--text)}.input-with-suffix{display:inline-flex;align-items:center;border:1px solid var(--border);border-radius:8px;background:var(--surface)}.input-with-suffix input{border:none!important;outline:none;width:64px!important;min-width:64px!important;text-align:right;padding:7px 4px!important}.input-with-suffix span{padding:0 8px 0 2px;font-size:12px;color:var(--text-muted)}.emp-list{display:flex;flex-direction:column}.emp-row{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid var(--border);gap:8px}.emp-row:last-child{border-bottom:none}.emp-row-info{display:flex;align-items:baseline;gap:10px}.emp-edit-row{display:flex;align-items:center;gap:6px;width:100%;min-width:0}.inline-edit-input{flex:1 1 0;min-width:0;width:100%;padding:6px 8px;border:1px solid var(--border-strong);border-radius:7px;font-size:13.5px}.inline-rate-input{flex:0 0 64px;width:64px;min-width:64px;text-align:right}.actions-cell{display:flex;gap:4px}.emp-section-label{padding:10px 14px 6px;font-size:11.5px;font-weight:600;color:var(--text-muted);background:var(--subtle);border-top:1px solid var(--border);border-bottom:1px solid var(--border)}.row-archived{opacity:.6}.stats-stack{display:flex;flex-direction:column;gap:14px}.stats-header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--border)}.stats-header h3{margin:0;font-size:14.5px;font-weight:700}.stats-select{padding:6px 10px;border:1px solid var(--border);border-radius:8px;font-size:13px;font-weight:600;background:var(--surface);color:var(--text);cursor:pointer}.summary-strip-embedded{border:none;border-radius:0;border-bottom:1px solid var(--border);margin-bottom:0}.stats-meta-grid,.stats-kpi-grid{display:grid;grid-template-columns:repeat(3,1fr);border-bottom:1px solid var(--border);font-variant-numeric:tabular-nums}.stats-meta-grid{border-bottom:none}.stats-meta-cell,.stats-kpi{padding:12px 14px;display:flex;flex-direction:column;gap:2px;border-right:1px solid var(--border)}.stats-meta-cell:last-child,.stats-kpi:last-child{border-right:none}.stats-meta-cell span,.stats-kpi>span:first-child{font-size:11.5px}.stats-kpi strong{font-size:16px}.stats-subhead{padding:10px 14px 6px;font-size:11.5px;font-weight:600;color:var(--text-muted);background:var(--subtle);border-bottom:1px solid var(--border)}.stats-list{display:flex;flex-direction:column}.stats-list-row{width:100%;display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid var(--border);border-radius:0;text-align:left;font-variant-numeric:tabular-nums}.stats-list-row:last-child{border-bottom:none}.stats-list-row:not(.static):hover{background:var(--subtle)}.stats-list-row.active{background:var(--subtle)}.stats-list-left,.stats-list-right{display:flex;flex-direction:column;gap:2px}.stats-list-right{text-align:right}.stats-list-left span,.stats-list-right span{font-size:11.5px}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:200;background:#00000059;display:grid;place-items:center;padding:16px}.modal-card{background:var(--surface);border-radius:12px;width:100%;max-width:400px;max-height:88vh;overflow-y:auto;box-shadow:0 16px 40px #00000029}.modal-card-lg{max-width:640px}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--border)}.modal-header h3{margin:0;font-size:15px}.modal-sub{font-size:12px;color:var(--text-muted)}.modal-form{padding:16px}.modal-note{margin:0 0 14px;font-size:12.5px;color:var(--text-muted)}.form-row{display:grid;grid-template-columns:1fr 100px;gap:10px;margin-bottom:16px}.form-row label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--text-muted)}.form-row select,.form-row input{padding:8px 10px;border:1px solid var(--border-strong);border-radius:8px;font-size:14px;color:var(--text);background:var(--surface)}.modal-footer{display:flex;justify-content:flex-end;gap:8px}.toast{position:fixed;bottom:20px;right:20px;z-index:60;padding:9px 14px;border-radius:8px;font-size:13px;font-weight:500;box-shadow:0 8px 24px #00000024}.toast-ok{background:#111;color:#fff}.toast-err{background:#b91c1c;color:#fff}.mobile-bottom-nav{display:none}@media(max-width:640px){body{margin:0;-webkit-tap-highlight-color:transparent}.app-shell{min-height:100vh;background:var(--bg)}.topbar{position:fixed;top:0;left:0;right:0;width:100%;z-index:100;background:#fff;border-bottom:1px solid var(--border);padding-top:env(safe-area-inset-top)}input,select{font-size:16px!important}.brand-title,.tabs-bar,.desktop-table-only{display:none!important}.topbar-inner{width:100%;height:52px;padding:0 12px;gap:8px}.topbar-left{flex:1;min-width:0}.period-select{height:36px;max-width:100%;padding:4px 10px;font-size:15px!important;font-weight:600;line-height:1.3}.topbar-right{flex-shrink:0;gap:6px}.topbar .icon-btn{width:36px;height:36px}.saving-dot{display:none}.main-content{width:100%;overflow:visible;padding:calc(62px + env(safe-area-inset-top)) 10px calc(80px + env(safe-area-inset-bottom))}.summary-strip{padding:8px 6px;margin-bottom:10px}.strip-item{flex-direction:column;align-items:center;gap:1px}.strip-label{font-size:10.5px}.strip-value{font-size:13.5px}.strip-sub{font-size:10.5px}.strip-divider{height:28px}.timesheet-toolbar{padding:8px 10px}.table-scroll-container{max-height:calc(100dvh - 190px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}.timesheet-table .sticky-col{min-width:64px;padding:0 6px}.day-cell-inner,.cell-input{height:38px}.add-employee-form{flex-wrap:wrap;padding:10px 12px}.add-employee-form button{width:100%;justify-content:center;padding:10px}.modal-backdrop{padding:12px;align-items:center}.modal-card{border-radius:14px;padding-bottom:4px}.stats-kpi-grid{grid-template-columns:1fr}.stats-kpi{border-right:none;border-bottom:1px solid var(--border)}.stats-kpi:last-child{border-bottom:none}.payslip-halves{grid-template-columns:1fr}.toast{left:12px;right:12px;bottom:calc(68px + env(safe-area-inset-bottom));text-align:center}.mobile-bottom-nav{display:grid;grid-template-columns:repeat(3,1fr);position:fixed;left:0;right:0;bottom:0;width:100%;z-index:100;background:#fff;border-top:1px solid var(--border);padding:6px 8px calc(8px + env(safe-area-inset-bottom))}.mobile-nav-item{color:#9ca3af;flex-direction:column;justify-content:center;gap:2px;padding:4px;font-size:10.5px;font-weight:500}.mobile-nav-item.active{color:var(--text);font-weight:600}}
