/* App Shell — login, sidebar, panels, modal system */

/* Layout */
.app-shell {
    display: flex;
    height: 100vh;
    height: 100dvh;   /* iOS/Android: foelg den DYNAMISKE viewport (adressebar-kollaps) — 100vh
                         laaser til den store viewport og gav halv-bounce af topbjaelken paa mobil */
    position: relative;
    z-index: 1;
}

/* Opslagstavle-kiosk: skjul sidebar → board-visningen fylder hele skærmen */
.app-shell.kiosk-tavle .sidebar { display: none; }

/* Diskret log-ud-knap i kiosk (sidebaren med den normale knap er skjult) */
.kiosk-logout-btn {
    position: fixed;
    top: 16px; right: 22px;
    z-index: 60;
    font-family: "Geist Mono", ui-monospace, monospace;
    font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 7px 14px; border-radius: 8px;
    background: var(--ink-4);
    border: 1px solid var(--rule-2);
    color: var(--cream-mute);
    cursor: pointer; opacity: 0.6;
    transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.kiosk-logout-btn:hover { opacity: 1; color: var(--cream); background: var(--ink-5); border-color: var(--rule); }

/* Sidebar */
.sidebar {
    width: 180px;
    min-width: 180px;
    background: var(--ink-2);
    border-right: 1px solid var(--rule-2);
    display: flex;
    flex-direction: column;
    padding: 0;
    z-index: 10;
}

.sidebar-brand {
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--rule);
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-dot {
    display: block;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--accent);
    flex-shrink: 0;
}

.sidebar-brand h2 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--cream);
    margin: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--cream-dim);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.nav-item:hover {
    background: var(--ink-3);
    color: var(--cream);
}

.nav-item.active {
    background: var(--ink-4);
    color: var(--cream);
    font-weight: 600;
    border-left: 2px solid var(--accent);
    padding-left: 10px;
}

.nav-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.5;
}

.nav-item:hover svg {
    opacity: 0.8;
}

.nav-item.active svg {
    opacity: 1;
    color: var(--accent-hot);
}

.sidebar-footer {
    padding: 0 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-divider {
    height: 1px;
    background: var(--rule);
    margin: 4px 8px;
}

.sidebar-tools {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-tool-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--cream-mute);
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.sidebar-tool-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.5;
}

.sidebar-tool-btn:hover {
    background: var(--ink-3);
    color: var(--cream);
}

.sidebar-tool-btn:hover svg {
    opacity: 0.8;
}

.sidebar-userinfo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
}

.sidebar-user-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--cream-mute);
}

.sidebar-user-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-user {
    font-size: 12px;
    font-weight: 500;
    color: var(--cream);
}

.sidebar-role {
    font-family: "Geist Mono", ui-monospace, monospace;
    font-size: 9px;
    color: var(--cream-mute);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Content panels */
.content-area {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-width: 0;
}

.panel {
    display: none;
    height: 100vh;
    height: 100dvh;   /* samme dvh-foelgeskab som .app-shell */
    overflow: auto;
    overscroll-behavior: contain;   /* panel-scroll maa ikke kaede videre til body-rubber-band */
}

.panel.active {
    display: block;
}

/* Login overlay */
.login-overlay {
    position: fixed;
    inset: 0;
    background: var(--ink);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-overlay.hidden {
    display: none;
}

.login-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 320px;
    max-width: 90vw;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
}

.login-icon {
    margin-bottom: 16px;
}

.login-box h1 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 40px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--cream);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--cream-mute);
    margin-bottom: 40px;
}

.login-box form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 14px 18px;
    color: var(--cream);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

.login-box input::placeholder {
    color: rgba(255,255,255,0.3);
}

.login-box input:focus {
    border-color: var(--accent);
    background: rgba(255,255,255,0.08);
}

.login-error {
    color: var(--accent-hot);
    font-size: 12px;
    min-height: 18px;
    text-align: center;
}

.login-actions {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.login-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.login-btn-primary {
    background: linear-gradient(180deg, #e8734a 0%, #d9482c 100%);
    color: #fff;
    box-shadow: 0 6px 24px rgba(217,72,44,0.35);
}

.login-btn-primary:hover {
    box-shadow: 0 8px 32px rgba(217,72,44,0.5);
    transform: translateY(-1px);
}

.login-btn-visitor {
    background: none;
    color: var(--cream-mute);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    padding: 0;
}

.login-btn-visitor:hover {
    color: var(--cream);
}

/* "Find min plads"-sektion på login-skærm */
.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 12px;
    color: var(--cream-faint);
    font-family: "Geist Mono", ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--rule-2);
}

.login-seat-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.login-seat-title {
    font-family: "Fraunces", Georgia, serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--cream);
    margin: 0;
    text-align: center;
}
.login-seat-hint {
    margin: 0 0 4px;
    text-align: center;
    color: var(--cream-mute);
    font-size: 12px;
}
#seat-search-input {
    padding: 10px 12px;
    background: var(--ink-3, rgba(0,0,0,0.25));
    border: 1px solid var(--rule-2);
    border-radius: 6px;
    color: var(--cream);
    font-size: 14px;
    outline: none;
}
#seat-search-input:focus {
    border-color: #8b6fc7;
}
.login-btn-seat {
    background: linear-gradient(135deg, #8b6fc7, #6a4fb8);
    color: #fff;
    font-weight: 600;
    border: 0;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.login-btn-seat:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 111, 199, 0.4);
}
.login-link-visitor {
    background: none;
    border: 0;
    color: var(--cream-faint);
    font-size: 11px;
    padding: 6px;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 4px;
}
.login-link-visitor:hover {
    color: var(--cream-mute);
}

/* Accounts panel */
.accounts-panel {
    padding: 28px;
}

.accounts-panel h1 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.accounts-panel h1 em {
    font-style: italic;
    font-weight: 400;
    color: var(--cream-mute);
    font-size: 0.7em;
    margin-left: 6px;
}

.accounts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.account-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;   /* smal skærm: ombryd i stedet for at klippe knapperne af */
    gap: 16px;
    padding: 12px 16px;
    background: var(--ink-2);
    border: 1px solid var(--rule-2);
    border-radius: 10px;
}

/* "ogsaa postassistent"-fluebenet i Accounts. Ligger i den eksisterende flex-raekke foer
   knapperne (som har margin-left:auto), saa layoutet ikke skal skrives om. */
.account-pahat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    letter-spacing: .04em;
    color: var(--cream-mute);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;   /* ellers brækkede "også postassistent" og skubbede knapperne ud */
    flex: 0 0 auto;
}
.account-pahat input { cursor: pointer; }
/* Personens navn paa postassistent-listen — klikbart, saa omdøbning findes hvor hatten saettes. */
.account-paname {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: none;
    border: 1px solid var(--rule-2);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11.5px;
    color: var(--cream);
    cursor: pointer;
}
.account-paname:hover:not(:disabled) { border-color: var(--accent-dim); }
.account-paname:disabled { cursor: default; opacity: .5; }
.account-pamgr {
    flex: 0 0 auto;
    background: none;
    border: 1px solid var(--rule-2);
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 12px;
    color: var(--cream-mute);
    cursor: pointer;
}
.account-pamgr:hover { border-color: var(--accent-dim); color: var(--cream); }
.account-pahat input:disabled { cursor: default; opacity: .6; }
.account-pahat:has(input:disabled) { cursor: default; }
/* Admin-raekker set af en leder: laesbare, men uden handlinger. */
.account-row-locked { opacity: .6; }

.account-username {
    font-size: 14px;
    font-weight: 600;
    color: var(--cream);
    /* min-width:0 + ellipsis: uden det løb navnet ind UNDER rolle-chippen på et smalt
       vindue, så der stod "admir" og "olive". Nu forkortes det pænt i stedet. */
    flex: 1 1 120px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-role {
    font-family: "Geist Mono", ui-monospace, monospace;
    font-size: 10.5px;
    color: var(--cream-mute);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--ink-4);
    padding: 2px 8px;
    border-radius: 4px;
    flex: 0 0 auto;      /* chippen må aldrig klemmes — den er identiteten på rollen */
    white-space: nowrap;
}
.account-changepw, .account-delete { flex: 0 0 auto; white-space: nowrap; }

/* Smalt vindue: giv navnet sin egen linje, så rolle, flueben og knapper får plads
   nedenunder i stedet for at brække midt i ordene. */
@media (max-width: 780px) {
    .account-row { gap: 8px 12px; }
    .account-username { flex: 1 1 100%; }
}
/* Teksten bliver — naar navnet har sin egen linje, er der plads, og et nøgent flueben
   uden ord kan man ikke gætte betydningen af paa en telefon (ingen hover-titel). */

.account-delete {
    background: none;
    border: 1px solid var(--accent-dim);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}

.account-delete:hover {
    background: var(--accent-dim);
    color: var(--cream);
}

/* v0.8.0 — "Skift kode" pr. konto (admin sætter en rigtig kode at udlevere) */
.account-changepw {
    margin-left: auto;
    background: none;
    border: 1px solid var(--rule-2, rgba(255,255,255,0.18));
    color: var(--cream-mute);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}
.account-changepw:hover { background: rgba(255,255,255,0.08); color: var(--cream); }
.account-changepw + .account-delete { margin-left: 6px; }

.add-user-form {
    background: var(--ink-2);
    border: 1px solid var(--rule-2);
    border-radius: 10px;
    padding: 20px;
    max-width: 400px;
}

.add-user-form h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--cream);
}

.add-user-form label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--cream-mute);
    margin-bottom: 6px;
    margin-top: 12px;
}

.add-user-form label:first-of-type {
    margin-top: 0;
}

.add-user-form input,
.add-user-form select {
    width: 100%;
    background: var(--ink-3);
    border: 1px solid var(--ink-5);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--cream);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}

.add-user-form input:focus,
.add-user-form select:focus {
    border-color: var(--accent);
}

.add-user-form .btn {
    margin-top: 16px;
}

/* Responsive — tablet: icon-only sidebar */
@media (max-width: 900px) {
    .sidebar {
        width: 60px;
        min-width: 60px;
    }
    .sidebar-brand h2,
    .nav-item span,
    .sidebar-user,
    .sidebar-role {
        display: none;
    }
    .nav-item {
        justify-content: center;
        padding: 10px;
    }
    .sidebar-footer {
        align-items: center;
    }
    .sidebar-tool-btn span { display: none; }
}

/* ── Mobil (≤700px): sidebar skjult → separat fast bottom nav ── */
@media (max-width: 700px) {
    /* HÅRD iOS-lås: position:fixed følger den synlige viewport (som bund-nav'en), så
       dokumentet kan ALDRIG scrolles/hives — uanset vh/dvh-støtte og adressebar-delta.
       Body's indhold ryger ud af flow → body-højde 0 → intet tilbage at scrolle. */
    .app-shell {
        position: fixed;
        inset: 0;
        height: auto;   /* inset styrer højden */
    }

    /* Skjul original sidebar helt */
    .sidebar { display: none !important; }

    /* Content-area fylder hele viewport */
    .content-area {
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    }

    /* Kamera-FAB flyttes op over bottom nav */
    .scan-fab { bottom: calc(56px + 14px + env(safe-area-inset-bottom, 0px)) !important; }

    /* Live-opdatering-banner justeres over bottom nav */
    #live-update-banner {
        bottom: 70px;
        top: auto;
        transform: translateX(-50%) translateY(200%);
    }
    #live-update-banner.visible {
        transform: translateX(-50%) translateY(0);
    }

    /* Global: skjul "Planify" + "/ Section" i alle panel h1 på mobil
       (bottom nav viser allerede hvilken sektion man er på) */
    .board-header h1 em,
    .dashboard-header h1 em,
    .tasks-header h1 em,
    .people-header h1 em,
    .projects-header h1 em,
    .accounts-panel h1 em {
        display: none;
    }
    .board-header h1,
    .dashboard-header h1,
    .tasks-header h1,
    .people-header h1,
    .projects-header h1,
    .accounts-panel h1 {
        font-size: 18px;
    }

    /* Tasks header: kompakt */
    .tasks-header {
        padding: 10px 14px 8px;
        flex-wrap: wrap;
        gap: 6px;
        align-items: center;
        margin-bottom: 10px;
    }
    .tasks-meta { font-size: 10px; }

    /* Projects header: kompakt */
    .projects-header {
        padding: 10px 14px 8px;
        flex-wrap: wrap;
        gap: 6px;
    }
    .projects-header .board-search-wrap {
        flex: 1 1 100%;
        order: 5;
        margin-left: 0;
    }

    /* Dashboard header: kompakt */
    .dashboard-header {
        padding: 10px 16px 8px;
        flex-wrap: wrap;
        gap: 6px;
    }

    /* Accounts: kompakt */
    .accounts-panel { padding: 12px 14px; }
}

/* ── Fast mobil bottom nav bar (injiceret af JS) ── */
.mobile-nav {
    display: none;
}
@media (max-width: 700px) {
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        z-index: 200;
        height: 56px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: var(--ink-2);
        border-top: 1px solid var(--rule);
        align-items: stretch;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .mobile-nav::-webkit-scrollbar { display: none; }

    .mobile-nav-item {
        flex: 1;
        min-width: 48px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 6px 4px 4px;
        background: none;
        border: none;
        border-bottom: 2px solid transparent;
        color: var(--cream-dim);
        font-size: 9px;
        font-family: inherit;
        font-weight: 500;
        cursor: pointer;
        text-align: center;
        letter-spacing: 0.02em;
        white-space: nowrap;
        transition: color 0.12s, background 0.12s;
    }
    .mobile-nav-item:hover { background: var(--ink-3); color: var(--cream); }
    /* Aktivt valgt punkt = ACCENT (tekst + ikon via currentColor) + orange streg. */
    .mobile-nav-item.active {
        color: var(--accent);
        border-bottom-color: var(--accent);
    }
    .mobile-nav-item svg { width: 20px; height: 20px; flex-shrink: 0; opacity: 0.55; }
    .mobile-nav-item:hover svg { opacity: 0.85; }
    .mobile-nav-item.active svg { opacity: 1; }

    /* Scan-knap: IKKE fast orange (så den ikke ser valgt ud). Hvid/dæmpet som de øvrige
       ikke-valgte punkter — orange er reserveret til det aktivt valgte. */

    /* "Mere"-knap er adskilt med en tynd linje */
    .mobile-nav-item.mobile-more-btn {
        flex: 0 0 52px;
        border-left: 1px solid var(--rule-2);
    }
}

/* Mobile-more overlay (slide op fra bunden) */
.mobile-more-overlay {
    display: none;
}
@media (max-width: 700px) {
    .mobile-more-overlay {
        display: flex;
        position: fixed;
        inset: 0;
        z-index: 5000;
        background: rgba(0,0,0,0.55);
        align-items: flex-end;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease;
    }
    .mobile-more-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }
    .mobile-more-sheet {
        width: 100%;
        background: var(--ink-2);
        border-top: 1px solid var(--rule);
        border-radius: 16px 16px 0 0;
        padding: 16px 0 calc(20px + env(safe-area-inset-bottom, 0px));
        transform: translateY(100%);
        transition: transform 0.25s ease;
    }
    .mobile-more-overlay.open .mobile-more-sheet {
        transform: translateY(0);
    }
    .mobile-more-user {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 20px 16px;
        border-bottom: 1px solid var(--rule-2);
        margin-bottom: 8px;
    }
    .mobile-more-user svg { width: 20px; height: 20px; color: var(--cream-mute); }
    .mobile-more-user-name {
        font-size: 14px;
        font-weight: 600;
        color: var(--cream);
    }
    .mobile-more-user-role {
        font-family: "Geist Mono", ui-monospace, monospace;
        font-size: 10px;
        color: var(--cream-mute);
        text-transform: uppercase;
        letter-spacing: 0.06em;
    }
    .mobile-more-item {
        display: flex;
        align-items: center;
        gap: 14px;
        width: 100%;
        padding: 13px 20px;
        background: none;
        border: none;
        color: var(--cream);
        font-size: 14px;
        font-family: inherit;
        cursor: pointer;
        text-align: left;
        box-sizing: border-box;
    }
    .mobile-more-item svg { width: 18px; height: 18px; opacity: 0.6; flex-shrink: 0; }
    .mobile-more-item:hover { background: var(--ink-3); }
    .mobile-more-item.danger { color: #ff6b6b; }
    .mobile-more-item.danger svg { opacity: 0.8; }
    .mobile-more-divider { height: 1px; background: var(--rule); margin: 4px 0; }
}

/* ── Live-opdatering: banner når andres ændringer venter mens man arbejder ── */
#live-update-banner {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%) translateY(-200%);
    z-index: 9999;
    background: var(--accent, #4a90d9);
    color: #fff;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: transform 0.28s ease, opacity 0.28s ease;
    pointer-events: none;
}
#live-update-banner.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
#live-update-banner button {
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    font: inherit;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 999px;
    cursor: pointer;
}
#live-update-banner button:hover { background: rgba(255, 255, 255, 0.35); }

/* ── Passkeys (WebAuthn) ─────────────────────────────────────────────────────────────── */
.login-btn-passkey {
    margin-top: 8px; width: 100%;
    background: transparent; border: 1px solid var(--rule-2, #3a352d);
    color: var(--cream, #f0ece2);
}
.login-btn-passkey:hover { border-color: var(--accent, #d9482c); }
.login-btn-passkey.hidden { display: none !important; }
.account-pkbadge {
    font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
    background: rgba(74,144,217,.15); color: #7fb2e8; border: 1px solid rgba(74,144,217,.4);
    white-space: nowrap;
}

/* ── Enhedskode paa login-skaermen ────────────────────────────────────────────────
   Panelet ligger UDEN FOR #login-form (se index.php), saa det arver ikke formens
   gap/input-regler — derfor sine egne. .hidden findes kun scopet i denne fil, saa
   synligheden styres med style.display fra app.js. */
.login-enrol { width: 100%; margin-top: 14px; text-align: center; }

.login-enrol-link {
    background: none; border: none; padding: 4px 8px;
    color: var(--cream-mute); font-family: inherit; font-size: 12.5px;
    text-decoration: underline; text-underline-offset: 3px;
    cursor: pointer; opacity: .75; transition: opacity .15s, color .15s;
}
.login-enrol-link:hover { opacity: 1; color: var(--cream); }

.login-enrol-panel { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

#login-enrol-code {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 14px 18px;
    color: var(--cream);
    font-family: "Geist Mono", ui-monospace, monospace;
    font-size: 19px;
    letter-spacing: 0.22em;
    text-align: center;
    text-transform: uppercase;
    outline: none;
    transition: border-color 0.15s;
}
#login-enrol-code::placeholder { color: rgba(255,255,255,0.25); letter-spacing: 0.18em; }
#login-enrol-code:focus { border-color: var(--accent); background: rgba(255,255,255,0.08); }

/* Hvem koden hoerer til — vises FOER Face ID, saa en kode der er endt det forkerte
   sted bliver synlig inden noeglen oprettes. */
.login-enrol-hvem { font-size: 12.5px; color: var(--cream-mute); min-height: 16px; line-height: 1.45; }
.login-enrol-hvem b { color: var(--cream); }

/* En deaktiveret login-knap SKAL se deaktiveret ud. Der fandtes ingen :disabled-regel for
   .login-btn, så en knap midt i et kald beholdt cursor:pointer og sin hover-effekt og så
   100 % klikbar ud — man trykkede igen og igen uden at der skete noget. */
.login-btn:disabled,
.login-enrol-panel .login-btn[disabled] {
    opacity: 0.5;
    cursor: default;
    box-shadow: none;
    transform: none;
}
.login-btn:disabled:hover { box-shadow: none; transform: none; }

/* Kamera-soeger til enhedskode-scanning paa login-siden */
#login-enrol-video {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--rule-2, rgba(255,255,255,.14));
    background: #000;
}

/* Enhedskode som egen side (login-formularen skjules imens) */
.login-enrol-titel {
    font-family: "Fraunces", Georgia, serif;
    font-size: 21px;
    font-weight: 600;
    color: var(--cream);
    text-align: center;
    margin: 2px 0 0;
}
.login-enrol-guide {
    font-size: 13px;
    line-height: 1.55;
    color: var(--cream-mute);
    text-align: center;
    margin: 0 0 6px;
}
.login-enrol-guide b { color: var(--cream); }

/* Face ID-glyffen i login-knappen (kun telefon — computeren beholder 🔑).
   38px er højere end tekstlinjen — negativ lodret margin æder overskuddet, så
   knappen ikke vokser i højden af ikonet. */
.login-btn .pk-faceid { vertical-align: middle; margin: -10px 10px -10px 0; }

/* "Velkommen tilbage"-forsiden: navn + én knap + Ikke dig? */
.login-hej { width: 100%; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.login-hej-navn {
    font-family: "Fraunces", Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--cream);
    margin-top: 2px;
}
#login-hej-fejl:empty { display: none; }

/* Magic Mouse/trackpad: en vandret scroll-gestus der rammer kanten af en scroller
   (fx board-kolonnerne) må ALDRIG blive til browserens "swipe tilbage"-navigation.
   Planify er en SPA — historik-swipe hopper til en tilfældig tidligere visning og
   føles som at siden "forsvinder". x alene: lodret pull-to-refresh på mobil bevares. */
html, body {
    overscroll-behavior-x: none;
}
/* Bæltet OG selerne: gestussen skal dø allerede i selve den vandrette scroller. */
.board-container {
    overscroll-behavior-x: contain;
}

