body.history-page{margin:0;background:#f8f9ff;color:#142438;font-size:14px;line-height:1.4}
.history-header{display:flex;align-items:center;gap:9px;padding:16px;min-height:68px}.history-header img{border-radius:7px}.history-header strong{font-size:20px}.history-header small{display:block;color:#45464d;font-size:11px}.profile-link{margin-left:auto;background:#000;color:#fff;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;text-decoration:none}
.history-main{padding:0 16px 105px;max-width:680px;margin:auto}.history-main h1{margin:0;font-size:23px;line-height:30px}.subtitle{margin:0 0 14px;color:#555965;font-size:12px;font-weight:600}
body.app-shell.history-page #history-message[data-loading=true]{position:absolute;top:10px;right:16px;z-index:2;max-width:calc(100% - 145px);margin:0;padding:4px 6px;background:var(--theme-panel);color:var(--theme-muted);text-align:right;pointer-events:none}
.history-main button{font-family:inherit;border:0;color:inherit}.week-picker{display:flex;align-items:center;justify-content:space-between;background:white;border-radius:8px;min-height:58px;margin:8px 0;border:1px solid #eef0f7}.week-picker button{width:42px;height:48px;background:transparent;display:grid;place-items:center}.week-picker button:disabled{opacity:.25}.week-picker>div{display:flex;align-items:center;gap:8px;font-size:13px}.week-picker>div .material-symbols-outlined{color:#0051d5;font-size:19px}
.history-summary{display:grid;grid-template-columns:1.25fr .7fr 1fr 1.1fr;gap:6px;background:white;border-radius:8px;padding:10px 12px;border:1px solid #eef0f7}.history-summary small{display:block;font-size:10px;color:#535762;white-space:nowrap}.history-summary strong{display:block;font-size:18px;margin-top:2px;font-variant-numeric:tabular-nums}
.history-filters{display:grid;grid-template-columns:.65fr 1.3fr 1fr 1fr;gap:2px;background:#dee8ff;padding:4px;border-radius:7px;margin:8px 0}.history-filters button{min-height:30px;background:transparent;border-radius:4px;font-size:11px;font-weight:600;padding:3px}.history-filters button[aria-pressed=true]{color:#fff;background:#111}
.history-table-wrap{background:white;border-radius:8px;border:1px solid #eef0f7;overflow:hidden}table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:12px}th{background:#eef2ff;text-transform:uppercase;color:#555965;font-size:10px;font-weight:600;height:34px}th:first-child{width:25%;text-align:left;padding-left:11px}th:nth-child(2),th:nth-child(3){width:16%}th:nth-child(4){width:18%}th:last-child{width:25%}td{height:48px;text-align:center;border-top:1px solid #eef1fa;padding:7px 2px;font-variant-numeric:tabular-nums}td:first-child{text-align:left;padding-left:11px}td:first-child b{font-size:13px}td:first-child small{font-size:11px;margin-left:3px;color:#555965}.history-row-working{background:#f5f8ff}.history-row-working td:nth-child(4){color:#0051d5;font-weight:700}.day-empty{color:#92959e}.badge{display:inline-block;padding:3px 7px;border-radius:12px;font-size:10px;line-height:13px;background:#e5eeff;color:#0051d5;max-width:100%}.badge.missing{color:#555965;background:#eef2ff}.badge.future{color:#92959e;background:#f4f5f8}
.queue-strip{display:flex;align-items:center;gap:6px;background:#edf2ff;border-radius:6px;padding:9px;margin:8px 0;font-size:11px}.queue-strip .material-symbols-outlined{color:#0051d5;font-size:20px}.queue-strip b{margin-left:auto;white-space:nowrap;font-size:10px}#history-message,#history-empty{font-size:12px;color:#555965;text-align:center;margin:12px 0}#history-retry{display:block;margin:8px auto;background:#e5eeff;padding:10px 16px;border-radius:6px}body.history-page [hidden]{display:none!important}body.history-page>nav{position:fixed;bottom:0;left:0;right:0;border-top:1px solid #eef0f7;padding-bottom:env(safe-area-inset-bottom,0px);z-index:5}
@media(max-width:350px){.history-main{padding-left:10px;padding-right:10px}.history-summary{padding:9px 8px;gap:3px}.history-summary small{font-size:9px}.history-summary strong{font-size:16px}table{font-size:11px}.badge{font-size:9px;padding:3px 4px}.week-picker>div{font-size:12px}}
.bad-time{color:#ba1a1a;font-weight:700}
.history-row-foreign-office td{background:#fffaf0}.badge.foreign-office{background:#fff0c7;color:#9a6100;font-weight:700}
.history-main{--history-bg:#fff;--history-surface:#eef3f9;--history-ink:#17212e;--history-muted:#74859c;--history-line:#e5ecf4;--history-green:#0b8b6a;--history-green-wash:#e8f6f0;color:var(--history-ink)}
html[data-theme=dark] .history-main{--history-bg:#0b1424;--history-surface:#17253a;--history-ink:#eff4fb;--history-muted:#99acc6;--history-line:#273951;--history-green:#6bd4ac;--history-green-wash:#183a32}
.history-view-toggle{display:flex;gap:3px;padding:4px;margin:18px 0 14px;background:var(--history-surface);border-radius:8px}
.history-view-toggle button{flex:1;min-height:38px;border-radius:6px;background:transparent;color:var(--history-muted);font-size:12px;font-weight:600}
.history-view-toggle button[aria-pressed=true]{background:var(--history-bg);color:var(--history-ink);box-shadow:0 1px 5px #101d3014}
.history-main[data-view=day] .week-picker{margin:12px 0 16px;min-height:42px;border:0;background:transparent!important}
.history-main[data-view=day] .week-picker>div{font-size:16px;color:var(--history-ink)}
.history-main[data-view=day] .week-picker button{width:36px;height:36px;border-radius:8px}
.history-day-picker{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin:0 0 24px}
.history-day-picker button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:68px;padding:5px 0;border-radius:8px;background:var(--history-surface);color:var(--history-ink);font-size:14px;font-weight:600}
.history-day-picker button small{font-size:10px;font-weight:400;color:var(--history-muted)}
.history-day-picker button[aria-pressed=true]{background:var(--history-ink);color:var(--history-bg)}
.history-day-picker button[aria-pressed=true] small{color:inherit;opacity:.75}
html[data-theme=dark] #history-day-picker button[aria-pressed=true] small{color:var(--history-bg)!important}
.history-day-dot{width:4px;height:4px;border-radius:50%;background:var(--history-green)}
.history-day-dot[data-state=pending]{background:#d59a40}
.history-day-dot[data-state=attention]{background:#c9474c}
.history-day-picker button[aria-pressed=true] .history-day-dot{background:currentColor}
.history-day-total{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:6px;margin-bottom:26px}
.history-day-total small{grid-column:1/-1;color:var(--history-muted);font-size:11px}
.history-day-total strong{font-size:28px;line-height:34px;font-weight:600;font-variant-numeric:tabular-nums}
.history-day-earned{grid-column:1/-1;grid-row:3;margin:8px 0 0;color:var(--history-muted);font-size:11px}
.history-day-earned strong{display:inline;margin-left:8px;color:var(--history-ink);font-size:13px;font-weight:600}
.history-day-status{padding:6px 9px;border-radius:20px;background:var(--history-green-wash);color:var(--history-green);font-size:10px;font-weight:600}
.history-event{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:10px;align-items:start;position:relative;padding:0 0 27px}
.history-event:not(:last-child)::after{content:"";position:absolute;left:17px;top:38px;bottom:5px;width:1px;background:var(--history-line)}
.history-event>.material-symbols-outlined{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:var(--history-green-wash);color:var(--history-green);font-size:18px}
.history-event.is-departure>.material-symbols-outlined{background:var(--history-surface);color:var(--history-muted)}
.history-event strong{display:block;margin:2px 0 5px;font-size:13px}
.history-event p{margin:0;color:var(--history-muted);font-size:11px;line-height:1.5}
.history-event time{padding-top:3px;font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}
.history-day-empty{padding:30px 0;text-align:center;color:var(--history-muted);font-size:13px}
.history-week-heading{margin:24px 0 10px;font-size:14px;font-weight:600}
.history-main[data-view=week] #history-daily{display:none}
.history-main[data-view=day] .history-filters,.history-main[data-view=day] .history-table-wrap,.history-main[data-view=day] #history-empty{display:none!important}
.history-week-report{margin:26px 0 20px;border-top:1px solid var(--history-line);padding-top:12px}
.history-week-heading{margin:0 0 12px;font-size:14px;color:var(--history-ink)}
.history-summary{grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:0;border:0;border-radius:0;background:transparent!important}
.history-summary>div{min-width:0;padding:10px 5px 10px 0;border-bottom:1px solid var(--history-line)}
.history-summary>div:not(.history-summary-earned){padding-top:14px}
.history-summary .history-summary-earned{grid-column:1/-1;padding:4px 0 15px;border-bottom:1px solid var(--history-line)}
.history-summary small{color:var(--history-muted);font-size:10px;white-space:normal}
.history-summary strong{color:var(--history-ink);font-size:15px;white-space:nowrap}
.history-summary-earned strong{font-size:23px}
.history-main[data-view=week] .week-picker{background:transparent!important;border:0;min-height:46px;margin:8px 0 12px}
.history-main[data-view=week] .week-picker>div .material-symbols-outlined{color:var(--history-muted)}
.history-filters{gap:3px;background:var(--history-surface);margin:0 0 12px}
.history-filters button{color:var(--history-muted);font-weight:500}
.history-filters button[aria-pressed=true]{background:var(--history-bg);color:var(--history-ink);box-shadow:0 1px 4px #101d3014}
.history-table-wrap{background:var(--history-bg)!important;border:1px solid var(--history-line)}
.history-table-wrap th{background:var(--history-surface)!important;color:var(--history-muted);font-size:9px;text-transform:none}
.history-table-wrap th:first-child{width:19%;padding-left:8px}.history-table-wrap th:nth-child(2),.history-table-wrap th:nth-child(3){width:14%}.history-table-wrap th:nth-child(4){width:17%}.history-table-wrap th:last-child{width:36%}
.history-table-wrap td{height:52px;border-color:var(--history-line);font-size:11px;padding:6px 2px}
.history-table-wrap td:first-child{padding-left:8px}.history-table-wrap td:first-child small{display:block;margin:0;font-size:10px;color:var(--history-muted)}
.history-table-wrap td:last-child{font-weight:600;font-size:10px;white-space:nowrap}
.history-table-wrap .history-row-working{background:transparent}
.history-table-wrap .history-row-working td:nth-child(4){color:var(--history-ink);font-weight:400}
.history-table-wrap tr.is-late td{background:#fbe9e9}
.history-table-wrap tr.is-late td:first-child{box-shadow:inset 3px 0 #d64b53}
.history-table-wrap tr.needs-attention td{background:#fff0d3}
.history-table-wrap tr.needs-attention td:last-child{position:relative;isolation:isolate}
.history-table-wrap tr.needs-attention td:last-child::before{content:"warning";position:absolute;right:4px;top:9px;font-family:"Material Symbols Outlined";font-size:35px;font-weight:400;line-height:1;color:#bd7a00;opacity:.19;pointer-events:none;z-index:-1}
.history-table-wrap tr.is-active{--history-wave:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 52' preserveAspectRatio='none'%3E%3Cpath fill='%23dceaff' d='M0 7 C15 7 15 3 30 3 C45 3 45 7 60 7 C75 7 75 11 90 11 C105 11 105 7 120 7 L120 52 L0 52 Z'/%3E%3C/svg%3E");background-image:radial-gradient(circle at 12px 45px,#5b9df080 0 2px,transparent 3px),radial-gradient(circle at 29px 50px,#5b9df066 0 1px,transparent 2px),var(--history-wave);background-size:45px 58px,45px 58px,120px var(--shift-progress,0%);background-position:0 0,8px 0,0 bottom;background-repeat:repeat,repeat,repeat-x;animation:history-row-motion 3.2s linear infinite}
.history-table-wrap tr.is-active td{background:transparent}
@keyframes history-row-motion{to{background-position:0 -58px,8px -58px,120px bottom}}
html[data-theme=dark] .history-table-wrap tr.is-late td{background:#43282e!important}
html[data-theme=dark] .history-table-wrap tr.needs-attention td{background:#4c3925!important}
html[data-theme=dark] .history-table-wrap tr.needs-attention td:last-child::before{color:#ffd078;opacity:.34}
html[data-theme=dark] .history-table-wrap tr.is-active{--history-wave:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 52' preserveAspectRatio='none'%3E%3Cpath fill='%23213e64' d='M0 7 C15 7 15 3 30 3 C45 3 45 7 60 7 C75 7 75 11 90 11 C105 11 105 7 120 7 L120 52 L0 52 Z'/%3E%3C/svg%3E")}
html[data-theme=dark] :is(#history-rows,.history-main) .week-picker,html[data-theme=dark] :is(#history-rows,.history-main) .history-summary{background:transparent!important;border-color:var(--history-line)!important}
html[data-theme=dark] :is(#history-rows,.history-main) .history-filters,html[data-theme=dark] :is(#history-rows,.history-main) .history-table-wrap th{background:var(--history-surface)!important}
html[data-theme=dark] :is(#history-rows,.history-main) .history-filters button[aria-pressed=true]{background:var(--history-bg)!important;color:var(--history-ink)!important}
html[data-theme=dark] :is(#history-rows,.history-main) .history-table-wrap{background:var(--history-bg)!important;border-color:var(--history-line)!important}
html[data-theme=dark] :is(#history-rows,.history-main) .history-row-working{background-color:transparent!important}
@media(prefers-reduced-motion:reduce){.history-table-wrap tr.is-active{animation:none}}
@media(max-width:350px){.history-day-picker{gap:3px}.history-day-picker button{min-height:62px}.history-event{gap:7px}.history-day-total strong{font-size:25px}}
