.top-heading{display:flex;align-items:center;gap:12px;min-width:0}.top-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.nav-toggle,.settings-trigger{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:42px;min-height:42px}.nav-toggle{font-size:21px;line-height:1}.settings-trigger span{font-weight:650}.nav-scrim{display:none}.settings-popover{position:fixed;z-index:80;top:76px;right:24px;width:min(340px,calc(100vw - 32px));padding:18px;background:#fff;border:1px solid #dbe1ea;border-radius:14px;box-shadow:0 20px 55px rgba(15,23,42,.2)}.settings-popover[hidden]{display:none!important}.settings-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}.settings-head strong{font-size:18px}.settings-close{border:0;background:transparent;font-size:23px;min-width:38px;min-height:38px;cursor:pointer}.setting-row{display:grid;gap:7px;margin-top:14px}.setting-row label{font-size:13px;font-weight:650;color:#475569}.setting-row select{width:100%;font:inherit;padding:10px 11px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;color:#111827}.theme-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}.theme-option{font:inherit;border:1px solid #cbd5e1;background:#fff;border-radius:9px;padding:10px;cursor:pointer}.theme-option.active{background:#111827;color:#fff;border-color:#111827}.sidebar-state{display:flex;align-items:center;justify-content:space-between;gap:12px}.sidebar-state button{font:inherit;border:1px solid #cbd5e1;background:#fff;border-radius:9px;padding:9px 11px;cursor:pointer}.shell{transition:grid-template-columns .22s ease}.shell aside,.shell .side{transition:transform .22s ease,width .22s ease,padding .22s ease}
@media(min-width:951px){.shell.nav-collapsed{grid-template-columns:0 minmax(0,1fr)!important}.shell.nav-collapsed aside,.shell.nav-collapsed .side{width:0!important;padding-left:0!important;padding-right:0!important;overflow:hidden!important}}
@media(max-width:950px){.shell{grid-template-columns:1fr!important}.shell aside,.shell .side{position:fixed!important;z-index:70;inset:0 auto 0 0;width:min(280px,84vw)!important;height:100vh!important;padding:24px!important;overflow:auto!important;transform:translateX(0)}.shell.nav-collapsed aside,.shell.nav-collapsed .side{transform:translateX(-105%)}.nav-scrim{position:fixed;z-index:60;inset:0;background:rgba(15,23,42,.45)}.shell:not(.nav-collapsed) .nav-scrim{display:block}.settings-popover{top:70px;right:16px}.top-heading{width:100%}.top{align-items:flex-start!important}.top-actions{width:100%}.top-actions .btn,.top-actions button{flex:1}.nav-toggle{flex:0 0 42px!important}.nav{display:grid!important;overflow:visible!important}.nav a,.nav button{white-space:normal!important}}
@media(max-width:560px){.top-heading{align-items:flex-start}.top-heading h1{font-size:28px}.settings-trigger span{display:none}.settings-popover{top:64px}.top-actions{display:flex!important;grid-template-columns:none!important}.top-actions .btn:first-child{grid-column:auto!important}}
html[data-theme="dark"]{color-scheme:dark;background:#0b1120}html[data-theme="dark"] body,html[data-theme="dark"] .main{background:#0b1120!important;color:#e5e7eb!important}html[data-theme="dark"] .card,html[data-theme="dark"] .panel,html[data-theme="dark"] .settings-popover{background:#151e31!important;color:#e5e7eb!important;border-color:#334155!important;box-shadow:0 12px 34px rgba(0,0,0,.28)!important}html[data-theme="dark"] .muted,html[data-theme="dark"] .setting-row label,html[data-theme="dark"] th{color:#94a3b8!important}html[data-theme="dark"] .btn:not(.primary),html[data-theme="dark"] button:not(.primary):not(.approve),html[data-theme="dark"] .tab:not(.active),html[data-theme="dark"] .user,html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] .theme-option,html[data-theme="dark"] .sidebar-state button{background:#1e293b!important;color:#e5e7eb!important;border-color:#475569!important}html[data-theme="dark"] .primary,html[data-theme="dark"] .approve,html[data-theme="dark"] .tab.active,html[data-theme="dark"] .theme-option.active{background:#4f6fdc!important;color:#fff!important;border-color:#4f6fdc!important}html[data-theme="dark"] .user.active,html[data-theme="dark"] .messages,html[data-theme="dark"] .empty{background:#111827!important}html[data-theme="dark"] th,html[data-theme="dark"] td,html[data-theme="dark"] .row{border-color:#334155!important}html[data-theme="dark"] .settings-close{background:transparent!important}
.settings-popover{width:min(480px,calc(100vw - 32px));max-height:calc(100vh - 92px);overflow:auto}
.settings-section{border-top:1px solid #e2e8f0;padding-top:16px;margin-top:16px}.settings-section>strong{display:block;font-size:15px}.settings-form{display:grid;gap:11px;margin-top:12px}.settings-form label{display:grid;gap:6px;font-size:13px;font-weight:650;color:#475569}.settings-form input{width:100%;font:inherit;padding:10px 11px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;color:#111827}.settings-form input:disabled{background:#f1f5f9;color:#64748b;cursor:not-allowed}.settings-form small,.settings-loading{color:#64748b;font-size:12px}.settings-primary{font:inherit;border:1px solid #111827;background:#111827;color:#fff;border-radius:9px;padding:10px 12px;cursor:pointer}.settings-primary:disabled{opacity:.6;cursor:wait}.settings-notice{min-height:18px;font-size:12px;color:#047857}.settings-notice.error{color:#b91c1c}
html[data-theme="dark"] .settings-section{border-color:#334155}html[data-theme="dark"] .settings-form label,html[data-theme="dark"] .settings-form small,html[data-theme="dark"] .settings-loading{color:#94a3b8!important}html[data-theme="dark"] .settings-form input{background:#1e293b;color:#e5e7eb;border-color:#475569}html[data-theme="dark"] .settings-form input:disabled{background:#111827;color:#94a3b8}html[data-theme="dark"] .settings-primary{background:#4f6fdc!important;color:#fff!important;border-color:#4f6fdc!important}
@media(max-width:560px){.settings-popover{right:8px;width:calc(100vw - 16px);max-height:calc(100vh - 76px)}}

/* Company branding only. Layout and Master Website styling remain independent. */
:root{--company-primary:#111827;--company-secondary:#334155;--company-accent:#4F6FDC;--company-background:#F5F7FB;--company-text:#1F2937}
html:not([data-theme="dark"]) body,html:not([data-theme="dark"]) .main{background:var(--company-background)!important;color:var(--company-text)!important}
.shell aside,.shell .side{background:var(--company-secondary)!important}
.primary,.approve,.settings-primary,.tab.active,.theme-option.active{background:var(--company-primary)!important;color:#fff!important;border-color:var(--company-primary)!important}
.nav a.active,.nav button.active,.nav a:hover,.nav button:hover{background:var(--company-primary)!important;color:#fff!important}
.user.active{border-color:var(--company-primary)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--company-accent) 34%,transparent)}
.btn:focus-visible,.tab:focus-visible,.user:focus-visible,.nav a:focus-visible,.nav button:focus-visible,input:focus-visible,select:focus-visible{outline-color:var(--company-accent)!important}
html[data-theme="dark"] .primary,html[data-theme="dark"] .approve,html[data-theme="dark"] .settings-primary,html[data-theme="dark"] .tab.active,html[data-theme="dark"] .theme-option.active{background:var(--company-primary)!important;border-color:var(--company-primary)!important}
