/* © 2026 Northcap Group. Alle rettigheder forbeholdt. */
/* ============================================================
   layout.css — Header, sidebar, navigation, main, bund-menu
   Struktur: TOPBAR → MAIN → BOTTOM NAV → SIDEBAR
   ============================================================ */
/* ── TOPBAR v2 ────────────────────────────────────────────── */
.topbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: 140px;
    background: rgba(8, 11, 18, 0.72);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 8px 32px rgba(0,0,0,0.35);
    display: flex; align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 20px;
    z-index: 100;
}

.topbar::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(129,140,248,0.35), rgba(255,122,69,0.25), transparent);
    pointer-events: none;
}

.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }

.topbar-brand {
    display: flex; flex-direction: column; align-items: center; gap: 0px;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 14px;
    transition: background 0.2s;
    white-space: nowrap;
    line-height: 1;
}
.topbar-brand:hover { background: rgba(148, 163, 184, 0.07); }

.topbar-logo {
    height: 140px; width: 88px;   /* matcher billedets format (0.63) — viser hele øksen+tekst */
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(129, 140, 248, 0.3), 0 0 24px rgba(129, 140, 248, 0.18);
}

.topbar-title {
    display: none;   /* teksten 'FlowAxe' sidder nu i billedet selv — undgår dobbelt-tekst */
    font-family: var(--font-display);
    font-size: 1.15rem; font-weight: 700;
    letter-spacing: -0.015em;
    margin-top: 2px;
    background: linear-gradient(120deg, #FFFFFF 20%, #C7D2FE 60%, #A5B4FC 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navigation i topbar (desktop) */
.topbar-nav {
    display: none;
    align-items: center;
    gap: 2px;
    background: rgba(23, 31, 47, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.1);
    padding: 4px;
    border-radius: 14px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

.nav-pill {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 15px;
    border-radius: 10px;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.84rem; font-weight: 550;
    transition: all 0.18s ease;
    white-space: nowrap;
    position: relative;
}
.nav-pill span { font-size: 0.95rem; }
.nav-pill:hover { color: var(--color-white); background: rgba(148, 163, 184, 0.08); }
.nav-pill.active {
    color: var(--color-white);
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.25), rgba(56, 189, 248, 0.16));
    box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.35), 0 2px 10px rgba(129, 140, 248, 0.15);
}

@media (min-width: 768px) {
    .topbar-nav { display: flex; }
}

.topbar-right { display: flex; align-items: center; gap: 8px; }

.topbar-btn {
    position: relative;
    background: none; border: none;
    color: var(--color-text-secondary);
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s;
}
.topbar-btn:hover {
    color: var(--color-white);
    background: rgba(148, 163, 184, 0.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.topbar-btn:active { transform: scale(0.94); }
.topbar-btn svg {
    width: 22px; height: 22px;
    stroke-width: 1.8;
}

.notif-badge {
    position: absolute; top: 5px; right: 5px;
    min-width: 17px; height: 17px;
    padding: 0 4px;
    background: linear-gradient(135deg, var(--color-danger), #F472B6);
    color: #fff;
    font-size: 0.62rem; font-weight: 700;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 2px var(--color-bg);
}
/* hidden-attributten skal altid vinde over display:flex */
.notif-badge[hidden], .chat-launcher-badge[hidden] { display: none !important; }

.topbar-clock {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--color-text-secondary);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    padding: 6px 12px;
    border-radius: 999px;
    letter-spacing: 0.03em;
    display: none;
}
@media (min-width: 640px) { .topbar-clock { display: block; } }

/* ── MAIN ─────────────────────────────────────────────────── */
.main { padding: 20px 16px 28px; max-width: 1240px; margin: 0 auto; }

.view { display: none; }
.view.active { display: block; animation: viewIn 0.28s cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes viewIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Sektions-headings */
.page-head { margin-bottom: 18px; }
.page-head h2 {
    font-family: var(--font-display);
    font-size: 1.35rem; font-weight: 700;
    letter-spacing: -0.02em;
}
.page-head .page-sub { color: var(--color-text-secondary); font-size: 0.85rem; margin-top: 2px; }

.section-title {
    font-family: var(--font-display);
    font-size: 0.98rem; font-weight: 700;
    letter-spacing: -0.01em;
    margin: 26px 0 12px;
    display: flex; align-items: center; gap: 8px;
}
.section-title .section-more {
    margin-left: auto;
    font-size: 0.75rem; font-weight: 600;
    color: var(--color-accent);
    text-decoration: none;
    background: var(--color-accent-soft);
    padding: 5px 12px;
    border-radius: 999px;
    transition: all 0.2s;
}
.section-title .section-more:hover { background: rgba(129, 140, 248, 0.22); color: var(--color-white); }


/* ── BOTTOM NAV (kun mobil) — flydende pill-dock ────────── */
/* Inspireret af Linear/Notion: kun ikoner, aktiv-prik, svæver over indholdet.
   Skjult på desktop — der bruges topbar-navigationen i stedet. */
.bottom-nav {
    position: fixed; bottom: 14px; left: 50%;
    transform: translateX(-50%);
    height: 60px;
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(15, 21, 32, 0.98);
    backdrop-filter: blur(22px) saturate(1.6);
    -webkit-backdrop-filter: blur(22px) saturate(1.6);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 22px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255,255,255,0.05);
    padding: 6px 8px;
    z-index: 100;
}

.bottom-nav-item {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px;
    text-decoration: none;
    color: var(--color-text-muted);
    width: 58px; height: 46px;
    border-radius: 14px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}
.bottom-nav-item svg {
    width: 21px; height: 21px;
    stroke-width: 1.9;
}
.bottom-nav-item .bn-label {
    font-size: 0.56rem; font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 0.9;
}
.bottom-nav-item:hover {
    color: var(--color-text-primary);
    background: rgba(148, 163, 184, 0.08);
}
.bottom-nav-item.active {
    color: var(--color-accent);
    background: var(--color-accent-soft);
}
.bottom-nav-item.active svg { stroke-width: 2.3; }
/* Aktiv-indikator: lille prik over ikonet */
.bottom-nav-item.active::after {
    content: '';
    position: absolute; top: -4px;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
    box-shadow: 0 0 8px var(--color-accent-glow);
}

/* Fjern helt på desktop — topbar-nav tager over */
@media (min-width: 768px) {
    .bottom-nav { display: none; }
}

/* ── MOBIL (max 767px): kompakt topbar ─────────────────── */
/* Topbar er 140px på desktop for at vise hele logoet.
   På mobil skrumper vi logo + topbar så indholdet får plads. */
@media (max-width: 767px) {
    .topbar { height: 64px; padding: 0 12px; gap: 10px; }
    .topbar-logo { height: 52px; width: auto; border-radius: 10px; }
    .topbar-brand { padding: 4px 8px; }
    .topbar-btn { width: 38px; height: 38px; }
    .topbar-btn svg { width: 21px; height: 21px; }
    .topbar-right { gap: 6px; }
}

/* ── SIDEBAR DRAWER ───────────────────────────────────────── */
.sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 200;
}
.sidebar-overlay.open { opacity: 1; pointer-events: auto; }

.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 288px; max-width: 85vw;
    background: var(--color-bg-elevated);
    border-right: 1px solid var(--color-border);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 201;
    display: flex; flex-direction: column;
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 16px;
    border-bottom: 1px solid var(--color-border);
}
.sidebar-logo {
    height: 42px; width: 42px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.sidebar-close {
    background: none; border: none;
    color: var(--color-text-secondary);
    font-size: 1.1rem; cursor: pointer;
    padding: 6px 8px; border-radius: 8px;
    transition: all 0.2s;
}
.sidebar-close:hover { color: var(--color-white); background: var(--color-bg); }

.sidebar-nav {
    padding: 14px 10px;
    display: flex; flex-direction: column; gap: 4px;
    flex: 1;
}
.sidebar-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border-radius: var(--border-radius-sm);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500; font-size: 0.92rem;
    transition: all 0.2s;
}
.sidebar-item span { font-size: 1.1rem; }
.sidebar-item:hover { color: var(--color-white); background: var(--color-bg); }
.sidebar-item.active {
    color: var(--color-accent);
    background: var(--color-accent-soft);
}

.sidebar-footer {
    padding: 14px 16px;
    font-size: 0.74rem;
    color: var(--color-text-secondary);
    border-top: 1px solid var(--color-border);
}

