:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --gray: #6b7280;
    --light: #f3f4f6;
    --purple: #8b5cf6;
    --pink: #ec4899;
    --teal: #14b8a6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #1e293b;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Auth Banner */
.auth-banner {
    background: var(--primary);
    color: white;
    padding: 12px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: none;
}

.auth-banner.visible {
    display: block;
}

.auth-banner-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-logout, .btn-admin {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 12px;
}

.btn-logout:hover, .btn-admin:hover {
    background: rgba(255,255,255,0.3);
}

/* Login Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-content {
    text-align: center;
}

.login-content h2 {
    margin-bottom: 16px;
    color: var(--primary);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    margin: 20px 0;
}

.help-text {
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 16px;
}

/* Header */
header {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    margin-bottom: 24px;
    margin-top: 50px;
}

h1 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 2rem;
}

.subtitle {
    color: var(--gray);
    font-size: 1.1rem;
}

.meeting-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--light);
}

.meeting-info div {
    background: var(--light);
    padding: 12px;
    border-radius: 8px;
}

.meeting-info label {
    font-weight: 600;
    color: var(--gray);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 4px;
}

.meeting-info input {
    width: 100%;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 0.95rem;
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--gray);
    margin-top: 8px;
    font-weight: 500;
}

.stat-card.completed .stat-number { color: var(--success); }
.stat-card.pending .stat-number { color: var(--warning); }
.stat-card.info .stat-number { color: var(--purple); }
.stat-card.actions .stat-number { color: var(--pink); }
.stat-card.archived .stat-number { color: var(--teal); }

/* Controls */
.controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-gray { background: var(--gray); color: white; }
.btn-purple { background: var(--purple); color: white; }
.btn-teal { background: var(--teal); color: white; }

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.filter-btn {
    padding: 10px 20px;
    background: var(--light);
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Agenda Sections */
.agenda-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 16px;
    overflow: hidden;
    cursor: grab;
    transition: all 0.3s;
}

.agenda-section:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.agenda-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--light) 0%, #e5e7eb 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.agenda-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.drag-handle {
    color: var(--gray);
    font-size: 1.2rem;
    cursor: grab;
}

.agenda-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1e293b;
}

.status-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.status-select {
    padding: 6px 12px;
    border-radius: 20px;
    border: 2px solid #e5e7eb;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    background: white;
}

.status-select.pending { border-color: var(--warning); color: var(--warning); }
.status-select.completed { border-color: var(--success); color: var(--success); }
.status-select.inprogress { border-color: var(--primary); color: var(--primary); }
.status-select.informational { border-color: var(--purple); color: var(--purple); }

.priority-badge {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.priority-high { background: #fee2e2; color: var(--danger); }
.priority-medium { background: #fef3c7; color: var(--warning); }
.priority-low { background: #d1fae5; color: var(--success); }

.agenda-content {
    padding: 20px;
    display: none;
}

.agenda-content.active {
    display: block;
}

.agenda-item {
    border-left: 4px solid var(--primary);
    padding: 16px;
    margin: 16px 0;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    cursor: grab;
    transition: all 0.2s;
}

.agenda-item.completed {
    opacity: 0.5;
    border-left-color: var(--success);
    background: #f0fdf4;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.item-title {
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.note-field {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    margin-top: 12px;
}

.note-field:focus {
    outline: none;
    border-color: var(--primary);
}

/* Archive */
.archive-toggle {
    background: var(--teal);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.archive-section {
    display: none;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 16px;
    overflow: hidden;
}

.archive-section.visible {
    display: block;
}

.archive-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.archive-item {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: 1fr 2fr 2fr 1fr;
    gap: 16px;
    align-items: center;
}

/* Auto Save Indicator */
.auto-save-indicator {
    position: fixed;
    top: 70px;
    right: 20px;
    background: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 100;
}

.auto-save-indicator.saving {
    background: var(--warning);
    color: white;
}

.auto-save-indicator.saved {
    background: var(--success);
    color: white;
}

/* Recovery Banner */
.recovery-banner {
    background: var(--warning);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: none;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.recovery-banner.visible {
    display: flex;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 2000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Add Section Button */
.add-section-btn {
    background: var(--light);
    border: 2px dashed var(--gray);
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    color: var(--gray);
    font-weight: 600;
    transition: all 0.2s;
}

.add-section-btn:hover {
    background: #e5e7eb;
    border-color: var(--primary);
    color: var(--primary);
}

/* Admin Styles */
.admin-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

.admin-section h2 {
    margin-bottom: 16px;
    color: var(--primary);
}

.user-list {
    margin-bottom: 16px;
}

.user-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: var(--light);
    border-radius: 8px;
    margin-bottom: 8px;
}

.badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.admin {
    background: var(--purple);
    color: white;
}

.badge.user {
    background: var(--primary);
    color: white;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.status-card {
    background: var(--light);
    padding: 16px;
    border-radius: 8px;
}

.status-card h3 {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/* Modal Content */
#outputContent {
    background: #f8fafc;
    padding: 24px;
    border-radius: 8px;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    line-height: 1.8;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--light);
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray);
    padding: 8px;
    line-height: 1;
}

.close-modal:hover {
    color: var(--danger);
}

/* Print Styles */
@media print {
    .controls, .filter-bar, button, .action-item input, .drag-handle, 
    .status-select, .priority-btn, .archive-toggle, .auto-save-indicator, 
    .recovery-banner, .auth-banner {
        display: none !important;
    }
    
    .agenda-content {
        display: block !important;
    }
    
    .archive-section {
        display: none !important;
    }
    
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        max-width: 100%;
    }
    
    header {
        margin-top: 0;
    }
}

/* Tablet og mellemstore skærme */
@media (max-width: 960px) {
    body { padding: 14px; }
    .container { padding: 0; }
    header h1 { font-size: 1.6rem; }
}

/* Mobil */
@media (max-width: 768px) {
    body { padding: 10px; }
    header h1 { font-size: 1.4rem; }
    header .subtitle { font-size: 0.9rem; }

    .controls, .filter-bar {
        flex-direction: column;
    }

    .controls > *, .filter-bar > * { width: 100%; }

    button {
        width: 100%;
        justify-content: center;
    }

    .dashboard {
        grid-template-columns: repeat(2, 1fr);
    }

    .archive-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* Modaler: fuld bredde på smartphone */
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 10% auto;
        padding: 18px;
    }

    /* Admin / user lister: stak elementer lodret */
    .user-item {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px;
    }

    /* Tabeller i cards: tillad vandret scroll i stedet for overflow */
    .admin-section table,
    .pk-card table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Reducer padding i cards */
    .card, .admin-section, .pk-card { padding: 16px; }
}

/* Lille mobil (≤480px) */
@media (max-width: 480px) {
    body { padding: 8px; }
    header h1 { font-size: 1.25rem; }

    .dashboard {
        grid-template-columns: 1fr;
    }

    /* Sørg for at grids som kanban/pk-grid ikke presser indhold */
    .pk-grid { gap: 14px; }

    /* Modaler: næsten fuld skærm */
    .modal-content {
        width: 100%;
        margin: 0;
        min-height: 100vh;
        border-radius: 0;
    }
}
/* ── Item Status Controls ── */
.item-status-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.item-priority {
    display: flex;
    gap: 4px;
}

.priority-btn {
    padding: 4px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    background: white;
    transition: all 0.2s;
}

.priority-btn.high  { border-color: var(--danger);  color: var(--danger); }
.priority-btn.medium { border-color: var(--warning); color: var(--warning); }
.priority-btn.low   { border-color: var(--success); color: var(--success); }

.priority-btn.high.active   { background: var(--danger);  color: white; }
.priority-btn.medium.active { background: var(--warning); color: white; }
.priority-btn.low.active    { background: var(--success); color: white; }

.item-status-select {
    padding: 4px 10px;
    border-radius: 15px;
    border: 2px solid #e5e7eb;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    background: white;
}

.item-status-select.pending     { border-color: var(--warning); color: var(--warning); }
.item-status-select.completed   { border-color: var(--success); color: var(--success); }

/* Forenklet "Afsluttet"-toggle til item-niveau */
.item-done-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 15px;
    border: 2px solid #e5e7eb;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    background: white;
    color: var(--gray);
    transition: all 0.15s;
    user-select: none;
}
.item-done-toggle:hover { border-color: var(--success); color: var(--success); }
.item-done-toggle input { margin: 0; cursor: pointer; accent-color: var(--success); }
.item-done-toggle.checked {
    border-color: var(--success);
    color: var(--success);
    background: #f0fdf4;
}

/* ── Info Badge ── */
.info-badge {
    background: #ede9fe;
    color: var(--purple);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ── Completion Info ── */
.completion-info {
    display: none;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--success);
    font-weight: 600;
}

.completion-info.visible {
    display: block;
}

/* ── Action Items ── */
.action-items {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.action-item.completed {
    background: #f0fdf4;
    text-decoration: line-through;
    color: var(--gray);
}

.action-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.action-item span:nth-child(2) {
    flex: 1;
}

.responsible {
    background: var(--light);
    color: var(--gray);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Site Nav ── */
.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 64px;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 0;
    z-index: 1100;
    padding: 0 24px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.35), 0 1px 0 rgba(255,255,255,0.04) inset;
    border-bottom: 2px solid var(--primary);
}
.site-nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.02rem;
    white-space: nowrap;
    margin-right: 28px;
    color: white;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: opacity 0.15s;
}
.site-nav-brand:hover { opacity: 0.85; }
.site-nav-brand-icon {
    font-size: 1.25rem;
    filter: drop-shadow(0 0 8px rgba(37, 99, 235, 0.6));
}
.site-nav-brand-text {
    background: linear-gradient(90deg, #ffffff 0%, #bfdbfe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.site-nav-links {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
.site-nav-links::-webkit-scrollbar { display: none; }
.site-nav-link {
    position: relative;
    padding: 8px 14px;
    border-radius: 8px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.15s;
}
.site-nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.08);
}
.site-nav-link.active {
    color: white;
    background: var(--primary);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}
.site-nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 16px;
    flex-shrink: 0;
}
.site-nav-username {
    font-size: 0.88rem;
    color: #e2e8f0;
    font-weight: 500;
}
.site-nav-role-badge {
    font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 99px;
    text-transform: uppercase; letter-spacing: 0.03em;
}
.site-nav-role-badge.role-owner   { background: #fbbf24; color: #78350f; }
.site-nav-role-badge.role-passive { background: #475569; color: #e2e8f0; }
.site-nav-admin-link {
    font-size: 0.84rem;
    color: #e2e8f0;
    text-decoration: none;
    padding: 5px 11px;
    border-radius: 7px;
    border: 1px solid #475569;
    transition: all 0.15s;
}
.site-nav-admin-link:hover {
    color: white;
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.15);
}
.site-nav-privacy-link {
    font-size: 1rem;
    color: #94a3b8;
    text-decoration: none;
    padding: 5px 9px;
    border-radius: 7px;
    transition: all 0.15s;
    line-height: 1;
}
.site-nav-privacy-link:hover {
    color: white;
    background: rgba(148, 163, 184, 0.15);
}
.site-nav-logout {
    padding: 6px 13px !important;
    font-size: 0.84rem !important;
    background: transparent !important;
    border: 1px solid #475569 !important;
    color: #e2e8f0 !important;
    border-radius: 7px !important;
    cursor: pointer;
    box-shadow: none !important;
    transform: none !important;
    transition: all 0.15s !important;
}
.site-nav-logout:hover {
    border-color: var(--danger) !important;
    color: white !important;
    background: rgba(220, 38, 38, 0.1) !important;
}

/* ── Hamburger + Drawer (mobil/tablet) ── */
.site-nav-burger {
    display: none;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    margin-left: auto;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    transition: background 0.15s;
}
.site-nav-burger:hover { background: rgba(255,255,255,0.08); }
.site-nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
.site-nav-burger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.site-nav-burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.site-nav-burger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-nav-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1095;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.site-nav-drawer-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

.site-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 85vw);
    background: #1e293b;
    color: white;
    z-index: 1200;
    box-shadow: -10px 0 30px rgba(0,0,0,0.35);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.site-nav-drawer.open { transform: translateX(0); }
.site-nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #334155;
    font-weight: 700;
    font-size: 1rem;
    color: #e2e8f0;
    letter-spacing: 0.02em;
}
.site-nav-drawer-close {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
}
.site-nav-drawer-close:hover { background: rgba(255,255,255,0.08); color: white; }
.site-nav-drawer-links {
    display: flex;
    flex-direction: column;
    padding: 12px 10px;
    gap: 2px;
}
.site-nav-drawer-links .site-nav-link {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
}
.site-nav-drawer-user {
    margin-top: auto;
    padding: 16px 20px;
    border-top: 1px solid #334155;
    background: rgba(0,0,0,0.15);
}
.site-nav-drawer-user .site-nav-user {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-left: 0;
}
.site-nav-drawer-user .site-nav-admin-link,
.site-nav-drawer-user .site-nav-logout,
.site-nav-drawer-user .site-nav-privacy-link {
    width: 100%;
    text-align: center;
    padding: 10px 14px !important;
    font-size: 0.9rem !important;
}
.site-nav-drawer-user .site-nav-privacy-link {
    border: 1px solid #475569;
    color: #cbd5e1;
    box-sizing: border-box;
}
.site-nav-drawer-user .site-nav-privacy-link::before {
    content: "🔒 Privatlivspolitik";
    font-size: 0.9rem;
}
/* Skjul emoji-only versionen i drawer — vi viser tekst */
.site-nav-drawer-user .site-nav-privacy-link {
    font-size: 0 !important;
    line-height: 1;
}
.site-nav-drawer-user .site-nav-privacy-link::before {
    font-size: 0.9rem !important;
}

/* Skjul drawer og dens del af nav'en som default på desktop */
.site-nav-drawer,
.site-nav-drawer-backdrop { display: none; }

/* ≤960px: skift til hamburger-layout */
@media (max-width: 960px) {
    .site-nav { padding: 0 16px; }
    .site-nav-brand { margin-right: 12px; font-size: 0.96rem; }
    .site-nav-brand-text { font-size: 0.96rem; }
    .site-nav-links,
    .site-nav > .site-nav-user { display: none; }
    .site-nav-burger { display: flex; }
    .site-nav-drawer,
    .site-nav-drawer-backdrop { display: block; }
    .site-nav-drawer { display: flex; }
}

/* ── badge.member / role badges ── */
.badge.member                    { background: var(--primary); color: white; }
.badge.admin                     { background: #2563eb; color: white; }
.badge.owner                     { background: #fbbf24; color: #78350f; }
.badge.passive                   { background: #94a3b8; color: white; }
.badge.role-standard             { background: var(--primary); color: white; }
.badge.role-admin                { background: #2563eb; color: white; }
.badge.role-owner                { background: #fbbf24; color: #78350f; }
.badge.role-passive              { background: #94a3b8; color: white; }

/* ── Frontpage ── */
.fp-hero {
    background: white;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    text-align: center;
}
.fp-hero h1 { color: var(--primary); font-size: 2rem; margin-bottom: 8px; }
.fp-hero p  { color: var(--gray); font-size: 1.05rem; }

.fp-modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.fp-module-card {
    background: white;
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    text-decoration: none;
    color: #1e293b;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.25s;
    border: 2px solid transparent;
}
.fp-module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-color: var(--primary);
}
.fp-module-card .fp-icon { font-size: 2.5rem; margin-bottom: 10px; display: block; }
.fp-module-card .fp-label { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.fp-module-card .fp-desc  { font-size: 0.82rem; color: var(--gray); }

.fp-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.fp-member-card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.fp-member-card:hover { transform: translateY(-2px); }
.fp-member-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.fp-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--light);
    flex-shrink: 0;
}
.fp-avatar-placeholder {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 700;
    flex-shrink: 0;
}
.fp-member-name  { font-weight: 700; font-size: 1.05rem; margin-bottom: 2px; }
.fp-member-role  { color: var(--gray); font-size: 0.85rem; margin-bottom: 4px; }
.fp-responsibilities { font-size: 0.85rem; color: #374151; }
.fp-responsibilities li { margin: 3px 0 3px 16px; }
.fp-edit-btn {
    font-size: 0.78rem !important;
    padding: 4px 10px !important;
    margin-top: 10px;
    background: var(--light) !important;
    color: var(--gray) !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: none !important;
    transform: none !important;
}
.fp-edit-btn:hover { background: #e5e7eb !important; }

/* ── Drag & Drop Feedback ── */
.dragging {
    opacity: 0.5;
    cursor: grabbing !important;
}

.drag-over {
    outline: 2px dashed var(--primary);
    outline-offset: 2px;
    background: #eff6ff;
}

/* ──────────────────────────────────────────────────────────────────
   Threads (kommunikations-tråde) — FAB + side panel + ny-tråd modal
   Global: vises på alle sider via ThreadsUI.init()
   ────────────────────────────────────────────────────────────────── */
.fp-threads-toggle {
    position:fixed; right:24px; bottom:24px;
    width:68px; height:68px;
    background:var(--primary); color:white; border:none;
    border-radius:50%;
    cursor:pointer; font-size:1.9rem;
    box-shadow:0 6px 18px rgba(0,0,0,0.22);
    z-index:960;
    display:flex; align-items:center; justify-content:center;
    transition:transform 0.18s ease-out, box-shadow 0.18s ease-out, background 0.18s;
}
.fp-threads-toggle:hover {
    background:var(--primary-dark);
    transform:scale(1.06);
    box-shadow:0 8px 22px rgba(0,0,0,0.28);
}
.fp-threads-toggle.panel-open { background:var(--primary-dark); }
@keyframes fpWiggle {
    0%, 88%, 100% { transform:rotate(0); }
    90%  { transform:rotate(-10deg); }
    92%  { transform:rotate(10deg); }
    94%  { transform:rotate(-8deg); }
    96%  { transform:rotate(8deg); }
    98%  { transform:rotate(-3deg); }
}
@keyframes fpPulseRing {
    0%   { box-shadow:0 6px 18px rgba(0,0,0,0.22), 0 0 0 0 rgba(220,38,38,0.55); }
    70%  { box-shadow:0 6px 18px rgba(0,0,0,0.22), 0 0 0 14px rgba(220,38,38,0); }
    100% { box-shadow:0 6px 18px rgba(0,0,0,0.22), 0 0 0 0 rgba(220,38,38,0); }
}
.fp-threads-toggle.has-unread {
    animation:fpWiggle 4s ease-in-out infinite, fpPulseRing 2s ease-out infinite;
}
.fp-threads-toggle.has-unread:hover { animation:none; }
@media (prefers-reduced-motion: reduce) {
    .fp-threads-toggle.has-unread { animation:none; }
}
.fp-threads-toggle.panel-open .toggle-icon-open { display:none; }
.fp-threads-toggle:not(.panel-open) .toggle-icon-close { display:none; }
.fp-threads-toggle .unread-badge {
    position:absolute; top:-4px; right:-4px;
    background:#dc2626; color:white;
    min-width:20px; height:20px; padding:0 5px;
    border-radius:99px;
    font-size:0.72rem; font-weight:700;
    display:flex; align-items:center; justify-content:center;
    box-shadow:0 0 0 2px white;
    line-height:1;
}

.fp-threads-panel {
    position:fixed; right:24px; bottom:96px;
    width:min(460px, calc(100vw - 48px));
    height:min(720px, calc(100vh - 140px));
    background:#ffffff;
    border-radius:16px;
    box-shadow:0 12px 40px rgba(0,0,0,0.18), 0 4px 12px rgba(0,0,0,0.08);
    z-index:950;
    display:flex; flex-direction:column;
    overflow:hidden;
    transform-origin:bottom right;
    transform:scale(0.92) translateY(12px);
    opacity:0;
    pointer-events:none;
    transition:transform 0.2s ease-out, opacity 0.2s ease-out;
}
.fp-threads-panel.open {
    transform:scale(1) translateY(0);
    opacity:1;
    pointer-events:auto;
}

.fp-threads-header {
    background:linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color:white;
    padding:14px 18px;
    display:flex; justify-content:space-between; align-items:center;
    gap:10px; flex-shrink:0;
}
.fp-threads-header h2 {
    color:white; margin:0; font-size:1.02rem; font-weight:600;
    display:flex; align-items:center; gap:8px;
}
.fp-threads-actions { display:flex; gap:6px; align-items:center; }
.fp-new-thread-btn {
    background:rgba(255,255,255,0.22); color:white;
    border:1px solid rgba(255,255,255,0.38);
    padding:6px 12px; border-radius:8px;
    cursor:pointer; font-size:0.82rem; font-weight:600;
    transition:background 0.15s, border-color 0.15s;
}
.fp-new-thread-btn:hover {
    background:rgba(255,255,255,0.34);
    border-color:rgba(255,255,255,0.55);
}
.fp-threads-close {
    background:transparent; border:none; color:white;
    cursor:pointer; font-size:1.6rem; line-height:1;
    padding:0 6px; opacity:0.85;
}
.fp-threads-close:hover { opacity:1; }

.fp-thread-list {
    flex:1; overflow-y:auto;
    display:flex; flex-direction:column;
    padding:0;
    background:#ffffff;
}
.fp-thread-list > p { margin:0; padding:20px; }

@media (max-width:520px) {
    .fp-threads-panel {
        right:0; left:0; bottom:0; top:64px;
        width:auto; height:auto;
        border-radius:0;
        transform:translateY(100%);
        transform-origin:center;
    }
    .fp-threads-panel.open { transform:translateY(0); }
    .fp-threads-toggle { right:16px; bottom:16px; }

    /* Skjul hover-afhængige slet-knapper på mobil — de flyder tilfældigt
       rundt når tap trigger :hover. Destruktive handlinger håndteres fra
       desktop eller admin-panelet. */
    .fp-thread-delete { display:none !important; }

    /* Større tap-targets for indre knapper i tråd-beskeder */
    .fp-thread-message .tm-time { font-size:0.72rem; }
    .fp-thread-input-row input { font-size:16px; }  /* undgå iOS zoom */
    .fp-thread-input-row button {
        min-width:40px; min-height:40px;
    }
}

.fp-thread-item {
    border-bottom:1px solid #eef1f4;
    padding:12px 18px; cursor:pointer; background:white;
    transition:background 0.12s;
    position:relative;
}
.fp-thread-item:hover { background:#f8fafc; }
.fp-thread-item.open {
    background:#f1f5f9;
    border-left:3px solid var(--primary);
    padding-left:15px;
}
.fp-thread-item.unread { background:#fffbf2; }
.fp-thread-item.unread .fp-thread-title { font-weight:700; color:#0f172a; }

.fp-thread-top { display:flex; align-items:center; gap:8px; }
.fp-thread-title {
    font-weight:600; color:#1f2937; flex:1;
    font-size:0.95rem;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.fp-thread-meta {
    font-size:0.72rem; color:var(--gray);
    white-space:nowrap;
}
.fp-thread-unread-dot {
    width:8px; height:8px; border-radius:50%;
    background:#dc2626; flex-shrink:0;
}
.fp-thread-preview {
    margin-top:3px;
    font-size:0.82rem; color:#64748b;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.fp-thread-delete {
    background:transparent; border:none; color:#94a3b8;
    cursor:pointer; font-size:0.9rem; padding:2px 6px;
    opacity:0; transition:opacity 0.15s, color 0.15s;
}
.fp-thread-item:hover .fp-thread-delete { opacity:0.75; }
.fp-thread-delete:hover { opacity:1; color:#dc2626; }

/* Chevron — visuel indikator for at tråd kan foldes ud */
.fp-thread-chevron {
    color:#94a3b8;
    font-size:0.85rem;
    transition:transform 0.18s ease, color 0.15s;
    display:inline-block;
    flex-shrink:0;
    width:14px;
    text-align:center;
}
.fp-thread-item:hover .fp-thread-chevron { color:#475569; }
.fp-thread-item.open .fp-thread-chevron {
    transform:rotate(90deg);
    color:var(--primary);
}

/* Besked-tæller badge */
.fp-thread-msgcount {
    font-size:0.72rem;
    background:#f1f5f9;
    color:#475569;
    padding:2px 8px;
    border-radius:10px;
    white-space:nowrap;
    font-weight:500;
}
.fp-thread-item.open .fp-thread-msgcount {
    background:#e0e7ff;
    color:#3730a3;
}
.fp-thread-item.unread .fp-thread-msgcount {
    background:#fef3c7;
    color:#92400e;
    font-weight:600;
}

/* Tydeligere hover-hint så brugeren ser at tråden er klikbar */
.fp-thread-item:not(.open):hover {
    background:#f0f7ff;
}
.fp-thread-item:not(.open):hover .fp-thread-preview {
    color:#334155;
}

.fp-thread-messages {
    margin-top:10px; padding:10px 0 4px;
    border-top:1px solid #e5e7eb;
    max-height:360px; overflow-y:auto;
    display:flex; flex-direction:column; gap:10px;
}
.fp-thread-message {
    padding:8px 12px; border-radius:14px;
    font-size:0.9rem; line-height:1.45; max-width:85%;
    word-wrap:break-word;
}
.fp-thread-message.mine {
    align-self:flex-end;
    background:var(--primary); color:white;
    border-bottom-right-radius:4px;
}
.fp-thread-message.theirs {
    align-self:flex-start;
    background:#f1f5f9; color:#1f2937;
    border-bottom-left-radius:4px;
}
.fp-thread-message .tm-author {
    font-weight:600; font-size:0.73rem;
    margin-bottom:3px; opacity:0.92;
}
.fp-thread-message .tm-time {
    font-size:0.68rem; opacity:0.7; margin-top:3px;
}

.fp-thread-input-row {
    margin-top:10px; display:flex; gap:6px; align-items:center;
    padding-top:10px; border-top:1px solid #e5e7eb;
}
.fp-thread-input-row input {
    flex:1; padding:9px 14px; border:1px solid #d1d5db;
    border-radius:20px; font-size:0.9rem;
    outline:none; transition:border-color 0.15s, box-shadow 0.15s;
}
.fp-thread-input-row input:focus {
    border-color:var(--primary);
    box-shadow:0 0 0 3px rgba(79, 70, 229, 0.12);
}
.fp-thread-input-row button {
    background:var(--primary); color:white; border:none;
    width:36px; height:36px; border-radius:50%;
    cursor:pointer; font-size:0.95rem;
    display:flex; align-items:center; justify-content:center;
    flex-shrink:0;
}
.fp-thread-input-row button:hover { background:var(--primary-dark); }

/* Online-medlemmer i tråd-panelet */
.fp-thread-members-section { border-bottom:1px solid #eef1f4; }
.fp-thread-members-section:empty { display:none; }
.fp-thread-members-section .fp-members-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(88px, 1fr));
    gap:8px;
    padding:12px 14px 14px;
    background:#fbfcfe;
}
.fp-member-tile {
    display:flex; flex-direction:column; align-items:center;
    gap:4px;
    padding:8px 6px;
    background:white;
    border:1px solid #e5e7eb;
    border-radius:10px;
    cursor:pointer;
    transition:all 0.12s;
    font-family:inherit;
    text-align:center;
    min-height:92px;
}
.fp-member-tile:hover {
    border-color:var(--primary);
    background:#f5f3ff;
    transform:translateY(-1px);
    box-shadow:0 2px 6px rgba(79,70,229,0.12);
}
.fp-member-tile.online { border-color:#bbf7d0; }
.fp-member-tile.online:hover { border-color:var(--primary); }
.fp-member-tile.unread { border-color:#fda4af; background:#fff1f2; }
.fp-member-tile-avatar-wrap {
    position:relative;
    width:40px; height:40px;
}
.fp-member-tile-avatar {
    width:40px; height:40px;
    border-radius:50%;
    object-fit:cover;
    display:block;
}
.fp-member-tile-placeholder {
    background:linear-gradient(135deg, #a78bfa, #6366f1);
    color:white;
    font-weight:600; font-size:0.85rem;
    display:flex; align-items:center; justify-content:center;
}
.fp-member-tile-dot {
    position:absolute;
    bottom:0; right:0;
    width:11px; height:11px;
    background:#22c55e;
    border:2px solid white;
    border-radius:50%;
    box-shadow:0 0 0 1px rgba(0,0,0,0.05);
}
.fp-member-tile-unread {
    position:absolute;
    top:-2px; right:-2px;
    width:10px; height:10px;
    background:#ef4444;
    border:2px solid white;
    border-radius:50%;
}
.fp-member-tile-name {
    font-size:0.75rem;
    font-weight:500;
    color:#334155;
    line-height:1.2;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    width:100%;
}
.fp-member-tile-title {
    font-size:0.66rem;
    color:#64748b;
    line-height:1.1;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    width:100%;
}

.fp-cat-group { border-bottom:1px solid #eef1f4; }
.fp-cat-group:last-child { border-bottom:none; }
.fp-cat-header {
    display:flex; align-items:center; gap:8px;
    padding:9px 18px;
    background:#f8fafc;
    cursor:pointer;
    user-select:none;
    font-size:0.85rem; font-weight:600; color:#475569;
    border-bottom:1px solid #eef1f4;
    transition:background 0.1s;
}
.fp-cat-header:hover { background:#eef2f7; }
.fp-cat-chevron {
    display:inline-block;
    transition:transform 0.15s;
    font-size:0.75rem; color:#94a3b8;
}
.fp-cat-group.collapsed .fp-cat-chevron { transform:rotate(-90deg); }
.fp-cat-group.collapsed .fp-cat-children { display:none; }
.fp-cat-icon { font-size:0.95rem; }
.fp-cat-label { flex:1; }
.fp-cat-count {
    font-size:0.72rem; color:#64748b;
    background:#e2e8f0; padding:1px 7px; border-radius:99px;
}
.fp-cat-count.has-unread { background:#fee2e2; color:#b91c1c; }
.fp-cat-children .fp-thread-item { padding-left:28px; }
.fp-cat-children .fp-thread-item.open { padding-left:25px; }

.fp-thread-visibility {
    font-size:0.66rem;
    padding:1px 6px;
    border-radius:99px;
    font-weight:600;
    letter-spacing:0.02em;
    flex-shrink:0;
}
.fp-thread-visibility.board { background:#eef2ff; color:#4338ca; }
.fp-thread-visibility.public { background:#ecfdf5; color:#047857; }

/* Ny tråd modal */
.nt-field { margin-bottom:14px; }
.nt-field label {
    display:block; font-weight:600; margin-bottom:5px;
    font-size:0.9rem; color:#334155;
}
.nt-field input[type="text"],
.nt-field select {
    width:100%; padding:9px 12px;
    border:1px solid #d1d5db; border-radius:8px;
    font-size:0.95rem; box-sizing:border-box;
    background:white;
}
.nt-field input[type="text"]:focus,
.nt-field select:focus {
    outline:none;
    border-color:var(--primary);
    box-shadow:0 0 0 3px rgba(79,70,229,0.12);
}
.nt-vis-options { display:flex; gap:10px; }
.nt-vis-options label {
    flex:1; margin:0;
    padding:12px 14px;
    border:1.5px solid #e5e7eb;
    border-radius:10px;
    cursor:pointer;
    display:flex; gap:10px; align-items:flex-start;
    transition:border-color 0.15s, background 0.15s;
}
.nt-vis-options label:hover {
    border-color:#cbd5e1;
    background:#f8fafc;
}
.nt-vis-options input[type="radio"] {
    margin-top:2px;
    accent-color:var(--primary);
}
.nt-vis-options input[type="radio"]:checked + .nt-vis-text {
    color:var(--primary-dark);
}
.nt-vis-options label:has(input:checked) {
    border-color:var(--primary);
    background:#eef2ff;
}
.nt-vis-text strong {
    display:block; font-size:0.92rem; color:#1e293b;
    margin-bottom:2px;
}
.nt-vis-text small {
    font-size:0.78rem; color:#64748b; line-height:1.35;
}

/* ─── Profile modal ──────────────────────────────────────────────────── */
.profile-modal {
    display:none; position:fixed; inset:0; z-index:1100;
    background:rgba(15,23,42,0.55); backdrop-filter:blur(3px);
    align-items:center; justify-content:center; padding:20px;
}
.profile-modal.active { display:flex; }
.profile-modal-content {
    background:#fff; border-radius:14px; width:100%; max-width:520px;
    box-shadow:0 20px 50px rgba(0,0,0,0.28);
    display:flex; flex-direction:column; max-height:92vh; overflow:hidden;
    animation:profileFadeIn 0.18s ease;
}
@keyframes profileFadeIn {
    from { opacity:0; transform:translateY(10px) scale(0.98); }
    to   { opacity:1; transform:translateY(0) scale(1); }
}
.profile-modal-header {
    display:flex; justify-content:space-between; align-items:center;
    padding:16px 20px; border-bottom:1px solid #e5e7eb;
}
.profile-modal-header h2 { margin:0; font-size:1.05rem; color:#1e293b; }
.profile-close {
    background:none; border:none; font-size:1.6rem; line-height:1;
    cursor:pointer; color:#94a3b8; padding:0 6px;
}
.profile-close:hover { color:#1e293b; }
.profile-modal-body { padding:20px; overflow-y:auto; }
.profile-field { margin-bottom:14px; }
.profile-field label {
    display:block; font-weight:600; font-size:0.88rem;
    color:#334155; margin-bottom:6px;
}
.profile-label-hint {
    font-weight:400; color:#64748b; font-size:0.78rem; margin-left:6px;
}
.profile-field input[type="email"],
.profile-field input[type="text"] {
    width:100%; padding:10px 12px; font-size:0.95rem;
    border:1px solid #e5e7eb; border-radius:8px; box-sizing:border-box;
    font-family:inherit;
}
.profile-field input[type="email"]:focus,
.profile-field input[type="text"]:focus {
    outline:none; border-color:var(--primary);
    box-shadow:0 0 0 3px rgba(102,126,234,0.15);
}
.profile-static {
    padding:9px 12px; background:#f8fafc; border:1px solid #e5e7eb;
    border-radius:8px; color:#475569; font-size:0.92rem;
}
.profile-help {
    margin:6px 0 0; font-size:0.78rem; color:#64748b; line-height:1.4;
}
.profile-sep {
    border:none; border-top:1px solid #e5e7eb; margin:16px 0;
}
/* Notifikations-præferencer */
.profile-notify-grid {
    display:grid;
    grid-template-columns:1fr;
    gap:4px;
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:10px;
    padding:6px;
}
.profile-notify-row {
    display:flex; align-items:center; gap:10px;
    padding:8px 10px;
    border-radius:6px;
    cursor:pointer;
    font-size:0.88rem;
    color:#334155;
    transition:background 0.12s;
}
.profile-notify-row:hover { background:#eef2f7; }
.profile-notify-row input[type="checkbox"] {
    width:16px; height:16px;
    accent-color:var(--primary, #4f46e5);
    cursor:pointer;
    margin:0;
}
.profile-notify-icon { font-size:1rem; flex-shrink:0; }
.profile-notify-label { flex:1; line-height:1.3; }
.profile-notify-toggle-all {
    flex:1;
    padding:6px 10px;
    font-size:0.78rem;
    background:#f1f5f9;
    border:1px solid #cbd5e1;
    color:#334155;
    border-radius:6px;
    cursor:pointer;
    transition:background 0.12s;
}
.profile-notify-toggle-all:hover { background:#e2e8f0; }

.profile-status {
    margin-top:10px; font-size:0.85rem; min-height:1.2em;
}
.profile-status-error { color:var(--danger, #dc2626); }
.profile-status-info  { color:#64748b; }
.profile-modal-footer {
    display:flex; gap:10px; justify-content:flex-end;
    padding:14px 20px; border-top:1px solid #e5e7eb; background:#f8fafc;
}
@media (max-width:520px) {
    .profile-modal { padding:0; }
    .profile-modal-content {
        max-width:100%; width:100%; height:100%; max-height:100%;
        border-radius:0;
    }
}

/* ───────────────────────── Site footer (privacy link) ───────────────────────── */
/* ───────────────────────── Consent-modal (GDPR samtykke) ───────────────────────── */
.consent-modal {
    display:none; position:fixed; inset:0;
    background:rgba(15,23,42,0.55); z-index:3500;
    align-items:center; justify-content:center; padding:20px;
}
.consent-modal.active { display:flex; }
.consent-content {
    background:white; border-radius:14px;
    max-width:480px; width:100%; padding:26px 24px;
    box-shadow:0 20px 50px rgba(0,0,0,0.25);
}
.consent-content h2 { color: var(--primary); margin-top:0; }
.consent-content p { line-height: 1.5; }
.consent-content label.consent-check {
    display:flex; align-items:flex-start; gap:10px;
    padding:12px; background:#f8fafc; border-radius:8px;
    margin-top:14px; cursor:pointer; font-size:0.9rem;
}
.consent-content label.consent-check input { margin-top:2px; }
.consent-content .consent-actions {
    display:flex; gap:10px; margin-top:18px; justify-content:flex-end;
}

/* ───────────────────────── Profile actions (export + delete) ───────────────────────── */
.profile-actions {
    display:flex; flex-direction:column; gap:8px;
    margin-top:16px; padding-top:16px; border-top:1px solid #e5e7eb;
}
.profile-action-btn {
    padding:10px 14px;
    border-radius:8px;
    border:1px solid #e5e7eb;
    background:#f8fafc;
    cursor:pointer;
    font-size:0.9rem;
    text-align:left;
    color:#1f2937;
}
.profile-action-btn:hover { background:#eef2ff; border-color:#c7d2fe; }
.profile-action-btn.danger { color:var(--danger); border-color:#fecaca; background:#fef2f2; }
.profile-action-btn.danger:hover { background:#fee2e2; border-color:#fca5a5; }
.profile-action-hint {
    font-size:0.78rem; color:var(--gray); margin:0 0 0 2px;
}

/* Message author title (tråde + chats) */
.tm-author-title {
    font-size:0.72rem; font-weight:normal; color:#64748b;
    margin-left:4px;
}
.chat-msg-author {
    font-size:0.72rem; color:#64748b; margin-bottom:2px;
}

/* ═══════════════════════════════════════════════════════════════════
   Feedback-knap i topbar + modal
   ═══════════════════════════════════════════════════════════════════ */
.site-nav-feedback {
    background:linear-gradient(135deg, #f59e0b, #ef4444);
    color:white;
    border:none;
    padding:6px 14px 6px 12px;
    border-radius:999px;
    font-size:0.85rem;
    font-weight:600;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    gap:6px;
    transition:transform 0.15s, box-shadow 0.15s;
    box-shadow:0 2px 6px rgba(239,68,68,0.25);
    animation:fbWiggle 10s ease-in-out infinite;
    white-space:nowrap;
    margin-right:4px;
}
.site-nav-feedback:hover {
    transform:scale(1.07);
    box-shadow:0 4px 12px rgba(239,68,68,0.42);
    animation:none;
}
.site-nav-feedback:active { transform:scale(0.97); }
.site-nav-feedback .fb-icon { font-size:1rem; }

@keyframes fbWiggle {
    0%, 92%, 100% { transform:rotate(0) scale(1); }
    93% { transform:rotate(-6deg) scale(1.04); }
    94% { transform:rotate(6deg) scale(1.04); }
    95% { transform:rotate(-4deg) scale(1.04); }
    96% { transform:rotate(4deg) scale(1.04); }
    97% { transform:rotate(0) scale(1.04); }
}

/* Mobil: bevar knappen kompakt i drawer */
@media (max-width: 768px) {
    .site-nav-feedback {
        width:100%;
        justify-content:center;
        padding:10px 14px;
        font-size:0.95rem;
    }
}

/* Feedback-modal */
.feedback-content {
    max-width:580px;
    width:92vw;
    max-height:92vh;
    overflow-y:auto;
    padding:24px 24px 20px;
    position:relative;
    box-sizing:border-box;
}
.feedback-header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:6px;
}
.feedback-header h2 {
    margin:0;
    color:var(--primary);
    font-size:1.3rem;
}
.feedback-close-btn {
    background:none; border:none;
    font-size:1.2rem; cursor:pointer;
    color:#64748b;
    padding:6px 10px;
    border-radius:6px;
    line-height:1;
}
.feedback-close-btn:hover { background:#f1f5f9; color:#0f172a; }
.feedback-intro {
    color:#555;
    font-size:0.9rem;
    margin:0 0 18px;
    line-height:1.45;
}
.feedback-type-row {
    display:flex;
    gap:10px;
    margin-bottom:18px;
}
.feedback-type-option {
    flex:1;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:10px 14px;
    border:2px solid #e5e7eb;
    border-radius:10px;
    cursor:pointer;
    transition:all 0.15s;
    font-weight:600;
    font-size:0.95rem;
    color:#475569;
    user-select:none;
}
.feedback-type-option input {
    margin:0;
    accent-color:var(--primary);
}
.feedback-type-option:hover { border-color:#c7d2fe; background:#f8fafc; }
.feedback-type-option:has(input:checked) {
    border-color:var(--primary);
    background:#eef2ff;
    color:var(--primary);
}
.feedback-label {
    display:block;
    font-weight:600;
    font-size:0.88rem;
    margin:14px 0 6px;
    color:#334155;
}
.feedback-optional {
    font-weight:400;
    color:#94a3b8;
    font-size:0.8rem;
}
.feedback-input, .feedback-textarea {
    width:100%;
    padding:10px 12px;
    border:1px solid #d1d5db;
    border-radius:8px;
    font-family:inherit;
    font-size:0.95rem;
    box-sizing:border-box;
    color:#0f172a;
    background:white;
    transition:border-color 0.15s, box-shadow 0.15s;
}
.feedback-input:focus, .feedback-textarea:focus {
    outline:none;
    border-color:var(--primary);
    box-shadow:0 0 0 3px rgba(79,70,229,0.12);
}
.feedback-textarea {
    resize:vertical;
    min-height:120px;
    line-height:1.45;
}
.feedback-dropzone {
    border:2px dashed #c7d2fe;
    border-radius:10px;
    padding:18px;
    text-align:center;
    background:#f8fafc;
    color:#64748b;
    font-size:0.9rem;
    transition:all 0.15s;
    margin-top:2px;
}
.feedback-dropzone p { margin:0; }
.feedback-dropzone.drag {
    border-color:var(--primary);
    background:#eef2ff;
    color:var(--primary);
}
.feedback-file-link {
    color:var(--primary);
    text-decoration:underline;
    cursor:pointer;
    font-weight:600;
}
.feedback-thumbs {
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin-top:10px;
}
.feedback-thumb {
    position:relative;
    width:90px; height:90px;
    border-radius:8px;
    overflow:hidden;
    border:1px solid #e5e7eb;
    background:#f8fafc;
}
.feedback-thumb img {
    width:100%; height:100%;
    object-fit:cover;
    display:block;
}
.feedback-thumb button {
    position:absolute;
    top:4px; right:4px;
    background:rgba(0,0,0,0.65);
    color:white;
    border:none;
    border-radius:50%;
    width:22px; height:22px;
    cursor:pointer;
    font-size:0.75rem;
    padding:0;
    display:flex;
    align-items:center;
    justify-content:center;
    line-height:1;
}
.feedback-thumb button:hover { background:rgba(0,0,0,0.85); }
.feedback-actions {
    display:flex;
    justify-content:flex-end;
    gap:10px;
    margin-top:22px;
    padding-top:14px;
    border-top:1px solid #f1f5f9;
}
@media (max-width: 600px) {
    .feedback-type-option { font-size:0.88rem; padding:10px 8px; }
    .feedback-actions { flex-direction:column-reverse; }
    .feedback-actions button { width:100%; }
}