:root,:root[data-portal-theme="technology"]{--portal-accent:#0b7ee8;--portal-accent-rgb:11,126,232;--portal-accent-dark:#0868c1;--portal-accent-soft:#e8f3ff}
:root[data-portal-theme="education"]{--portal-accent:#2f83bb;--portal-accent-rgb:47,131,187;--portal-accent-dark:#246b99;--portal-accent-soft:#e9f4fa}
:root[data-portal-theme="government-school"]{--portal-accent:#2b7550;--portal-accent-rgb:43,117,80;--portal-accent-dark:#205c3e;--portal-accent-soft:#e8f4ed}
:root[data-portal-theme="private-school"]{--portal-accent:#9b6d28;--portal-accent-rgb:155,109,40;--portal-accent-dark:#7b551d;--portal-accent-soft:#faf2e4}
:root[data-portal-theme="university"]{--portal-accent:#7a4aa0;--portal-accent-rgb:122,74,160;--portal-accent-dark:#60377f;--portal-accent-soft:#f2ebf8}
:root[data-portal-theme="corporate"]{--portal-accent:#2d6da3;--portal-accent-rgb:45,109,163;--portal-accent-dark:#225582;--portal-accent-soft:#eaf1f7}
:root[data-portal-theme="minimal"]{--portal-accent:#52525b;--portal-accent-rgb:82,82,91;--portal-accent-dark:#3f3f46;--portal-accent-soft:#f1f1f2}
:root[data-portal-theme]{--ha-primary:var(--portal-accent)!important;--ha-primary-hover:var(--portal-accent-dark)!important;--ha-primary-soft:var(--portal-accent-soft)!important;--bs-primary:var(--portal-accent)!important;--bs-primary-rgb:var(--portal-accent-rgb)!important;--app-primary:var(--portal-accent)!important}
:root[data-portal-theme] .btn-primary,:root[data-portal-theme] button.primary,:root[data-portal-theme] .button.primary,:root[data-portal-theme] .login-selected-banner{background:var(--portal-accent)!important;border-color:var(--portal-accent)!important}
:root[data-portal-theme] .btn-primary:hover,:root[data-portal-theme] button.primary:hover{background:var(--portal-accent-dark)!important;border-color:var(--portal-accent-dark)!important}
:root[data-portal-theme] a,:root[data-portal-theme] .eyebrow,:root[data-portal-theme] .sidebar-link.active,:root[data-portal-theme] .login-role-option.is-active{color:var(--portal-accent)}
:root[data-portal-theme] .sidebar-link.active,:root[data-portal-theme] .login-role-option.is-active{background:var(--portal-accent-soft)!important;border-color:var(--portal-accent)!important}
:root[data-portal-theme] .brand-mark,:root[data-portal-theme] .avatar{background:var(--portal-accent)!important}
.theme-picker-modal .modal-dialog{max-width:720px}.theme-picker-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.85rem}.theme-choice{--choice-accent:#0b7ee8;--choice-soft:#e8f3ff;display:flex;align-items:center;gap:.85rem;width:100%;padding:.75rem;border:1px solid #d8e0ea;border-radius:14px;background:#fff;color:#172235;text-align:left}.theme-choice:hover,.theme-choice.is-selected{border-color:var(--choice-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--choice-accent) 16%,transparent)}.theme-choice.is-selected::after{content:'Selected';margin-left:auto;padding:.24rem .48rem;border-radius:999px;background:var(--choice-soft);color:var(--choice-accent);font-size:.7rem;font-weight:800}.theme-choice-copy{display:grid;gap:.16rem}.theme-choice-copy strong{font-size:.9rem}.theme-choice-copy small{color:#6b7789;font-size:.7rem;font-weight:600}.theme-preview{position:relative;display:block;width:82px;height:52px;flex:0 0 82px;overflow:hidden;border:1px solid #d9e1eb;border-radius:9px;background:#f5f7fb;box-shadow:0 3px 9px rgba(23,34,53,.09)}.theme-preview i{position:absolute;display:block}.theme-preview-sidebar{inset:0 auto 0 0;width:21px;background:var(--choice-accent)}.theme-preview-header{inset:0 0 auto 21px;height:12px;background:#fff;border-bottom:1px solid #e1e6ed}.theme-preview-card{left:29px;right:8px;top:19px;height:17px;border:1px solid #dce3eb;border-radius:4px;background:#fff;box-shadow:inset 0 3px 0 var(--choice-soft)}.theme-preview-button{right:8px;bottom:6px;width:23px;height:6px;border-radius:5px;background:var(--choice-accent)}.theme-choice[data-theme="technology"]{--choice-accent:#0b7ee8;--choice-soft:#e8f3ff}.theme-choice[data-theme="education"]{--choice-accent:#2f83bb;--choice-soft:#e9f4fa}.theme-choice[data-theme="government-school"]{--choice-accent:#2b7550;--choice-soft:#e8f4ed}.theme-choice[data-theme="private-school"]{--choice-accent:#9b6d28;--choice-soft:#faf2e4}.theme-choice[data-theme="university"]{--choice-accent:#7a4aa0;--choice-soft:#f2ebf8}.theme-choice[data-theme="corporate"]{--choice-accent:#2d6da3;--choice-soft:#eaf1f7}.theme-choice[data-theme="minimal"]{--choice-accent:#52525b;--choice-soft:#f1f1f2}
@media(max-width:575.98px){.theme-picker-grid{grid-template-columns:1fr}}
.sidebar-group-heading{cursor:default}.sidebar-group-heading:hover{transform:none!important}.sidebar-group-heading .sidebar-group-chevron{display:none!important}
.portal-theme-button{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:40px;padding:.45rem .75rem;border:1px solid var(--ha-border,#d8e0ea);border-radius:.75rem;background:var(--ha-surface,#fff);color:var(--ha-text,#172235);font-weight:700;font-size:.82rem}.portal-theme-button:hover{border-color:var(--portal-accent);background:var(--portal-accent-soft);color:var(--portal-accent)}.portal-theme-button .app-icon{color:var(--portal-accent)}
body.public-app-shell .public-header-nav a.active,
body.public-app-shell .public-header-nav a.active:hover,
body.public-app-shell .public-header-nav a.active:focus-visible,
body.public-app-shell .public-header-nav a.active .app-icon{color:#fff!important;text-shadow:none!important}
body.public-app-shell .auth-shell-card button.primary,
body.public-app-shell .auth-shell-card .button.primary,
body.public-app-shell .auth-shell-card .btn-primary,
body.public-app-shell .auth-shell-card button.primary .app-icon{color:#fff!important;text-shadow:none!important}
body.public-app-shell .login-selected-banner,
body.public-app-shell .login-selected-banner b,
body.public-app-shell .login-selected-banner small,
body.public-app-shell .login-selected-banner .app-icon{color:#fff!important}
body.public-app-shell .login-selected-banner small{opacity:.9}
body.public-app-shell .login-role-option.is-active,
body.public-app-shell .login-role-option.is-active b{color:var(--portal-accent-dark)!important}
body.public-app-shell .login-role-option.is-active small{color:#4f6075!important}
.display-mode-section{margin-top:1.1rem;padding-top:1rem;border-top:1px solid var(--ha-border,#d8e0ea)}.display-mode-section h3{margin:0 0 .65rem;font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.display-mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.display-mode-choice{display:flex;align-items:center;gap:.7rem;padding:.7rem;border:1px solid var(--ha-border,#d8e0ea);border-radius:12px;background:var(--ha-surface,#fff);color:var(--ha-text,#172235);text-align:left}.display-mode-choice:hover,.display-mode-choice.is-selected{border-color:var(--portal-accent);box-shadow:0 0 0 3px rgba(var(--portal-accent-rgb),.14)}.display-mode-choice.is-selected::after{content:'Selected';margin-left:auto;color:var(--portal-accent);font-size:.68rem;font-weight:800}.display-mode-choice>span:last-child{display:grid}.display-mode-choice small{color:var(--ha-muted,#6b7789);font-size:.7rem}.mode-preview{width:42px;height:30px;flex:0 0 42px;border-radius:7px;border:1px solid #cfd8e3;box-shadow:inset 0 8px 0 var(--portal-accent)}.mode-preview-light{background:#fff}.mode-preview-dark{background:#151b23;border-color:#364152}
html[data-bs-theme="light"] body.homeaid-system.public-app-shell{color-scheme:light!important}
html[data-bs-theme="dark"] .theme-choice{background:#171e27;color:#f2f6fb;border-color:#364152}html[data-bs-theme="dark"] .theme-choice-copy small{color:#aab6c5}html[data-bs-theme="dark"] .theme-preview-header,html[data-bs-theme="dark"] .theme-preview-card{background:#202a35;border-color:#3c4857}html[data-bs-theme="dark"] .theme-preview{background:#151b23;border-color:#3c4857}
/* Keep every public-header action reachable on laptop and split-screen widths. */
@media(max-width:1199.98px){
body.public-app-shell .app-header .header-actions{flex:0 0 auto;min-width:0;gap:.4rem}
body.public-app-shell .public-header-nav{gap:.35rem}
body.public-app-shell .public-header-nav a,
body.public-app-shell #pwaInstallBtn,
body.public-app-shell .portal-theme-button{width:40px;min-width:40px;height:40px;padding:0!important;justify-content:center;flex:0 0 40px}
body.public-app-shell .public-header-nav a span,
body.public-app-shell #pwaInstallBtn span,
body.public-app-shell .portal-theme-button span{display:none!important}
body.public-app-shell .public-header-nav a .app-icon,
body.public-app-shell #pwaInstallBtn .app-icon,
body.public-app-shell .portal-theme-button .app-icon{margin:0!important}
}
@media(max-width:899.98px){body.public-app-shell .header-copy{display:none!important}}
@media(max-width:440px){.portal-theme-button span{display:none}.portal-theme-button{width:40px;padding:0}}
