/* Route presentation only. Inventory, planning, weather and editor dialogs retain their owners. */
body[data-hub-layout]{--layout-bg:#101216;--layout-panel:#1a1e25;--layout-raised:#20252d;--layout-text:#f4f5f7;--layout-muted:#b3bac5;--layout-line:#30353d;background:var(--layout-bg);color:var(--layout-text)}
html[data-theme=light] body[data-hub-layout],body.light[data-hub-layout]{--layout-bg:#eef2f5;--layout-panel:#fff;--layout-raised:#e4eaf0;--layout-text:#152936;--layout-muted:#536174;--layout-line:#bcc7d3}
body[data-hub-layout]>.team-menu{padding:12px 20px;gap:8px;background:var(--layout-panel);border-bottom:1px solid var(--layout-line)}
body[data-hub-layout]>.team-menu>button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;margin:0;padding:8px 13px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--layout-muted)}
body[data-hub-layout]>.team-menu>button.selected{background:var(--hub-accent-soft,#301c24);border-color:var(--hub-accent,#ff7482);color:var(--layout-text)}
body[data-hub-layout]>main>section:not([hidden]){padding:24px;background:var(--layout-bg);color:var(--layout-text)}
body[data-hub-layout]>main>section>h2{font-size:26px;line-height:1.25;letter-spacing:-.025em;color:var(--layout-text);margin:0 0 20px;padding-right:52px}
body[data-hub-layout]>main>section>.management-refresh{top:24px;right:24px}
body[data-hub-layout] main :is(p,small){color:var(--layout-muted)}
body[data-hub-layout] main label{font-size:12px;color:var(--layout-muted);margin:12px 0}
body[data-hub-layout] main :is(input,select,textarea){font:inherit;min-height:40px;padding:9px 11px;background:var(--layout-raised);color:var(--layout-text);border:1px solid var(--layout-line);border-radius:7px;max-width:100%}
body[data-hub-layout] main :is(input[type=checkbox],input[type=radio]){min-height:0;width:auto}
body[data-hub-layout] main button{background:var(--layout-raised);color:var(--layout-text);border:1px solid var(--layout-line);border-radius:7px}
body[data-hub-layout] main button:not([aria-label^="Odśwież"]):not(.mychron-refresh):not(#refreshRecordings){display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;padding:8px 12px}
body[data-hub-layout] main button:not(:disabled):hover{background:var(--hub-accent-soft,#301c24);border-color:var(--hub-accent,#ff7482);color:var(--hub-accent,#ff7482)}
body[data-hub-layout] main form button:not([type=button]),body[data-hub-layout] .inventory-toolbar>button{background:var(--hub-accent-fill,#b8192d);border-color:var(--hub-accent-fill,#b8192d);color:#fff}
body[data-hub-layout] main form button:not([type=button]):not(:disabled):hover,body[data-hub-layout] .inventory-toolbar>button:not(:disabled):hover{background:var(--hub-accent-hover,#d3263c);color:#fff}
body[data-hub-layout] main button:disabled{opacity:.5;cursor:default}
body[data-hub-layout] main .fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px}
body[data-hub-layout] #accessForm,body[data-hub-layout] #integrationSettings>form{padding:20px;margin:20px 0;background:var(--layout-panel);border:1px solid var(--layout-line);border-radius:10px}
body[data-hub-layout] #integrationSettings>form>h3{margin:0 0 16px;font-size:17px}
body[data-hub-layout] #integrationSettings>form label{max-width:620px}
body[data-hub-layout] #integrationSettings>form p{font-size:12px;max-width:80ch}
body[data-hub-layout] #integrationSettings>h3{margin:28px 0 12px;font-size:18px}
body[data-hub-layout] main table{color:var(--layout-text)}
body[data-hub-layout] main :is(th,td){border-color:var(--layout-line)}
body[data-hub-layout] main th{background:var(--layout-raised);color:var(--layout-muted)}
body[data-hub-layout] .inventory-toolbar,body[data-hub-layout] .windows-recording-toolbar{padding:14px 0;gap:12px}
body[data-hub-layout] .inventory-filters{gap:12px}
body[data-hub-layout] .inventory-surface>h2{margin-bottom:12px}
body[data-hub-layout] .recordings-surface>h2{margin-bottom:12px}
body[data-hub-layout] .hub-icon{width:18px;height:18px;color:var(--hub-accent,#ff7482);flex:none}
body[data-hub-layout] :is(.inventory-toolbar>button,form button:not([type=button])) .hub-icon{color:#fff}
body[data-hub-layout] #mychronImports{padding:16px 20px}
body[data-hub-layout] #mychronImports .mychron-session-groups button{justify-content:flex-start;white-space:normal;display:block}
@media(max-width:600px){body[data-hub-layout]>.team-menu{padding:10px 12px;gap:4px}body[data-hub-layout]>.team-menu>button{min-height:44px;padding:9px 11px}body[data-hub-layout]>main>section:not([hidden]){padding:16px 12px}body[data-hub-layout]>main>section>h2{font-size:23px;margin-bottom:16px}body[data-hub-layout]>main>section>.management-refresh{top:16px;right:12px}body[data-hub-layout] main .fields{grid-template-columns:minmax(0,1fr)}body[data-hub-layout] #accessForm,body[data-hub-layout] #integrationSettings>form{padding:16px 12px}body[data-hub-layout] main label{min-width:0}body[data-hub-layout] main :is(input,select,textarea){font-size:16px}body[data-hub-layout] main button:not([aria-label^="Odśwież"]):not(.mychron-refresh):not(#refreshRecordings){min-height:44px}body[data-hub-layout] #mychronImports{padding:12px}}

/* Existing dashboard geometry, charts and saved panel layout are untouched. */
html body.analysis-modern{--analysis-bg:#eef2f5;--analysis-text:#152936;--analysis-muted:#536174;--analysis-line:#bcc7d3}
html body.analysis-modern.dark{--analysis-bg:#101216;--analysis-text:#f4f5f7;--analysis-muted:#b3bac5;--analysis-line:#30353d}
html body.analysis-modern>header{padding:16px 20px;gap:10px;border-bottom:1px solid var(--analysis-line)}
html body.analysis-modern .session-context>b{font-size:24px!important;line-height:1.25;letter-spacing:-.025em}
html body.analysis-modern>header :is(button,select){border-color:var(--analysis-line);border-radius:7px;min-height:38px;padding:8px 11px}
html body.analysis-modern>header button[aria-pressed=true]{background:var(--hub-accent-soft,#301c24);border-color:var(--hub-accent,#ff7482);color:var(--analysis-text)}
html body.analysis-modern>header .hub-icon{color:var(--hub-accent,#ff7482)}
html body.analysis-modern>header select{max-width:100%;min-width:0}
html body.analysis-modern>header nav{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:700px){html body.analysis-modern>header{padding:12px;gap:8px}html body.analysis-modern .session-context>b{font-size:20px!important}html body.analysis-modern>header :is(button,select){min-height:40px}}

/* Keep red icon contrast inside existing filled integration actions. */
html body.operations-page .source-card h3 .hub-icon{color:var(--hub-accent,#ff7482)}
html body.operations-page :is(#refresh,.mychron-device button) .hub-icon{color:#fff}

/* Empty analysis uses the Hub list typography, palette and action component. */
body.hub-empty-page{margin:0;font:14px/1.55 system-ui,sans-serif;background:var(--hub-list-bg);color:var(--hub-list-text)}
body.hub-empty-page .hub-empty{box-sizing:border-box;width:100%;padding:32px}
body.hub-empty-page .hub-empty-card{box-sizing:border-box;width:100%;max-width:640px;padding:28px;border:1px solid var(--hub-list-line);border-radius:12px;background:var(--hub-list-surface)}
body.hub-empty-page .hub-empty-symbol{display:grid;place-items:center;width:44px;height:44px;margin-bottom:20px;border:1px solid var(--hub-list-line);border-radius:10px;background:var(--hub-list-raised);color:var(--hub-accent,#ff7482)}
body.hub-empty-page .hub-empty-symbol svg{width:24px;height:24px}
body.hub-empty-page .hub-empty-card .hub-empty-kicker{margin:0 0 6px;font-size:12px;font-weight:600;color:var(--hub-list-muted)}
body.hub-empty-page .hub-empty-card .hub-list-header{margin-bottom:12px}
body.hub-empty-page .hub-empty-card h1{font-size:24px;font-weight:650;line-height:1.25}
body.hub-empty-page .hub-empty-card p{max-width:52ch;margin:0 0 20px;color:var(--hub-list-muted);overflow-wrap:anywhere}
body.hub-empty-page .hub-empty-card p[role=status]{padding:12px;border:1px solid var(--hub-list-line);border-radius:7px;background:var(--hub-list-raised)}
body.hub-empty-page .hub-empty-action{box-sizing:border-box;gap:8px;min-height:40px;border:1px solid var(--hub-accent-fill,#b8192d);text-decoration:none;white-space:normal}
body.hub-empty-page .hub-empty-action svg{width:18px;height:18px;flex:none}
body.hub-empty-page .hub-empty-action:hover{filter:brightness(1.1)}
body.hub-empty-page .hub-empty-action:focus-visible{outline:3px solid var(--hub-accent,#ff7482);outline-offset:3px}
@media(max-width:600px){body.hub-empty-page .hub-empty{padding:20px 16px}body.hub-empty-page .hub-empty-card{padding:22px 20px}body.hub-empty-page .hub-empty-card h1{font-size:22px}}

/* Match the existing 32px analysis toolbar buttons; panel/dialog selects are separate. */
body.analysis-modern>header>select[aria-label="Liczba kolumn dashboardu"]{box-sizing:border-box;height:32px!important;min-height:32px!important;padding:4px 9px!important;font-size:12px!important;line-height:18px}


/* On phones keep the sidebar above the tiles rather than reducing them to a sliver. */
@media(max-width:700px){html body.analysis-modern #analysisPage:not(.driver-mode){grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(120px,35%) minmax(0,1fr)}html body.analysis-modern #analysisPage.no-sidebar:not(.driver-mode){grid-template-rows:minmax(0,1fr)}html body.analysis-modern #analysisPage:not(.driver-mode)>aside{width:auto!important;max-width:100%;height:auto!important;min-height:0;overflow:auto}}
