html, body { max-width: 100vw; overflow-x: hidden; }
:root {
    --chrome-bg: #14182a;
    --chrome-border: rgba(255,255,255,0.08);
    --main-bg: #0a0e1a;
    --text-primary: #f8fafc;
    --text-muted: #9ca3af;
    --accent: #6366f1;
}
[data-theme="light"] {
    --chrome-bg: #eef0f5;
    --chrome-border: rgba(15,21,37,0.10);
    --main-bg: #fafbfd;
    --text-primary: #0f172a;
    --text-muted: #475569;
}
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --chrome-bg: #eef0f5;
        --chrome-border: rgba(15,21,37,0.10);
        --main-bg: #fafbfd;
        --text-primary: #0f172a;
        --text-muted: #475569;
    }
}
.public-shell {
    display: grid;
    grid-template-columns: 60px 1fr;
    grid-template-rows: 0 1fr auto;
    grid-template-areas: "header header" "sidebar main" "footer footer";
    min-height: 100vh;
}
.public-shell .lxc-public-header,
.public-shell .lxc-public-footer { display: none !important; }
.public-shell .public-main { grid-area: main; padding-top: 70px !important; padding-bottom: 60px !important; background: var(--main-bg, transparent); min-width: 0; }
.lx-sidebar {
    grid-area: sidebar; width: 60px; background: var(--chrome-bg, #14182a); border: 0;
    overflow-y: auto; overflow-x: hidden; position: fixed; left: 0; top: 56px;
    height: calc(100vh - 56px - 40px); transition: width .2s ease; z-index: 100;
    scrollbar-width: none; -ms-overflow-style: none;
}
.lx-sidebar::-webkit-scrollbar { display: none; width: 0; height: 0; }
.lx-sidebar:hover { width: 240px; box-shadow: 4px 0 24px rgba(0,0,0,.25); }
.lx-sidebar-nav { display: flex; flex-direction: column; padding: 12px 0 24px 0; }
.lx-sidebar-link {
    display: flex; align-items: center; gap: 12px; padding: 10px 18px; color: var(--text-muted, #9ca3af);
    text-decoration: none; font-size: .9em; white-space: nowrap; border-left: 3px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
}
.lx-sidebar-link:hover { color: var(--text-primary, #fff); background: rgba(255,255,255,0.04); }
.lx-sidebar-link.active { color: var(--accent, #6366f1); border-left-color: var(--accent, #6366f1); background: rgba(99,102,241,0.10); }
[data-theme="light"] .lx-sidebar-link:hover { background: rgba(0,0,0,0.04); }
[data-theme="light"] .lx-sidebar-link.active { background: rgba(99,102,241,0.08); }
.lx-sidebar-icon { flex: 0 0 24px; display: inline-flex; align-items: center; justify-content: center; }
.lx-sidebar-label { opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; pointer-events: none; }

/* Kundeønske 2026-05-30: sidemeny-IKONENE skal være lys grå (ikke blå accent),
   i alle tilstander. Aktiv-markering beholdes via venstre-stripen. */
.lx-sidebar .lx-sidebar-icon { color: #cbd5e1 !important; }
.lx-sidebar:hover .lx-sidebar-label { opacity: 1; transform: translateX(0); }
.public-header {
    grid-area: header; display: flex !important; align-items: center; gap: 12px; padding: 0 36px;
    height: 64px; background: var(--chrome-bg, #14182a); border: 0; color: var(--text-primary);
    position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; z-index: 9998 !important;
    font-family: Inter, system-ui, sans-serif; font-size: 14px; line-height: 1.2;
}
.public-header .sidebar-brand { width: 240px; display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 600; flex-shrink: 0; }
.public-header .sidebar-brand-mark {
    width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, var(--accent, #6366f1), #8b80ff);
    color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px;
}
.public-header .sidebar-brand-name { font-size: 14px; font-weight: 600; letter-spacing: 0; }
.public-header-search { flex: 1; max-width: 720px; position: relative; }
.public-header-search input {
    width: 100%; height: 38px; padding: 0 14px; border-radius: 8px; background: var(--chrome-bg, #14182a);
    border: 1px solid var(--chrome-border, rgba(255,255,255,0.10)); color: var(--text-primary); font-size: 14px;
    font-family: Inter, system-ui, sans-serif; font-weight: 400;
}
.public-header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.public-header-actions .btn { height: 38px; display: inline-flex; align-items: center; padding: 0 12px; font-size: 14px; font-weight: 600; font-family: Inter, system-ui, sans-serif; border-radius: 8px; text-decoration: none; border: 1px solid var(--chrome-border); color: var(--text-primary); background: transparent; cursor: pointer; line-height: 1; }
.public-header-actions .btn-primary { background: var(--accent, #6366f1); color: #fff; border-color: var(--accent, #6366f1); }
.public-header .header-pref-controls { gap: 8px; }
.public-header .lexi-usermenu-trigger { height: 38px !important; padding: 0 12px 0 6px !important; border-radius: 8px !important; font-family: Inter, system-ui, sans-serif !important; font-size: 14px !important; font-weight: 600 !important; line-height: 1 !important; }
.public-header .lexi-usermenu-avatar { width: 30px !important; height: 30px !important; font-size: 12px !important; font-weight: 700 !important; }
.public-header-inline-form { margin: 0; }
.public-footer {
    grid-area: footer; padding: 10px 24px; background: var(--chrome-bg, #14182a); border: 0; color: var(--text-muted);
    font-size: .85em; min-height: 40px !important; line-height: 1.3; position: fixed !important;
    left: 0 !important; right: 0 !important; bottom: 0 !important; z-index: 9999 !important;
    display: flex !important; visibility: visible !important; opacity: 1 !important;
}
.public-footer-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-start; width: 100%; }
.public-footer-meta { margin-right: auto; }
.public-footer-links { display: flex; gap: 12px; flex-wrap: wrap; margin-left: auto; }
.public-footer-links a { color: var(--text-muted); text-decoration: none; }
.public-footer-links a:hover { color: var(--accent); }
.public-header-hamburger { display: none; width: 36px; height: 36px; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--chrome-border); border-radius: 6px; color: var(--text-primary); cursor: pointer; }

/* === Kopi av lx-brand / lx-icon-btn fra _LxLayout — alltid synlig på public-header === */
.public-header .lx-icon-btn.public-header-hamburger {
    display: inline-flex !important;
    width: 38px; height: 38px; border-radius: 10px;
    background: transparent; border: 1px solid var(--chrome-border, rgba(255,255,255,.10));
    color: var(--text-primary, #fff); cursor: pointer; padding: 0;
    align-items: center; justify-content: center;
    transition: all .15s; flex-shrink: 0;
}
.public-header .lx-icon-btn.public-header-hamburger:hover {
    background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.20);
}
[data-theme="light"] .public-header .lx-icon-btn.public-header-hamburger {
    border-color: rgba(15,21,37,.12); color: var(--text-primary, #0f172a);
}
[data-theme="light"] .public-header .lx-icon-btn.public-header-hamburger:hover {
    background: rgba(15,21,37,.05); border-color: rgba(15,21,37,.25);
}
.public-header .lx-brand.sidebar-brand {
    width: 240px; display: flex; align-items: center; gap: 10px;
    font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 22px;
    color: var(--text-primary, #fff); text-decoration: none; line-height: 1; flex-shrink: 0;
}
.public-header .lx-brand.sidebar-brand .lx-brand-icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(135deg, #00b4d8, #0096b8);
    color: #fff; font-family: 'Poppins', sans-serif;
    font-weight: 800; font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,180,216,.30); flex-shrink: 0;
}
.public-header .lx-brand.sidebar-brand .lx-brand-text {
    display: flex; flex-direction: column; min-width: 0;
}
.public-header .lx-brand.sidebar-brand .lx-brand-name {
    color: var(--text-primary, #fff); font-size: 18px; font-weight: 800;
    letter-spacing: -.01em; line-height: 1.1;
}
.public-header .lx-brand.sidebar-brand .lx-brand-tagline {
    color: var(--text-muted, #cbd5e1); font-size: 11px; font-weight: 500;
    line-height: 1.2; margin-top: 2px;
}

/* === Header-elementer uten ramme — alle blender med header-bakgrunn === */
/* Søkefelt: ingen ramme, samme bg som header, font matcher språk/valuta-chips (Inter 14px 600) */
.public-header .public-header-search input,
.public-header .public-header-search input:focus {
    background: transparent !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--text-primary) !important;
    font-family: Inter, system-ui, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 0 12px !important;
}
.public-header .public-header-search input::placeholder {
    color: var(--text-muted, rgba(241,245,249,.55)) !important;
    font-family: Inter, system-ui, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* Språk / valuta / tema-chips: ingen ramme, transparent bg (blender med header) */
.public-header .academy-sso-chip,
.public-header details.academy-sso-currency > summary.academy-sso-chip {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
.public-header .academy-sso-chip:hover,
.public-header .academy-sso-chip:focus-visible {
    background: rgba(255,255,255,.06) !important;
    border: 0 !important;
}
[data-theme="light"] .public-header .academy-sso-chip:hover,
[data-theme="light"] .public-header .academy-sso-chip:focus-visible {
    background: rgba(15,21,37,.06) !important;
}

/* Logg inn-knapp: ingen ramme */
.public-header .public-header-actions .btn {
    border: 0 !important;
    background: transparent !important;
}
.public-header .public-header-actions .btn:hover {
    background: rgba(255,255,255,.06) !important;
}
[data-theme="light"] .public-header .public-header-actions .btn:hover {
    background: rgba(15,21,37,.06) !important;
}

/* Registrer deg-knapp: samme bg som header + sort tekst */
.public-header .public-header-actions .btn.btn-primary {
    background: var(--chrome-bg, #14182a) !important;
    color: #000 !important;
    border: 0 !important;
}
.public-header .public-header-actions .btn.btn-primary:hover {
    background: var(--chrome-bg, #14182a) !important;
    color: #000 !important;
    opacity: .85;
}
[data-theme="light"] .public-header .public-header-actions .btn.btn-primary {
    color: #000 !important;
}
.lx-search-dropdown {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--chrome-bg); border: 1px solid var(--chrome-border);
    border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.35); max-height: 70vh; overflow-y: auto; z-index: 200;
}
.lx-search-dropdown[hidden] { display: none; }
.lx-search-group { padding: 8px 12px 4px; font-size: .7em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.lx-search-item { display: block; padding: 8px 12px; color: inherit; text-decoration: none; border-radius: 6px; font-size: .9em; }
.lx-search-item:hover, .lx-search-item.active { background: rgba(99,102,241,0.15); color: var(--text-primary, #fff); }
@media (max-width: 900px) {
    .public-shell { grid-template-columns: 1fr; grid-template-areas: "header" "main" "footer"; }
    .lx-sidebar { position: fixed; left: -260px; top: 56px; width: 260px; height: calc(100vh - 56px); transition: left .2s ease; }
    .public-shell.sidebar-open .lx-sidebar { left: 0; }
    .public-header-hamburger { display: inline-flex; }
    .public-header-search { display: none; }
    .public-header .sidebar-brand { width: auto; }
    .public-header-actions { gap: 4px; }
    .public-header-actions .btn { padding: 6px 9px; }
}
