:root{--bg: #f5f6f8;--surface: #ffffff;--border: #d8dadf;--text: #1f2329;--muted: #5a6371;--primary: #2962ff;--primary-hover: #1e4cd9;--danger: #c0392b;--success: #2e7d32;--warning: #b87800;--shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.06)}*{box-sizing:border-box}html,body{margin:0;padding:0;height:100%}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;color:var(--text);background:var(--bg);font-size:14px;line-height:1.45}.hidden{display:none!important}.muted{color:var(--muted)}.small{font-size:12px}.screen{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}.card{background:var(--surface);border:1px solid var(--border);border-radius:8px;box-shadow:var(--shadow);padding:32px;width:100%;max-width:380px}.card h1{margin:0 0 6px;font-size:28px;color:var(--primary)}.card p{margin:0 0 20px}label{display:block;margin-bottom:14px;font-weight:500;color:var(--text)}label>input:not([type=checkbox]):not([type=radio]),label>select,label>textarea{display:block;width:100%;margin-top:6px}label>input[type=checkbox],label>input[type=radio]{margin-right:8px;vertical-align:middle}input[type=text],input[type=email],input[type=password],input[type=date],input[type=number],select,textarea{padding:9px 12px;border:1px solid var(--border);border-radius:6px;font-size:14px;background:#fff;font-family:inherit}.modal label{font-weight:500}.toolbar label{display:flex;align-items:center;gap:8px;margin-bottom:0}.toolbar label>input:not([type=checkbox]):not([type=radio]),.toolbar label>select,.toolbar label>textarea{display:inline-block;width:auto;margin-top:0}input:focus,select:focus,textarea:focus{outline:2px solid var(--primary);outline-offset:-2px;border-color:transparent}button{cursor:pointer;background:var(--primary);color:#fff;border:none;border-radius:6px;padding:10px 18px;font-size:14px;font-weight:500;font-family:inherit}button:hover{background:var(--primary-hover)}button:disabled{opacity:.6;cursor:not-allowed}button.secondary{background:var(--surface);color:var(--text);border:1px solid var(--border)}button.secondary:hover{background:var(--bg)}button.danger{background:var(--danger)}button.link{background:none;color:var(--primary);padding:0;text-decoration:underline}button.link:hover{background:none;color:var(--primary-hover)}.error{color:var(--danger);margin-top:12px;min-height:18px}#app{display:flex;height:100vh}.sidebar{width:220px;background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column}.brand{font-size:22px;font-weight:700;color:var(--primary);padding:20px 20px 16px}.sidebar-tenant-wrapper{padding:0 12px 8px;border-bottom:1px solid var(--border)}.sidebar-company-name{font-size:.9rem;font-weight:600;color:var(--text);padding:6px 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-tenant-select{width:100%;font-size:.875rem;padding:6px 8px;border:1px solid var(--border);border-radius:6px;background:var(--bg);color:var(--text);cursor:pointer}.sidebar nav{display:flex;flex-direction:column;padding:8px 0;flex:1;overflow-y:auto}.nav-section{display:flex;flex-direction:column;margin-bottom:4px}.nav-label{padding:10px 20px 4px;font-size:.7rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted, #888);pointer-events:none;-webkit-user-select:none;user-select:none}.sidebar nav a{padding:8px 20px 8px 28px;color:var(--text);text-decoration:none;border-left:3px solid transparent;font-size:.925rem}.sidebar nav a.nav-company{padding:10px 20px;font-weight:500;font-size:1rem}.sidebar nav a:hover{background:var(--bg)}.sidebar nav a.active{background:var(--bg);border-left-color:var(--primary);font-weight:500}.sidebar-footer{padding:16px 20px;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:6px}main{flex:1;overflow-y:auto;padding:28px 32px}.page-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;flex-wrap:wrap;gap:12px}.page-header h2{margin:0;font-size:22px}.toolbar{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-bottom:16px}table{width:100%;border-collapse:collapse;background:var(--surface);border:1px solid var(--border);border-radius:8px}th,td{text-align:left;padding:10px 14px;border-bottom:1px solid var(--border)}th{background:var(--bg);font-weight:600;font-size:12px;text-transform:uppercase;color:var(--muted);letter-spacing:.04em}tr:last-child td{border-bottom:none}tbody tr:hover{background:#fafbfc}td.actions{white-space:nowrap;text-align:right}td.actions button{padding:5px 10px;font-size:12px;margin-left:6px}.badge{display:inline-block;padding:2px 8px;border-radius:10px;font-size:11px;font-weight:600;text-transform:uppercase}.badge.green{background:#e3f3e6;color:var(--success)}.badge.red{background:#fbe6e3;color:var(--danger)}.badge.yellow{background:#fff4d6;color:#8a6500}.badge.gray{background:var(--bg);color:var(--muted)}td.row-actions{white-space:nowrap;text-align:right}td.row-actions button{padding:4px 10px;font-size:12px;margin-left:4px}.empty{text-align:center;padding:40px;color:var(--muted);background:var(--surface);border:1px dashed var(--border);border-radius:8px}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000059;display:flex;align-items:center;justify-content:center;padding:24px;z-index:100}.modal{background:var(--surface);border-radius:8px;box-shadow:var(--shadow);padding:24px;width:100%;max-width:480px;max-height:90vh;overflow-y:auto}.modal h3{margin:0 0 16px}.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:20px}#toast-container{position:fixed;bottom:24px;right:24px;display:flex;flex-direction:column;gap:8px;z-index:200}.toast{background:var(--text);color:#fff;padding:12px 18px;border-radius:6px;box-shadow:var(--shadow);max-width:360px;animation:toast-in .2s ease-out}.toast.error{background:var(--danger)}.toast.success{background:var(--success)}@keyframes toast-in{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}@media(max-width:720px){#app{flex-direction:column}.sidebar{width:100%;flex-direction:row;align-items:center}.brand{padding:12px 16px}.sidebar nav{flex-direction:row;padding:0;overflow-x:auto}.sidebar nav a{white-space:nowrap;border-left:none;border-bottom:3px solid transparent}.sidebar nav a.active{border-left:none;border-bottom-color:var(--primary)}.sidebar-footer{padding:8px 12px;flex-direction:row}main{padding:16px}}code,.mono{font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;background:var(--bg);padding:1px 6px;border-radius:3px}td code+.muted{display:block;margin-top:2px}.report-page-header{margin-bottom:20px}.report-page-header h2{margin-bottom:2px}.report-page-header p{margin:0}.report-filter-panel{background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow);padding:18px 20px 8px;margin-bottom:24px}.report-filter-row{margin-bottom:14px}.report-actions-row{padding-top:14px;border-top:1px solid var(--border)}.report-presets{display:flex;flex-direction:column;gap:10px;margin:4px 0 10px;padding-top:4px}.preset-group{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.preset-label{font-size:13px;color:var(--muted);min-width:160px}.preset-group button.preset{padding:6px 14px;font-size:13px}.report-overview,.report-panel,.report-employees-section{margin-top:24px}.report-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}.report-heading h3,.report-section-title h3{margin:0;font-size:18px}.report-heading span{color:var(--muted)}.report-period-badge{background:#e8eeff;color:#244ec4!important;border-radius:999px;padding:6px 11px;font-size:12px;font-weight:650;white-space:nowrap}.report-kpis{display:grid;grid-template-columns:repeat(4,minmax(145px,1fr));gap:12px}.report-kpi{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:16px 18px;display:flex;flex-direction:column;min-height:112px}.report-kpi.primary{background:linear-gradient(135deg,#285ce5,#477aff);border-color:transparent;color:#fff}.report-kpi>span{color:var(--muted);font-size:12px;font-weight:600}.report-kpi.primary>span,.report-kpi.primary>small{color:#ffffffd1}.report-kpi>strong{font-size:28px;line-height:1.15;margin:8px 0 2px}.report-kpi>small{color:var(--muted)}.report-panel{background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow);padding:20px}.report-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.report-section-title p{color:var(--muted);margin:3px 0 0;font-size:13px}.report-chart-scroll{overflow-x:auto;padding:16px 2px 2px}.report-daily-chart{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(46px,1fr);align-items:end;min-width:max-content;height:210px;gap:6px;border-bottom:1px solid var(--border)}.report-chart-day{width:54px;height:100%;display:grid;grid-template-rows:22px 1fr 18px 22px;text-align:center;align-items:end}.report-chart-day.weekend{background:#2962ff09}.report-chart-value{font-size:11px;font-weight:650;color:#34445e}.report-chart-track{width:26px;height:100%;margin:0 auto;display:flex;align-items:end;background:#eef1f5;border-radius:5px 5px 0 0;overflow:hidden}.report-chart-track span{display:block;width:100%;min-height:2px;background:linear-gradient(180deg,#5d85ff,#2962ff);border-radius:5px 5px 0 0}.report-chart-day strong{font-size:10px;text-transform:uppercase;color:var(--muted)}.report-chart-day small{font-size:10px;color:var(--muted)}.report-week-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px}.report-week-card{border:1px solid var(--border);border-radius:9px;padding:13px 15px;display:grid;grid-template-columns:1fr auto;align-items:baseline;background:#fafbfc}.report-week-card span{color:var(--muted);font-size:12px;font-weight:600}.report-week-card strong{font-size:20px}.report-week-card small{grid-column:1 / -1;color:var(--muted);margin-top:5px}.report-employee-list{display:flex;flex-direction:column;gap:10px}.report-employee{background:var(--surface);border:1px solid var(--border);border-radius:10px;overflow:hidden}.report-employee[open]{box-shadow:var(--shadow);border-color:#c8d4f5}.report-employee summary{display:grid;grid-template-columns:minmax(220px,1fr) 130px 100px 110px;align-items:center;gap:14px;padding:15px 18px;cursor:pointer;list-style:none;-webkit-user-select:none;user-select:none}.report-employee summary::-webkit-details-marker{display:none}.report-employee summary:hover{background:#fafbfc}.report-employee summary>span{display:flex;flex-direction:column}.report-employee summary>span:not(.report-employee-name){text-align:right}.report-employee summary small{color:var(--muted);font-size:11px;font-weight:400}.report-employee-name strong{font-size:15px}.report-expand-label{color:var(--primary);font-size:12px;font-weight:600}.report-employee[open] .report-expand-label:before{content:"Piilota päivät"}.report-employee[open] .report-expand-label{font-size:0}.report-employee[open] .report-expand-label:before{font-size:12px}.report-days-scroll{overflow-x:auto;border-top:1px solid var(--border)}.report-day-grid{display:grid;grid-auto-flow:column;grid-auto-columns:112px;min-width:max-content}.report-day-cell{min-height:132px;padding:10px;border-right:1px solid var(--border);background:#fbfcfd}.report-day-cell.weekend{background:#f2f4f7}.report-day-cell.has-hours{background:#f3f7ff;box-shadow:inset 0 3px 0 var(--primary)}.report-day-cell.has-warning{background:#fff8e5;box-shadow:inset 0 3px 0 var(--warning)}.report-day-date{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:11px}.report-day-date strong{text-transform:uppercase}.report-day-hours{font-size:22px;font-weight:700;margin:17px 0 1px}.report-day-times{color:var(--muted);font-size:11px;white-space:nowrap}.report-day-warning{color:var(--warning);font-size:10px;font-weight:650;margin-top:8px}.report-no-hours{padding:10px 16px}@media(max-width:1000px){.report-kpis{grid-template-columns:repeat(2,1fr)}.report-employee summary{grid-template-columns:minmax(180px,1fr) 90px 80px}.report-expand-label{display:none!important}}@media(max-width:720px){.report-filter-panel{padding:14px}.report-filter-row{align-items:stretch}.report-filter-row label{width:100%;justify-content:space-between}.report-filter-row label>select,.report-filter-row label>input{flex:1;min-width:0}.report-actions-row button{flex:1}.preset-label{width:100%;min-width:0}.report-kpis{grid-template-columns:1fr 1fr;gap:8px}.report-kpi{min-height:96px;padding:13px}.report-kpi>strong{font-size:23px}.report-panel{padding:16px 12px}.report-employee summary{grid-template-columns:1fr 72px 62px;padding:13px;gap:8px}.report-heading{align-items:flex-start}}.stamps-range-options{display:flex;flex-direction:column;gap:10px;margin:16px 0}.stamps-range-options>button{padding:14px 16px;text-align:left;background:var(--surface);border:1px solid var(--border);color:var(--text);border-radius:8px;cursor:pointer;font-size:14px}.stamps-range-options>button:hover{background:var(--bg);border-color:var(--primary)}.stamps-range-options>button strong{display:block;margin-bottom:4px}#login .card,#password-reset .card{background:#ffffffdb;backdrop-filter:blur(16px) saturate(1.4);-webkit-backdrop-filter:blur(16px) saturate(1.4);border:1px solid rgba(255,255,255,.55);border-radius:16px;box-shadow:0 8px 32px #00000038;padding:40px 36px 30px;max-width:400px;animation:card-in .5s cubic-bezier(.16,1,.3,1) both}@keyframes card-in{0%{opacity:0;transform:translateY(16px) scale(.98)}to{opacity:1;transform:none}}#login .card h1,#password-reset .card h1{font-size:32px;letter-spacing:-.02em;margin-bottom:4px}#login .card>p.muted,#password-reset .card>p.muted{margin-bottom:24px}#login .card input,#password-reset .card input{padding:12px 14px;border-radius:10px;font-size:15px;background:#ffffffeb;border:1px solid rgba(31,35,41,.18);transition:border-color .15s ease,box-shadow .15s ease}#login .card input:focus,#password-reset .card input:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px #2962ff2e}#login .card button[type=submit],#password-reset .card button[type=submit]{width:100%;margin-top:8px;padding:13px 18px;border-radius:10px;font-size:15px;font-weight:600;letter-spacing:.01em;background:var(--primary);transition:background .15s ease}#login .card button[type=submit]:hover,#password-reset .card button[type=submit]:hover{background:var(--primary-hover)}#login .card a{color:var(--primary);font-weight:500;text-decoration:none}#login .card a:hover{text-decoration:underline}:root{--shadow: none}.sidebar{background:#f0f2f5}.sidebar nav a{transition:background .12s ease,color .12s ease}.sidebar nav a:hover{background:#0000000d}.sidebar nav a.active{background:#2962ff1a;color:var(--primary);border-left-color:var(--primary)}.sidebar-tenant-select{background:var(--surface)}button{transition:background .15s ease,border-color .15s ease}button.secondary:hover{border-color:#b9bdc6}table{box-shadow:none}th{background:#f0f2f5}tbody tr:hover{background:#f5f7fa}.modal{box-shadow:none;border:1px solid var(--border)}.toast{box-shadow:none}.icon-link{display:inline-flex;vertical-align:-2px;color:var(--primary);margin-left:2px}.icon-link:hover{color:var(--primary-hover)}.warning-banner{background:#fff4d6;border:1px solid #e6c87a;color:#6b4e00;border-radius:8px;padding:12px 16px;margin-bottom:16px}.warning-banner ul{margin:6px 0 0;padding-left:20px}.warning-banner li{margin:2px 0}.brand img{display:block;width:100%;height:auto}@media(max-width:720px){.brand img{width:140px}}
