.history-wrap{width:100%;min-width:0}
.history-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
.history-metric,.history-date,.history-date>div{min-width:0}
.history-period-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;background:var(--panel);border-radius:12px;margin:14px 0 10px}
.history-period-tabs button{min-height:42px;border-radius:9px;background:transparent;color:var(--muted);font-size:12px;font-weight:700}
.history-period-tabs button[aria-pressed=true]{background:var(--lime);color:var(--lime-dark)}
.history-period-date{display:grid;grid-template-columns:40px minmax(0,1fr) 40px;gap:8px;align-items:center;margin-bottom:14px}
.history-period-date button{height:40px;border-radius:10px;background:var(--panel);color:var(--text)}
.history-period-date label{display:flex;flex-direction:column;gap:4px;text-align:center;font-size:10px;color:var(--muted)}
.history-period-date input{width:100%;min-width:0;color-scheme:dark;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:8px;font:inherit;font-size:12px}
.history-filters{flex-wrap:wrap;overflow:visible;gap:7px}
.history-filter{min-height:38px;padding:8px 11px}
.history-record{width:100%;min-width:0}
.history-record-top{flex-wrap:wrap;align-items:flex-start}
.history-date{flex:1 1 180px}
.history-day{flex-shrink:0}
.history-date strong,.history-date small{overflow-wrap:anywhere}
.history-times{flex-wrap:wrap;gap:10px;line-height:1.5}
.history-ticket{flex-wrap:wrap;gap:10px;line-height:1.5}
.history-ticket button{min-height:40px;flex-shrink:0}
.history-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.history-actions button{height:auto;min-height:48px;padding:10px;line-height:1.5}
.history-page{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
.history-bottom-nav{position:fixed;z-index:11;bottom:0;left:50%;width:min(100%,430px);transform:translateX(-50%);margin:0;padding:11px 16px calc(11px + env(safe-area-inset-bottom));gap:4px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--line);background:#031427f2;box-shadow:0 -8px 24px #0005;backdrop-filter:blur(12px)}
body:has(#historyPage.hidden)>.history-bottom-nav{display:none}
.history-bottom-nav button{min-height:44px;min-width:0}
.history-top,.history-employee,.history-title,.history-log-heading{gap:10px;flex-wrap:wrap}
.history-close,.history-rate{flex-shrink:0}
.history-empty{padding:24px;text-align:center;color:var(--muted);font-size:12px;line-height:1.6}
.history-page button:focus-visible{outline:2px solid var(--lime);outline-offset:2px}
#dashboard{padding-bottom:calc(80px + env(safe-area-inset-bottom))}
#dashboard>.dash-nav{position:fixed;z-index:7;bottom:0;left:50%;width:min(100%,430px);transform:translateX(-50%);margin:0;padding:11px 16px calc(11px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#031427f2;box-shadow:0 -8px 24px #0005;backdrop-filter:blur(12px)}
.employee-alerts-page{padding-bottom:calc(88px + env(safe-area-inset-bottom))}
.employee-alerts-nav{position:fixed;z-index:91;bottom:0;left:50%;width:min(100%,430px);transform:translateX(-50%);display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:11px 16px calc(11px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#031427f2;box-shadow:0 -8px 24px #0005;backdrop-filter:blur(12px)}
.employee-alerts-nav button{display:flex;min-width:0;min-height:44px;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:none;color:var(--muted);font-size:9px;font-weight:700}
.employee-alerts-nav button.active{color:var(--lime)}
.employee-alerts-nav .mi{font-size:20px}
@media(max-width:340px){.history-actions{grid-template-columns:1fr}.history-hero{gap:10px}.history-hero strong{font-size:24px}}
