:root{color-scheme:dark}
:root[data-theme="light"]{color-scheme:light;--bg:#f6f8fc;--panel:#fff;--panel2:#f1f5f9;--border:#cbd5e1;--text:#182230;--muted:#526174;--accent:#1769bd;--theme-surface:#ffffff;--theme-surface-alt:#f1f5f9;--theme-hover:#e2efff;--theme-line:#cbd5e1;--theme-soft-text:#475569;--theme-bright-text:#1e293b;--theme-warning-bg:#fff4c2;--theme-warning-text:#624b08;--theme-danger-bg:#fff1f2;--theme-danger-text:#a51d2d;--theme-success-text:#137344;}

:root[data-theme="light"] .site-header{background:#f6f8fcf2}
:root[data-theme="light"] .jumper-edit-date-control .jumper-edit-input{color-scheme:light}
.settings-dialog{width:min(440px,calc(100% - 32px));padding:24px;border:1px solid var(--border);border-radius:18px;background:var(--panel);color:var(--text)}
.settings-dialog::backdrop{background:rgb(0 0 0 / .55)}
.settings-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
.settings-heading h2{margin:0}
.settings-dialog fieldset{display:grid;gap:12px;border:1px solid var(--border);border-radius:12px;padding:16px}
.settings-dialog legend{padding:0 6px;font-weight:700}
.settings-dialog label{display:flex;align-items:center;gap:10px;padding:12px;background:var(--panel2);border-radius:8px;cursor:pointer}
.settings-dialog input{width:18px;height:18px;accent-color:var(--accent)}

.settings-dialog fieldset+fieldset{margin-top:16px}
.settings-dialog{max-height:calc(100dvh - 32px);overflow-y:auto}
html[data-text-size="large"]{font-size:20px}
html[data-text-size="large"] body{font-size:1rem}
html[data-text-size="large"] :is(button,input,select,.small-btn,.nav a,.site-header .session-role-badge){font-size:18px}
html[data-text-size="large"] :is(table,.status,.profile-detail-row,.load-row-sub,.data-key,.data-val){font-size:17px}
html[data-text-size="large"] :is(.small-btn,.site-header .nav a){min-height:52px}
html[dir="rtl"] :is(.load-row,.detail-tab,.jumper-row,.worker-column){text-align:start}
html[dir="rtl"] .settings-dialog input{margin-inline:0 8px}
html[dir="rtl"] .unified-header .header-top h1{text-align:start}
html[dir="rtl"] :is(.load-jumper-name,.profile-detail-row dd,#sessionRole){unicode-bidi:plaintext}
html[dir="rtl"] .settings-dialog label{direction:rtl}

.logbook-filters{margin:16px;padding:16px;border:1px solid var(--border);border-radius:12px;min-width:0}
.logbook-filters legend{font-weight:700;padding:0 6px}
.logbook-type-filter{border:0;padding:0;margin:0 0 16px;min-width:0}
.logbook-type-options{display:flex;flex-wrap:wrap;gap:10px}
.logbook-type-options label{display:flex;align-items:center;gap:8px;padding:10px;border:1px solid var(--border);border-radius:8px;cursor:pointer}
.logbook-type-options input{width:18px;height:18px;accent-color:var(--accent)}
.logbook-filter-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:end}
.logbook-filter-controls label{display:grid;gap:8px;flex:1 1 170px;min-width:0}
.logbook-filter-controls :is(input,select){width:100%;min-width:0;min-height:48px;border:1px solid var(--border);border-radius:10px;padding:10px;background:var(--panel);color:var(--text);font:inherit}
.logbook-filter-controls input[aria-invalid="true"]{border-color:#b42318}

.site-header .session-role-badge.jumper-name-badge{font-size:16px;font-weight:800}
html[data-text-size="large"] .site-header .session-role-badge.jumper-name-badge{font-size:20px}

@media(max-width:700px){
 .unified-header.jumper-header .header-top{flex-direction:row;align-items:center;gap:8px}
 .unified-header.jumper-header .header-top h1{flex:1 1 auto;min-width:0;align-self:center;margin:0;font-size:clamp(14px,3.5vw,18px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .unified-header.jumper-header .session-account{width:auto;flex:0 1 auto;max-width:65%;min-width:0;flex-wrap:nowrap;align-self:center;margin-left:0;margin-inline-start:auto;gap:6px}
 .site-header .jumper-header .session-role-badge.jumper-name-badge{display:block;min-width:0;max-width:none;flex:0 1 auto;min-height:44px;padding:12px 8px;font-size:14px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .site-header .jumper-header #sessionLogoutBtn{flex:0 0 auto;min-height:44px;padding:8px 10px;font-size:13px}
 html[data-text-size="large"] .site-header .jumper-header .session-role-badge.jumper-name-badge{font-size:18px}
 html[data-text-size="large"] .site-header .jumper-header #sessionLogoutBtn{font-size:17px}
}

.site-header #sessionLogoutBtn.logout-icon-button{width:44px;min-width:44px;min-height:44px;padding:10px;flex:0 0 44px}
html[dir="rtl"] .logout-icon-button svg{transform:scaleX(-1)}

.site-header #settingsBtn.settings-icon-button{width:44px;min-width:44px;min-height:48px;padding:10px;flex:0 0 44px}

.unified-header .developer-navigation{margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}
.site-header .developer-navigation .developer-action{color:var(--theme-danger-text,#ff8a8a);border-color:#c34c4c;background:var(--theme-danger-bg,#30181d);font-weight:800}
.site-header .developer-navigation .developer-action:hover{color:var(--theme-danger-text,#ff8a8a);border-color:#e5484d;background:var(--theme-danger-bg,#30181d)}

.today-sort-control{display:grid;gap:6px;font-weight:700}
.today-sort-control select{min-height:48px;max-width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:12px;background:var(--panel);color:var(--text);font:inherit}

.today-list-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}
.today-list-heading .today-sort-toggle{min-height:40px;padding:8px 10px;font-size:13px}

.logbook-filter-panel{margin:16px;border:1px solid var(--border);border-radius:12px}
.logbook-filter-panel>summary{padding:14px 16px;cursor:pointer;font-weight:700}
.logbook-filter-panel .logbook-filters{margin:0;border:0}
.logbook-filter-panel .logbook-filters>legend{display:none}

.logbook-annual-stats summary{cursor:pointer;font-weight:700;font-size:1rem;padding:4px}
.logbook-annual-stats details[open]>summary{margin-bottom:12px}
.user-logbook-table .logbook-year-separator th{padding:0;background:var(--panel2);border-top:2px solid var(--accent);border-bottom:1px solid var(--border)}
.logbook-year-toggle{display:flex;align-items:center;gap:12px;width:100%;border:0;padding:14px 16px;background:transparent;color:var(--text);font:inherit;font-size:1.1rem;font-weight:800;text-align:start;cursor:pointer}
.logbook-year-count{font-size:.85em;color:var(--muted)}
.logbook-year-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.user-logbook-table tr[data-logbook-year][hidden]{display:none!important}
