:root {
    --primary: #0b2c6b;
    --primary-hover: #163f8f;
    --success: #117a4b;
    --success-hover: #14945b;
    --danger: #b42318;
    --danger-bg: #fff1f2;
    --danger-border: #fecdd3;
    --bg-color: #eef3fb;
    --card-bg: #ffffff;
    --text-main: #152033;
    --text-muted: #5b6780;
    --border-color: #cfd9ea;
    --panel-radius: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    padding: 16px;
    display: flex;
    justify-content: center;
}

/* --- SPLASH / FORSIDE --- */
#splash-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, #0b2c6b 0%, #1a4fa8 30%, #0d3d8a 60%, #112e6e 100%);
    position: relative;
    overflow: hidden;
}

#splash-container::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 45%,
        rgba(255, 255, 255, 0.05) 48%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 52%,
        transparent 55%
    );
    animation: pageShimmer 6s infinite linear;
    pointer-events: none;
}

@keyframes pageShimmer {
    0% { transform: translate(-30%, -30%); }
    100% { transform: translate(30%, 30%); }
}

.splash-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.splash-logo {
    width: min(700px, 85vw);
    display: block;
    margin: 0 auto;
    /* animation handled by internal SVG classes */
}

.logo-wrapper {
    perspective: 1000px;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
}

.premium-logo {
    width: 100%;
    height: auto;
    overflow: visible;
}

/* Animations for Logo Elements */
.logo-box {
    opacity: 1;
}

.logo-text-fag {
    opacity: 1;
}

.logo-hyphen {
    opacity: 1;
}

.logo-text-main {
    opacity: 1;
}


.splash-btn {
    font-size: 1.1rem;
    padding: 18px 48px;
    border-radius: 14px;
    width: auto !important;
    letter-spacing: 0.02em;
}

.splash-btn:hover {
    letter-spacing: 0.06em;
}

/* --- LOGIN SCREEN --- */
#login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 40px 20px;
    gap: 32px;
    background: linear-gradient(135deg, #0b2c6b 0%, #1a4fa8 30%, #0b2c6b 100%);
    position: relative;
    overflow: hidden;
}

#login-container::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 45%,
        rgba(255, 255, 255, 0.03) 48%,
        rgba(255, 255, 255, 0.07) 50%,
        rgba(255, 255, 255, 0.03) 52%,
        transparent 55%
    );
    animation: pageShimmer 8s infinite linear;
    pointer-events: none;
}

.login-card {
    background-color: var(--card-bg);
    border-radius: var(--panel-radius);
    padding: 48px 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 10px 40px rgba(11, 44, 107, 0.15);
    text-align: center;
}

.login-card h2 {
    color: var(--primary);
    margin-bottom: 24px;
    font-size: 1.5rem;
}

.login-logo {
    width: 90%;
    max-width: 340px;
    margin-bottom: 32px;
}

.error-msg {
    color: var(--danger);
    margin-top: 16px;
    font-size: 0.9rem;
    font-weight: 600;
}

.success-msg {
    color: var(--success);
    margin-top: 16px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* --- MAIN APP --- */
#app-container {
    width: 100%;
    max-width: 800px;
    display: flex; /* overridden by JS */
    flex-direction: column;
    gap: 16px;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    border-radius: var(--panel-radius);
    padding: 0; /* Changed to handle internal padding */
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(11, 44, 107, 0.2);
    overflow: hidden;
    margin-bottom: 8px;
}

.header-top {
    padding: 24px 24px 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.main-nav {
    display: flex;
    background: rgba(0,0,0,0.15);
    padding: 0 12px;
    gap: 4px;
}

.nav-item {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.nav-item:hover {
    color: white;
    background: rgba(255,255,255,0.05);
}

.nav-item.active {
    color: white;
    border-bottom-color: white;
    background: rgba(255,255,255,0.1);
}

.header-logo {
    height: 45px;
    object-fit: contain;
    background: white;
    border-radius: 8px;
    padding: 8px;
}

.header-text h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
}

.header-text p {
    color: #cfe0ff;
    font-size: 0.95rem;
}

.user-info {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

#logged-in-user {
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(0,0,0,0.2);
    padding: 4px 10px;
    border-radius: 20px;
}

.btn-logout {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    padding: 6px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.btn-logout:hover {
    background: rgba(255,255,255,0.2);
    border-color: white;
}

/* Tabs */
.top-tabs {
    display: flex;
    gap: 8px;
}

.tab-btn {
    flex: 1;
    background-color: white;
    border: 1px solid var(--border-color);
    color: var(--primary);
    padding: 14px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.tab-btn:hover {
    background-color: #f5f8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 44, 107, 0.08);
}

.tab-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 6px 16px rgba(11, 44, 107, 0.25);
}

/* --- Larger Folder Tabs (emp-tabs) --- */
.emp-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding: 4px;
}

.emp-tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 18px 20px;
    background-color: white;
    border: 1px solid var(--border-color);
    color: var(--primary);
    border-radius: 18px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.emp-tab-btn:hover {
    background-color: #f5f8ff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 44, 107, 0.1);
}

.emp-tab-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white !important;
    box-shadow: 0 8px 20px rgba(11, 44, 107, 0.25);
    transform: translateY(-1px);
}

.emp-tab-btn.active i, .emp-tab-btn.active span {
    color: white;
}

/* Sections */
.tab-content {
    display: none;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--panel-radius);
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin: 20px 0 10px 0;
}

/* Form Elements */
.field-wrap {
    margin-bottom: 16px;
}

.field-label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.styled-input, .styled-textarea, select.styled-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: all 0.2s;
    background-color: #fbfcff;
}

select.styled-input {
    appearance: none;
    cursor: pointer;
}

.styled-input:focus, .styled-textarea:focus, select.styled-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 44, 107, 0.1);
    background-color: #fff;
}

.styled-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Chips / Segment controls */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.chip {
    background-color: white;
    border: 1px solid #ccc;
    color: var(--primary);
    padding: 10px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chip:hover {
    background-color: #f0f4f8;
}

.chip.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(11, 44, 107, 0.2);
}

/* Summary Rows */
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.summary-row:last-child {
    border-bottom: none;
}
.summary-label {
    color: var(--text-muted);
    font-weight: 600;
}
.summary-value {
    color: var(--text-main);
    font-weight: 700;
    text-align: right;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-success, .btn-outline {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    display: block;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover { background-color: #082153; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(11, 44, 107, 0.3); }

.btn-secondary {
    background-color: var(--primary-hover);
    color: white;
}
.btn-secondary:hover { background-color: #123377; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(22, 63, 143, 0.3); }

.btn-success {
    background-color: var(--success);
    color: white;
}
.btn-success:hover { background-color: var(--success-hover); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(17, 122, 75, 0.3); }

.btn-outline {
    background-color: transparent;
    border: 2px solid #ccc;
    color: var(--primary);
}
.btn-outline:hover { background-color: #f5f8ff; border-color: var(--primary); }

.preview-box {
    background-color: #09162e;
    color: #eef3ff;
    padding: 16px;
    border-radius: 16px;
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    font-size: 0.9rem;
    margin-top: 12px;
}

/* Saksregister */
.case-card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    margin-top: 16px;
    background-color: #fbfcff;
    transition: all 0.2s;
}
.case-card:hover {
    border-color: #a4b9db;
    background-color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.case-id {
    color: var(--primary);
    font-weight: 800;
}
.case-status {
    background-color: #eaf0fb;
    color: var(--primary-hover);
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
}
.case-title {
    font-weight: 800;
    margin-bottom: 6px;
    font-size: 1.1rem;
}
.case-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 4px;
}
.case-desc {
    margin-top: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.case-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}
.btn-small {
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.btn-small-primary {
    background-color: var(--primary);
    color: white;
}
.btn-small-primary:hover { background-color: #082153; }
.btn-small-danger {
    background-color: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}
.btn-small-danger:hover { background-color: #ffe4e6; }

/* Admin Users */
.user-list {
    margin-top: 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
.user-row {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    background: white;
    gap: 16px;
}
.user-row:last-child {
    border-bottom: none;
}
.user-row .username { 
    font-weight: 800; 
    color: var(--primary); 
    font-size: 1.1rem; 
    display: block; 
    margin-bottom: 2px;
}
.user-email {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    word-break: break-all;
}
.role-badge-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.user-row .role { 
    font-size: 0.7rem; 
    background: var(--primary-light); 
    color: var(--primary); 
    padding: 4px 8px; 
    border-radius: 6px; 
    font-weight: 800; 
    text-transform: uppercase;
}
.contact-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
}
.user-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Role Toggle Badge (Discrete) */
.btn-role-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: inline-block;
}
.btn-role-badge:hover {
    background: #f0f4f8;
    color: var(--primary);
    border-color: var(--primary);
}

/* Animations */

.empty-state {
    color: var(--text-muted);
    text-align: center;
    padding: 30px;
    font-style: italic;
}

/* --- Kompetanseplan --- */
.employee-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.employee-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: white;
    overflow: hidden;
}
.employee-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
    background: #fbfcff;
}
.employee-header:hover {
    background: #f0f4f8;
}
.employee-body {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}
.course-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 0.9rem;
}
.course-table th, .course-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
}
.course-table th {
    font-weight: 700;
    color: var(--text-muted);
    background: #fafafc;
}
.add-course-form {
    background: #fdfdfd;
    padding: 16px;
    border-radius: 8px;
    border: 1px dashed #ccc;
}

/* --- Filer / Dokumentarkiv --- */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.file-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fbfcff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.file-row:hover {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(11, 44, 107, 0.1);
    transform: translateY(-2px);
}

.file-icon {
    font-size: 2rem; /* Like admin icons */
    width: 48px;
    text-align: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-name {
    font-weight: 700 !important;
    color: var(--primary);
    font-size: 1rem;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Page System --- */
.page {
    display: none;
    flex-direction: column;
    gap: 16px;
}
.page.active {
    display: flex;
}

/* --- Back Bar --- */
.back-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn-back {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-back:hover {
    background: var(--primary);
    color: white;
}
.page-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
}

/* --- Home Grid --- */
.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 12px;
}

@media (max-width: 600px) {
    .home-grid {
        grid-template-columns: 1fr;
    }
}
.home-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--panel-radius);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.home-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(11, 44, 107, 0.12);
    border-color: var(--primary);
}
.home-card-icon {
    font-size: 2rem;
    width: 48px;
    text-align: center;
    flex-shrink: 0;
}
.home-card-body {
    flex: 1;
}
.home-card-title {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 4px;
}
.home-card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.home-card-badge {
    background: var(--danger);
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    flex-shrink: 0;
}
.home-card-arrow {
    font-size: 1.6rem;
    color: var(--border-color);
    font-weight: 300;
    flex-shrink: 0;
}


/* ===== PREMIUM VISUAL EFFECTS ===== */

/* Animated gradient background */

/* Floating logo animation on splash - starts after entry */
.splash-logo {
    width: min(700px, 85vw);
    display: block;
    margin: 0 auto;
}

/* Glassmorphism splash button */
.splash-btn {
    background: rgba(255,255,255,0.15) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3) !important;
    color: white !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}
.splash-btn:hover {
    background: rgba(255,255,255,0.28) !important;
    letter-spacing: 0.06em;
    transform: translateY(-3px) !important;
    box-shadow: 0 16px 48px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.4) !important;
}


/* Glassmorphism login card */
#login-container {
    background: linear-gradient(135deg, #0b2c6b 0%, #1a4fa8 50%, #0d3d8a 100%);
    position: relative;
    overflow-x: hidden;
}

.login-logo-top {
    width: min(600px, 90vw);
    z-index: 2;
}

.login-card {
    z-index: 2;
}

.login-card {
    background: rgba(255,255,255,0.13) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.25) !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2) !important;
}
.login-card h2 { color: white !important; }
.login-card .field-label { color: rgba(255,255,255,0.85) !important; }
.login-card .styled-input {
    background: rgba(255,255,255,0.12) !important;
    border-color: rgba(255,255,255,0.25) !important;
    color: white !important;
}
.login-card .styled-input::placeholder { color: rgba(255,255,255,0.5); }
.login-card .styled-input:focus {
    background: rgba(255,255,255,0.2) !important;
    border-color: rgba(255,255,255,0.6) !important;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.15) !important;
}
.login-card .btn-primary {
    background: rgba(255,255,255,0.18) !important;
    border: 1px solid rgba(255,255,255,0.35);
    color: white !important;
    position: relative;
    overflow: hidden;
}
.login-card .btn-primary:hover {
    background: rgba(255,255,255,0.3) !important;
}
.login-card a { color: #ffffff !important; opacity: 1 !important; }
.login-card .error-msg { color: #ffffff !important; }
.login-card .success-msg { color: #ffffff !important; }
#login-progress-status { color: rgba(255,255,255,0.8) !important; }


/* Home cards: staggered entry + left border glow */
.home-card {
    border-left: 4px solid transparent;
}
.home-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 32px rgba(11, 44, 107, 0.15);
    border-left-color: var(--primary);
}
.home-card:active { transform: scale(0.97); }


.home-card-badge {
    box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.2);
}

/* Animated header gradient */
.main-header {
    background: linear-gradient(135deg, #0b2c6b 0%, #1a4fa8 50%, #163f8f 100%);
    background-size: 100% 100%;
}

/* Input lift on focus */
.styled-input:focus, .styled-textarea:focus {
    transform: translateY(-1px);
    transition: all 0.2s ease;
}


/* --- New Profile / User Administration Detailed View --- */

.profile-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    margin-top: 20px;
    align-items: start;
    text-align: left; /* Tvinger venstrejustering siden overordnede containere kan ha sentrert tekst */
}

@media (max-width: 900px) {
    .profile-container {
        grid-template-columns: 1fr;
    }
}

/* Sidebar Styling */
.profile-sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-sidebar-card {
    background: white;
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    text-align: center;
}

.profile-avatar-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 16px;
    cursor: pointer;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    font-size: 0.9rem;
    border: 2px solid white;
    transition: all 0.2s;
}

.profile-sidebar-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.profile-sidebar-title {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
}

.profile-sidebar-nav {
    margin-top: 16px;
    border-top: 1px solid #f1f3f5;
    padding-top: 16px;
    text-align: left;
}

.profile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.profile-nav-item i {
    font-style: normal;
    font-size: 1.1rem;
    width: 24px;
}

.profile-badge {
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    background: #f0f4f8;
    color: var(--text-muted);
}

.profile-badge-active {
    background: #e1effe;
    color: #1a56db;
}

/* Main Content Styling */
.profile-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-header-tabs {
    background: white;
    padding: 4px 16px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.profile-tab-btn {
    padding: 14px 20px;
    border: none;
    background: none;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.profile-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.profile-section-card {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.02);
}

.profile-section-header {
    padding: 18px 24px;
    background: #fdfdfd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f3f5;
}

.profile-section-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
}

.profile-section-body {
    padding: 24px;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px 32px;
}

.profile-field-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    padding: 10px 0;
    border-bottom: 1px solid #f8fafc;
    align-items: center;
}

.profile-field-row:last-child {
    border-bottom: none;
}

.profile-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.profile-value {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
}

.profile-edit-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.profile-form-footer {
    grid-column: 1 / -1;
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* --- Absence & Vacation Styles --- */

.absence-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
    margin-top: 24px;
}

@media (max-width: 1000px) {
    .absence-layout { grid-template-columns: 1fr; }
}

.absence-main-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.absence-side-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 80px;
}

/* Quota Cards & Circular Progress */
.quota-container {
    background: white;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.quota-header {
    margin-bottom: 20px;
}

.quota-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

.quota-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.circular-progress-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    position: relative;
}

.circular-progress {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) 0deg, #f0f4f8 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
}

.circular-progress::before {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    background: white;
    border-radius: 50%;
}

.circular-progress-content {
    position: relative;
    text-align: center;
}

.circular-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.circular-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Stats Row for Absence */
.absence-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f3f5;
}

.stat-box {
    text-align: center;
    padding: 12px;
}

.stat-icon { font-size: 1.5rem; margin-bottom: 8px; display: block; }
.stat-value { font-size: 1.25rem; font-weight: 800; color: var(--primary); }
.stat-desc { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }

/* Calendar Widget */
.calendar-widget {
    background: white;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.calendar-day-name {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    padding-bottom: 12px;
    text-transform: uppercase;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: default;
    position: relative;
}

.calendar-day.today { background: var(--primary-light); color: var(--primary); }
.calendar-day.has-absence { background: #fee2e2; color: #991b1b; }
.calendar-day.weekend { color: #ef4444; }
.calendar-day.other-month { opacity: 0.1; }

/* Floating Action Button */
.fab-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    height: 64px;
    padding: 0 28px;
    border-radius: 32px;
    background: #0b2c6b;
    color: white;
    border: none;
    box-shadow: 0 10px 25px rgba(11, 44, 107, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-btn:hover { 
    transform: scale(1.08) translateY(-4px); 
    box-shadow: 0 16px 32px rgba(11, 44, 107, 0.5);
}

.btn-toggle-view {
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.7);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-toggle-view:hover {
    color: white;
}

.btn-toggle-view.active {
    background: white;
    color: #0b2c6b;
}

/* Absence Items in List */
.absence-card-item {
    background: white;
    padding: 16px 20px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.absence-card-item:hover { transform: translateX(4px); border-color: var(--primary-light); }

.absence-type-icon {
    width: 44px;
    height: 44px;
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.absence-info { flex: 1; }
.absence-title { font-weight: 700; color: var(--text-dark); margin-bottom: 2px; }
.absence-date { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }

.status-badge {
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.venter { background: #fef3c7; color: #92400e; }
.status-badge.godkjent { background: #dcfce7; color: #166534; }
.status-badge.avvist { background: #fee2e2; color: #991b1b; }

/* --- Admin Absence Dashboard Redesign --- */

.admin-absence-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: -24px; /* Move up against the header */
}

/* Header Tabs (Large count boxes) */
.admin-absence-header-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #f1f5f9;
    border-bottom: 2px solid var(--border-color);
}

.admin-absence-tab {
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border-right: 1px solid var(--border-color);
    background: rgba(255,255,255,0.5);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-absence-tab:last-child { border-right: none; }

.admin-absence-tab.active {
    background: white;
    box-shadow: inset 0 -4px 0 var(--primary);
}

.admin-absence-tab .tab-count {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    display: block;
}

.admin-absence-tab .tab-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    display: block;
}

.admin-absence-tab.active .tab-label { color: var(--primary); }

/* Search & Actions Bar */
.admin-absence-actions {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    gap: 16px;
}

.admin-search-wrap {
    flex: 1;
    position: relative;
    max-width: 400px;
}

.admin-search-wrap input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    font-size: 0.95rem;
    font-weight: 600;
}

.admin-search-wrap::before {
    content: "🔍";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

/* Absence Grid & Request Cards */
.absence-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
    padding: 0 24px 40px 24px;
}

@media (max-width: 600px) {
    .absence-admin-grid { grid-template-columns: 1fr; }
}

.absence-request-card {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.absence-request-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.request-card-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.request-user-pic {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e2e8f0;
    object-fit: cover;
}

.request-user-info { flex: 1; }
.request-user-name { font-weight: 800; font-size: 1.1rem; color: var(--text-dark); }
.request-user-id { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }

.request-card-body {
    padding: 24px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Stylized Date Blocks */
.date-display-box {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    width: 80px;
    text-align: center;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.date-box-month {
    background: #3b82f6;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 0;
    text-transform: uppercase;
}

.date-box-day {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
}

.date-box-weekday {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
    padding-bottom: 4px;
}

.request-arrow { font-size: 1.5rem; color: #cbd5e1; }

.request-details-center {
    flex: 1;
    text-align: center;
}

.request-duration { font-size: 0.9rem; font-weight: 700; color: var(--text-dark); }

.request-card-footer {
    padding: 16px 20px;
    background: white;
}

.btn-status-pending {
    background: #0ea5e9;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

/* Large Calendar Overlay */
.large-calendar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.large-calendar-header {
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary);
    color: white;
}

.large-calendar-grid-container {
    flex: 1;
    overflow: auto;
    padding: 32px;
}

.large-calendar-controls {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* --- Toast Notifications --- */
#toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 10000; display: flex; flex-direction: column; gap: 12px; }
.toast { background: white; border-radius: 12px; padding: 16px 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 12px; border-left: 4px solid #1a56db; transform: translateY(100%); opacity: 0; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-left-color: #ef4444; }
.toast.success { border-left-color: #10b981; }
.toast-icon { font-size: 1.25rem; }
.toast-message { font-weight: 700; color: #1e293b; }

.triple-calendar-grid { display: flex; gap: 32px; min-width: max-content; }

/* --- Mobile Responsive Optimizations --- */
@media (max-width: 768px) {
    /* Main Layout */
    .profile-container { grid-template-columns: 1fr; }
    
    /* Admin Absence Dashboard */
    .admin-absence-header-tabs { grid-template-columns: 1fr; }
    .admin-absence-tab { border-right: none; border-bottom: 1px solid var(--border-color); padding: 16px; }
    .admin-absence-actions { flex-direction: column; align-items: stretch; padding: 16px; }
    .admin-search-wrap { max-width: 100%; }
    .absence-admin-grid { padding: 0 16px 24px 16px; gap: 16px; }
    
    /* Request Cards */
    .request-card-body { flex-direction: column; gap: 16px; padding: 16px; }
    .request-arrow { transform: rotate(90deg); margin: 8px 0; }
    .date-display-box { width: 100%; max-width: 200px; margin: 0 auto; }
    .request-card-footer { padding: 16px; }
    .request-card-footer > div { flex-direction: column; gap: 12px !important; }
    .request-card-footer button { width: 100%; }
    
    /* Large Calendar Overlay */
    .large-calendar-header { flex-direction: column; align-items: stretch; padding: 16px; gap: 16px; }
    .large-calendar-header > div:first-child { flex-direction: column; align-items: stretch; gap: 16px; }
    .large-calendar-controls { justify-content: space-between; }
    .large-calendar-grid-container { padding: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .triple-calendar-grid { display: flex; gap: 24px; min-width: max-content; padding-bottom: 24px; }
    
    /* My Absence (Employee View) */
    .absence-layout { grid-template-columns: 1fr; }
    .quota-container { padding: 16px; }
    .calendar-widget { padding: 16px; }
    .absence-card-item { flex-direction: column; align-items: flex-start; gap: 12px; }
    .absence-card-item .status-badge { align-self: flex-start; }
    
    /* General UI Components */
    .fab-btn { bottom: 24px; right: 24px; height: 56px; padding: 0 20px; font-size: 1.5rem; }
    .fab-btn span:last-child { font-size: 0.9rem; }
    
    #toast-container { width: 90%; left: 5%; transform: none; bottom: 16px; }
    .toast { padding: 12px 16px; gap: 8px; border-radius: 8px; width: 100%; font-size: 0.9rem; }
    .toast-icon { font-size: 1.1rem; }
}
/* --- Profilbilde --- */
.profile-pic-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 20px auto;
    cursor: pointer;
}

.profile-pic-container {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.profile-pic-wrapper:hover .profile-pic-container {
    transform: scale(1.02);
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-initial {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
}

.camera-overlay {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    font-size: 1.2rem;
    color: var(--primary);
    transition: all 0.2s ease;
}

.profile-pic-wrapper:hover .camera-overlay {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

@media (max-width: 600px) {
    .profile-pic-wrapper {
        width: 120px;
        height: 120px;
    }
}

/* Header Profile Picture Styles */
.header-user-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-avatar-container {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 4px solid rgba(255,255,255,0.5);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.header-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-avatar-initial {
    color: white;
    font-weight: 800;
    font-size: 1rem;
}

#logged-in-user {
    padding: 6px 14px !important;
}

/* Felles avatar-stil for små sirkler i lister */
.mini-avatar {
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.05);
}

.mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* --- CHAT / SAKSLOGG --- */
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.chat-history {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    display: flex;
    gap: 12px;
    max-width: 85%;
}

.chat-bubble.own {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-bubble-content {
    background: white;
    padding: 12px 16px;
    border-radius: 16px;
    border-top-left-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    position: relative;
}

.chat-bubble.own .chat-bubble-content {
    background: var(--primary);
    color: white;
    border-top-left-radius: 16px;
    border-top-right-radius: 2px;
    border: none;
}

.chat-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: flex;
    gap: 8px;
}

.chat-bubble.own .chat-meta {
    color: rgba(255,255,255,0.7);
    justify-content: flex-end;
}

.chat-input-wrap {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.chat-input {
    flex: 1;
    border-radius: 99px;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--primary);
}

/* PERSONALHÅNDBOK (DRIFTSHÅNDBOK) STYLES */
.handbook-container {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 50px;
}

.handbook-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 50px 24px;
    background: linear-gradient(135deg, #0b2c6b 0%, #1a4fa8 100%);
    border-radius: 24px;
    color: white;
    box-shadow: 0 10px 40px rgba(11, 44, 107, 0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

.handbook-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.handbook-header .subtitle {
    margin-top: 12px;
    opacity: 1;
    font-size: 1.15rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.handbook-section {
    margin-bottom: 40px;
}

.handbook-section .section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 4px solid var(--primary-hover);
}

.handbook-card {
    margin-bottom: 16px;
    padding: 24px;
    transition: transform 0.2s;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.handbook-card h3 {
    margin-top: 0;
    font-size: 1.15rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.handbook-card h3::before {
    content: '•';
    color: var(--accent-color);
    font-size: 1.5rem;
}

.handbook-card p {
    line-height: 1.7;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.handbook-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.handbook-card ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.handbook-card ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.handbook-card strong {
    color: var(--text-main);
}

/* ═══════════════════════════════════════════════════════════
   NYHETER OG BESKJEDER
   ═══════════════════════════════════════════════════════════ */

/* ── Section header row ─────────────────────────────────── */
.nyheter-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* ── Upload button ──────────────────────────────────────── */
.btn-upload-news {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(11, 44, 107, 0.2);
}
.btn-upload-news:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 44, 107, 0.3);
}

/* ── Upload progress bar ─────────────────────────────────── */
.upload-progress-bar-wrap {
    margin: 12px 0;
    padding: 12px 16px;
    background: #f0f5ff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.upload-progress-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}
.upload-progress-track {
    background: #dce8ff;
    border-radius: 99px;
    height: 6px;
    overflow: hidden;
}
.upload-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), #4fc3f7);
    border-radius: 99px;
    transition: width 0.35s ease;
}

/* ── News docs list ──────────────────────────────────────── */
.news-docs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}
.news-doc-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #f8faff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    transition: all 0.2s;
}
.news-doc-row:hover {
    background: white;
    border-color: #a4b9db;
    box-shadow: 0 4px 14px rgba(11,44,107,0.07);
}
.news-doc-icon-wrap {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
}
.news-doc-info {
    flex: 1;
    min-width: 0;
}
.news-doc-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.news-doc-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.news-doc-desc {
    font-size: 0.82rem;
    color: var(--text-main);
    margin-top: 4px;
    line-height: 1.4;
    opacity: 0.8;
}
.news-doc-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   INTERN CHAT
   ═══════════════════════════════════════════════════════════ */

.chat-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: visible;
    min-height: 420px;
}
.chat-card .nyheter-section-header {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border-color);
}

/* ── Messages container ─────────────────────────────────── */
.chat-messages-wrap {
    flex: 1;
    min-height: 260px;
    max-height: 420px;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    scroll-behavior: smooth;
    background: #f8faff;
}
.chat-messages-wrap::-webkit-scrollbar { width: 4px; }
.chat-messages-wrap::-webkit-scrollbar-thumb { background: #d0ddf0; border-radius: 99px; }

/* ── Date divider ────────────────────────────────────────── */
.chat-date-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 6px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.chat-date-divider::before,
.chat-date-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* ── Single message row ─────────────────────────────────── */
.chat-msg {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 4px;
    animation: chatMsgIn 0.18s ease;
}
@keyframes chatMsgIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}
.chat-msg-mine  { flex-direction: row-reverse; }
.chat-msg-other { flex-direction: row; }

/* Highlight when current user is @mentioned */
.chat-msg-mentioned .chat-bubble {
    background: linear-gradient(135deg, #fff3e0, #fff8f0) !important;
    border: 1.5px solid #f4a636 !important;
    color: #7a4400 !important;
}
.chat-msg-mentioned .chat-bubble::before { content: '🔔 '; }

/* ── Avatar ─────────────────────────────────────────────── */
.chat-avatar {
    flex-shrink: 0;
    margin-bottom: 2px;
    align-self: flex-end;
}

/* ── Bubble wrapper ─────────────────────────────────────── */
.chat-bubble-wrap {
    display: flex;
    flex-direction: column;
    max-width: 78%;
    min-width: 0;
}
.chat-msg-mine  .chat-bubble-wrap { align-items: flex-end; }
.chat-msg-other .chat-bubble-wrap { align-items: flex-start; }

.chat-sender-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
    padding: 0 6px;
}

/* ── Bubble ─────────────────────────────────────────────── */
.chat-bubble {
    padding: 9px 14px;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.5;
    word-break: normal;
    overflow-wrap: break-word;
}
.chat-msg-mine .chat-bubble {
    background: linear-gradient(135deg, var(--primary) 0%, #1a56c4 100%);
    color: white;
    border-bottom-right-radius: 4px;
}
.chat-msg-other .chat-bubble {
    background: white;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

/* ── Timestamp ──────────────────────────────────────────── */
.chat-time {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
    padding: 0 6px;
}
.chat-time-right { text-align: right; }

/* ── @mention highlight ─────────────────────────────────── */
.chat-mention {
    background: rgba(255, 200, 80, 0.3);
    color: #7a4a00;
    font-weight: 700;
    border-radius: 4px;
    padding: 1px 5px;
    display: inline-block;
    white-space: nowrap;
    word-break: keep-all;
    vertical-align: middle;
    line-height: 1.4;
}
.chat-msg-mine .chat-bubble .chat-mention {
    background: rgba(255,255,255,0.25);
    color: #fff;
    font-weight: 800;
}

/* ── @mention hint label ─────────────────────────────────── */
.chat-mention-hint {
    background: #f0f4fb;
    color: var(--primary);
    font-weight: 700;
    border-radius: 5px;
    padding: 1px 5px;
    font-size: 0.8rem;
}

/* ── Document attachment in chat bubble ─────────────────── */
.chat-doc-attachment {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    margin-bottom: 6px;
    transition: background 0.2s;
}
.chat-msg-other .chat-doc-attachment {
    background: #e8effe;
    border-color: var(--border-color);
}
.chat-doc-attachment:hover { opacity: 0.85; }
.chat-doc-icon { font-size: 1.1rem; }
.chat-doc-name { font-size: 0.85rem; font-weight: 600; flex: 1; }
.chat-doc-dl   { font-size: 0.75rem; opacity: 0.75; white-space: nowrap; }

/* ── Bubble row (bubble + delete btn) ───────────────────── */
.chat-bubble-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.chat-msg-mine .chat-bubble-row { flex-direction: row-reverse; }

/* ── Admin delete button ─────────────────────────────────── */
.chat-delete-btn {
    opacity: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 5px;
    border-radius: 6px;
    color: #e53e3e;
    transition: opacity 0.15s, background 0.15s;
    flex-shrink: 0;
    align-self: center;
    line-height: 1;
}
.chat-msg:hover .chat-delete-btn {
    opacity: 1;
}
.chat-delete-btn:hover {
    background: #fff0f0;
}

/* ── Input area ─────────────────────────────────────────── */
.chat-input-area {
    position: relative;
    padding: 10px 14px 14px;
    border-top: 1px solid #e2e8f0;
    background: white;
    border-radius: 0 0 var(--panel-radius) var(--panel-radius);
}
.chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}
.chat-textarea {
    flex: 1;
    padding: 10px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 22px;
    font-family: inherit;
    font-size: 0.93rem;
    color: var(--text-main);
    background: #f8faff;
    resize: none;
    outline: none;
    min-height: 42px;
    max-height: 140px;
    line-height: 1.5;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.chat-textarea:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(11, 44, 107, 0.09);
}
.chat-textarea::placeholder { color: #a0aec0; }

/* ── Send button ────────────────────────────────────────── */
.btn-send {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #1a56c4);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(11, 44, 107, 0.28);
    transition: all 0.18s;
    flex-shrink: 0;
}
.btn-send:hover { transform: scale(1.09); box-shadow: 0 6px 18px rgba(11, 44, 107, 0.38); }
.btn-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.send-arrow { line-height: 1; }

/* ── @mention autocomplete dropdown ─────────────────────── */
.mention-dropdown {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 16px;
    right: 72px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 -8px 32px rgba(11, 44, 107, 0.14), 0 2px 8px rgba(0,0,0,0.06);
    z-index: 200;
    overflow: hidden;
    max-height: 240px;
    overflow-y: auto;
}
.mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f0f4fb;
}
.mention-item:last-child { border-bottom: none; }
.mention-item:hover { background: #f5f8ff; }
.mention-item-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.mention-item-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}
.mention-item-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── @alle spesial-rad ─────────────────────────────────── */
.mention-item-alle {
    background: #fff8ed;
    border-bottom: 1px solid #fde8c0 !important;
}
.mention-item-alle:hover { background: #fff0d6 !important; }
.mention-item-alle .mention-item-name {
    color: #b45309;
    font-size: 0.95rem;
}
.mention-item-alle .mention-item-role { color: #92400e; }
.mention-item-alle-icon {
    font-size: 1.2rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

/* ── Notification button ─────────────────────────────────── */
.btn-notif {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-notif:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f0f5ff;
}
.btn-notif.notif-active {
    background: linear-gradient(135deg, #e6f4ea, #d0ead6);
    border-color: #4caf50;
    color: #2e7d32;
}

/* ═══════════════════════════════════════════════════════
   BORTE I DAG
═══════════════════════════════════════════════════════ */
.borte-idag-card { padding: 20px 24px; }
.borte-idag-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.borte-idag-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
}
.borte-idag-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: #f1f5f9;
    border-radius: 20px;
    padding: 2px 10px;
    text-transform: capitalize;
}
.borte-idag-count {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    background: #e8eeff;
    border-radius: 20px;
    padding: 2px 10px;
}
.borte-idag-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 8px 0 4px;
}
.borte-idag-avatars {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.borte-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: default;
}
.borte-avatar-img,
.borte-avatar-initials,
.borte-avatar-overflow {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.borte-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1rem;
}
.borte-avatar-overflow {
    background: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
}
.borte-avatar-wrap:hover .borte-avatar-img,
.borte-avatar-wrap:hover .borte-avatar-initials,
.borte-avatar-wrap:hover .borte-avatar-overflow {
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}
.borte-avatar-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.borte-idag-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
}
.borte-idag-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 4px 0;
}
.borte-idag-name { font-weight: 600; color: var(--text-main); }
.borte-idag-type {
    font-size: 0.78rem;
    color: white;
    background: var(--primary);
    border-radius: 20px;
    padding: 2px 10px;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   LIVE KLOKKE I HEADER
═══════════════════════════════════════════════════════ */
.header-clock {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
    padding: 2px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.10);
    min-width: 90px;
    text-align: right;
}
.header-clock-time {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    font-variant-numeric: tabular-nums;
}
.header-clock-date {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255,255,255,0.70);
    text-transform: capitalize;
}

/* ─── KUN ADMIN-merke ─────────────────────────────────────────────────────── */
.kun-admin-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    padding: 1px 7px;
    border-radius: 20px;
    letter-spacing: 0.2px;
    white-space: nowrap;
    vertical-align: middle;
    margin-left: 5px;
    line-height: 1.6;
}
/* I mørkeblå nav-tab: hvit tekst med halvgjennomsiktig rød bakgrunn */
.nav-item .kun-admin-badge {
    color: #fff;
    background: rgba(185,28,28,0.65);
    border-color: rgba(255,255,255,0.25);
    font-size: 0.62rem;
    padding: 1px 6px;
}

/* ═══════════════════════════════════════════════════════
   FILE-ROW ALIGNMENT FIX
   Lange filnavn presser knappene ut av rad. Løses med
   min-width:0 på innholds-div og flex-shrink:0 på knapp-gruppe.
═══════════════════════════════════════════════════════ */
.file-row > div:nth-child(2) {
    min-width: 0;
    flex: 1;
}
.file-name {
    font-weight: 700 !important;
    color: var(--primary);
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.file-row .file-actions {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}
/* Fallback: last div in file-row = button group */
.file-row > div:last-child {
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVT DESIGN – TABLET & MOBIL
═══════════════════════════════════════════════════════ */

/* ── Tablet (≤ 768px) ── */
@media (max-width: 768px) {
    body {
        padding: 8px;
    }

    #app-container {
        max-width: 100%;
        gap: 10px;
    }

    /* Header */
    .header-top {
        padding: 14px 16px 10px;
        gap: 10px;
    }
    .header-text h1 {
        font-size: 1.1rem;
    }
    .header-text p {
        font-size: 0.8rem;
    }
    .header-logo {
        height: 36px;
    }
    .header-clock {
        min-width: 70px;
    }
    .header-clock-time {
        font-size: 0.9rem;
    }

    /* Nav */
    .main-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 8px;
        scrollbar-width: none;
    }
    .main-nav::-webkit-scrollbar { display: none; }
    .nav-item {
        padding: 12px 14px;
        font-size: 0.88rem;
        white-space: nowrap;
    }

    /* Cards */
    .card {
        padding: 16px;
    }
    .card-title {
        font-size: 1.1rem;
    }

    /* Home grid: 2 columns on tablet */
    .home-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .home-card {
        padding: 16px;
        gap: 12px;
    }
    .home-card-icon {
        font-size: 1.6rem;
        width: 36px;
    }
    .home-card-title {
        font-size: 0.95rem;
    }
    .home-card-desc {
        font-size: 0.8rem;
    }

    /* File rows */
    .file-row {
        padding: 12px 14px;
        gap: 10px;
    }
    .file-icon {
        font-size: 1.5rem;
        width: 36px;
    }

    /* Profile */
    .profile-container {
        grid-template-columns: 1fr;
    }
    .profile-sidebar {
        position: static;
    }

    /* Absence cards */
    .absence-card {
        padding: 14px;
    }

    /* Stats row */
    .stats-row {
        gap: 8px;
    }
    .stat-box {
        padding: 12px 8px;
    }
    .stat-number {
        font-size: 1.8rem;
    }

    /* Emp cards grid */
    .emp-cards-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Modals */
    .modal-box {
        padding: 24px 16px;
        width: 95vw;
        max-width: 95vw;
    }

    /* Buttons in a row */
    .btn-row {
        flex-wrap: wrap;
    }
}

/* ── Mobil (≤ 480px) ── */
@media (max-width: 480px) {
    body {
        padding: 6px;
    }

    /* Header: skjul subtitle på veldig smal skjerm */
    .header-text p {
        display: none;
    }
    .header-text h1 {
        font-size: 1rem;
    }
    .header-logo {
        height: 30px;
    }
    #logged-in-user {
        display: none; /* Vises i header-top, spar plass */
    }

    /* Home grid: 1 column on mobile */
    .home-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .home-card {
        padding: 14px 16px;
    }

    /* File rows: kompakt */
    .file-row {
        padding: 10px 12px;
        gap: 8px;
    }
    .file-icon {
        font-size: 1.3rem;
        width: 28px;
    }
    .file-name {
        font-size: 0.85rem;
    }
    .file-size {
        font-size: 0.72rem;
    }
    /* Knapper i file-row: kompakte men alltid synlige */
    .file-row .btn-primary,
    .file-row .btn-danger,
    .file-row button {
        padding: 6px 10px;
        font-size: 0.78rem;
        border-radius: 8px;
    }

    /* Cards */
    .card {
        padding: 14px 12px;
        border-radius: 14px;
    }

    /* Emp grid: 1 col on mobile */
    .emp-cards-grid {
        grid-template-columns: 1fr;
    }

    /* Chat: full-width input area */
    .chat-input-row {
        gap: 6px;
    }
    #chat-input {
        font-size: 0.9rem;
        padding: 10px 12px;
    }

    /* Top-tabs */
    .top-tabs {
        flex-direction: column;
        gap: 6px;
    }
    .tab-btn {
        padding: 10px;
        font-size: 0.9rem;
    }

    /* Emp tabs */
    .emp-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        scrollbar-width: none;
        padding-bottom: 2px;
    }
    .emp-tabs::-webkit-scrollbar { display: none; }
    .emp-tab-btn {
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 0.82rem;
    }

    /* Absence date display */
    .absence-date-range {
        flex-direction: column;
        gap: 4px;
    }

    /* Stat boxes */
    .stats-row {
        flex-direction: column;
    }
    .stat-box {
        min-width: unset;
        width: 100%;
    }

    /* Profile fields */
    .field-wrap {
        margin-bottom: 12px;
    }
    .styled-input, .styled-textarea {
        font-size: 0.93rem;
    }

    /* Buttons */
    .btn-primary, .btn-outline {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    /* Modal */
    .modal-box {
        padding: 20px 14px;
        border-radius: 16px;
    }

    /* Profile sidebar */
    .profile-avatar-container {
        width: 100px;
        height: 100px;
    }

    /* Mini-avatar i lister */
    .mini-avatar {
        width: 28px !important;
        height: 28px !important;
    }

    /* Page title */
    .page-title {
        font-size: 1.1rem;
    }
}
/* -------------------------------------------------------
   COOKIE BANNER
------------------------------------------------------- */
#cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(11, 44, 107, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 16px 24px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 99999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 90vw;
    width: 600px;
}
#cookie-banner.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
#cookie-banner.hide-anim {
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
}
.cookie-banner-text {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}
.cookie-banner-text p {
    margin: 0;
}
.cookie-banner-btn {
    background: linear-gradient(135deg, #4fc3f7, #0288d1);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 99px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(2, 136, 209, 0.3);
}
.cookie-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2, 136, 209, 0.4);
}
@media (max-width: 600px) {
    #cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        bottom: 16px;
        padding: 16px;
    }
}

/* Absence Admin Chat UI */
.absence-admin-chat-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--primary);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(11, 44, 107, 0.4);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.2s;
    border: none;
}
.absence-admin-chat-btn:hover {
    transform: scale(1.1);
}

.absence-admin-chat-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: white;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    z-index: 1001;
    display: none;
    flex-direction: column;
}
.absence-admin-chat-panel.open {
    display: flex;
}

.absence-chat-header {
    background: var(--primary);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.1rem;
}

.absence-chat-list {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
}

.absence-chat-input-area {
    padding: 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
}
.absence-chat-input-area input {
    flex: 1;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 99px;
    outline: none;
}
.absence-chat-input-area input:focus {
    border-color: var(--primary);
}
.absence-chat-input-area button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
. h o v e r - o p a c i t y : h o v e r  
   o p a c i t y :   0 . 8 ;    
 

/* ═══════════════════════════════════════════════════════════════════
   PREMIUM DESIGN UPGRADE v2  — CoreControl
   Alle regler nedenfor overstyrer eksisterende stiler
   ═══════════════════════════════════════════════════════════════════ */

/* ── Globale tokens ───────────────────────────────────────────────── */
:root {
  --cc-navy:       #0a2149;
  --cc-blue:       #1a4fa8;
  --cc-accent:     #3b82f6;
  --cc-accent2:    #6366f1;
  --cc-bg:         #f0f4fb;
  --cc-surface:    #ffffff;
  --cc-border:     #dde6f3;
  --cc-text:       #0f1f3d;
  --cc-muted:      #6278a0;
  --cc-radius:     18px;
  --cc-shadow:     0 4px 24px rgba(10,33,73,.08);
  --cc-shadow-lg:  0 12px 40px rgba(10,33,73,.14);
}

/* ── Body & layout ────────────────────────────────────────────────── */
body {
  background: var(--cc-bg) !important;
  padding: 0 !important;
  min-height: 100vh;
}

/* Animated mesh background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 10% 10%, rgba(59,130,246,.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 90% 80%, rgba(99,102,241,.09) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(26,79,168,.04) 0%, transparent 70%),
    #eef3fb;
  pointer-events: none;
}

/* ── app-container: no global padding ────────────────────────────── */
#app-container {
  max-width: 860px !important;
  padding: 0 16px 32px !important;
  gap: 20px !important;
}

/* ── Header ────────────────────────────────────────────────────────── */
.main-header {
  background: linear-gradient(135deg, var(--cc-navy) 0%, #163f8f 50%, #1a4fa8 100%) !important;
  border-radius: 0 0 var(--cc-radius) var(--cc-radius) !important;
  box-shadow: 0 8px 32px rgba(10,33,73,.25), 0 1px 0 rgba(255,255,255,.06) !important;
  margin-bottom: 0 !important;
  position: relative;
  overflow: hidden;
}

/* Shimmer stripe on header */
.main-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
    transparent 30%,
    rgba(255,255,255,.05) 45%,
    rgba(255,255,255,.10) 50%,
    rgba(255,255,255,.05) 55%,
    transparent 70%);
  animation: headerShimmer 8s infinite linear;
  pointer-events: none;
}
@keyframes headerShimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Subtle dots pattern */
.main-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

.header-top {
  padding: 20px 24px 14px !important;
  position: relative;
  z-index: 1;
}

/* ── Logo i topbar ─────────────────────────────────────────────────── */
.header-text img {
  filter: brightness(1) drop-shadow(0 2px 8px rgba(0,0,0,.3)) !important;
  transition: transform .3s ease;
}
.header-text img:hover { transform: scale(1.03); }

/* ── Navigation ───────────────────────────────────────────────────── */
.main-nav {
  background: rgba(0,0,0,.18) !important;
  padding: 6px 16px !important;
  gap: 4px !important;
  position: relative;
  z-index: 1;
}

.nav-item {
  color: rgba(255,255,255,.65) !important;
  padding: 10px 22px !important;
  border-radius: 10px !important;
  border-bottom: none !important;
  font-size: .9rem !important;
  transition: all .2s ease !important;
  position: relative;
}
.nav-item:hover {
  color: white !important;
  background: rgba(255,255,255,.10) !important;
}
.nav-item.active {
  color: white !important;
  background: rgba(255,255,255,.15) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.2) !important;
  border-bottom: none !important;
}
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 2px;
  background: white;
  border-radius: 2px 2px 0 0;
}

/* Header clock */
.header-clock {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  color: rgba(255,255,255,.85) !important;
  font-size: .75rem !important;
  margin-left: auto !important;
  letter-spacing: .02em;
}
.header-clock-time {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: white !important;
  line-height: 1.2;
}
.header-clock-date { opacity: .75; font-size: .72rem !important; }

/* ── Back-bar ─────────────────────────────────────────────────────── */
.back-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--cc-surface);
  border-radius: var(--cc-radius);
  box-shadow: var(--cc-shadow);
  border: 1px solid var(--cc-border);
  margin-bottom: 4px;
}
.btn-back {
  background: linear-gradient(135deg, var(--cc-navy), var(--cc-blue));
  color: white;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: 0 2px 8px rgba(10,33,73,.2);
}
.btn-back:hover {
  transform: translateX(-2px);
  box-shadow: 0 4px 14px rgba(10,33,73,.3);
}
.page-title {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: var(--cc-text) !important;
}

/* ── Cards ────────────────────────────────────────────────────────── */
.card {
  background: var(--cc-surface) !important;
  border-radius: var(--cc-radius) !important;
  border: 1px solid var(--cc-border) !important;
  box-shadow: var(--cc-shadow) !important;
  transition: box-shadow .25s ease, transform .25s ease !important;
}
.card:hover {
  box-shadow: var(--cc-shadow-lg) !important;
  transform: translateY(-1px);
}

/* ── Home Grid ────────────────────────────────────────────────────── */
.home-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 16px !important;
}

.home-card {
  background: var(--cc-surface) !important;
  border: 1px solid var(--cc-border) !important;
  border-radius: var(--cc-radius) !important;
  padding: 20px 22px !important;
  gap: 16px !important;
  box-shadow: var(--cc-shadow) !important;
  transition: all .22s cubic-bezier(.25,.8,.25,1) !important;
  position: relative;
  overflow: hidden;
}
.home-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cc-blue), var(--cc-accent2));
  opacity: 0;
  transition: opacity .22s ease;
}
.home-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 16px 40px rgba(10,33,73,.14) !important;
  border-color: var(--cc-accent) !important;
}
.home-card:hover::before { opacity: 1; }
.home-card:active { transform: scale(.98) !important; }

/* Icon container with gradient pill */
.home-card-icon {
  font-size: 1.6rem !important;
  width: 52px !important;
  height: 52px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #eef3fb, #dde6f3) !important;
  border-radius: 14px !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(10,33,73,.08) !important;
  transition: transform .22s ease, box-shadow .22s ease !important;
}
.home-card:hover .home-card-icon {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 4px 16px rgba(10,33,73,.15) !important;
}

.home-card-title {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: var(--cc-text) !important;
  margin-bottom: 3px !important;
}
.home-card-desc {
  color: var(--cc-muted) !important;
  font-size: .83rem !important;
}
.home-card-badge {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  border-radius: 10px !important;
  font-size: .72rem !important;
  padding: 3px 10px !important;
  box-shadow: 0 2px 8px rgba(239,68,68,.3) !important;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--cc-navy), var(--cc-blue)) !important;
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 14px rgba(10,33,73,.25) !important;
  letter-spacing: .02em;
  transition: all .2s ease !important;
}
.btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(10,33,73,.35) !important;
  background: linear-gradient(135deg, #0d2860, var(--cc-blue)) !important;
}

.btn-success {
  background: linear-gradient(135deg, #065f46, #059669) !important;
  box-shadow: 0 4px 14px rgba(5,150,105,.25) !important;
  border-radius: 12px !important;
  transition: all .2s ease !important;
}
.btn-success:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(5,150,105,.35) !important;
}

/* ── Inputs ─────────────────────────────────────────────────────── */
.styled-input, .styled-textarea, select.styled-input {
  background: #f8faff !important;
  border: 1.5px solid var(--cc-border) !important;
  border-radius: 10px !important;
  transition: all .2s ease !important;
}
.styled-input:focus, .styled-textarea:focus, select.styled-input:focus {
  border-color: var(--cc-accent) !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12) !important;
  background: #fff !important;
}

/* ── Tab buttons ────────────────────────────────────────────────── */
.tab-btn {
  border-radius: 12px !important;
  font-size: .9rem !important;
  border: 1.5px solid var(--cc-border) !important;
  background: #f8faff !important;
}
.tab-btn.active {
  background: linear-gradient(135deg, var(--cc-navy), var(--cc-blue)) !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(10,33,73,.25) !important;
}

/* ── Employee cards ─────────────────────────────────────────────── */
.employee-card {
  border-radius: var(--cc-radius) !important;
  border: 1px solid var(--cc-border) !important;
  box-shadow: var(--cc-shadow) !important;
  transition: box-shadow .2s, transform .2s !important;
}
.employee-card:hover {
  box-shadow: var(--cc-shadow-lg) !important;
  transform: translateY(-2px);
}
.employee-header { background: #f8faff !important; }
.employee-header:hover { background: #eff4ff !important; }

/* ── User rows ─────────────────────────────────────────────────── */
.user-row {
  border-radius: 12px !important;
  border: 1px solid var(--cc-border) !important;
  margin-bottom: 8px !important;
  box-shadow: 0 2px 8px rgba(10,33,73,.04) !important;
  transition: all .2s !important;
}
.user-row:hover {
  box-shadow: 0 4px 16px rgba(10,33,73,.09) !important;
  border-color: var(--cc-accent) !important;
}

/* ── Chips ──────────────────────────────────────────────────────── */
.chip {
  border-radius: 10px !important;
  border: 1.5px solid var(--cc-border) !important;
  transition: all .2s !important;
}
.chip.active {
  background: linear-gradient(135deg, var(--cc-navy), var(--cc-blue)) !important;
  border-color: transparent !important;
  box-shadow: 0 3px 10px rgba(10,33,73,.2) !important;
}

/* ── Page entry animation ────────────────────────────────────────── */
.page.active {
  animation: pageIn .28s cubic-bezier(.25,.8,.25,1) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Logout button ──────────────────────────────────────────────── */
.btn-logout {
  background: rgba(255,255,255,.12) !important;
  border: 1px solid rgba(255,255,255,.3) !important;
  backdrop-filter: blur(4px);
  border-radius: 10px !important;
  transition: all .2s !important;
}
.btn-logout:hover {
  background: rgba(255,255,255,.22) !important;
  border-color: rgba(255,255,255,.6) !important;
  transform: translateY(-1px);
}

/* ── User pill ──────────────────────────────────────────────────── */
#logged-in-user {
  background: rgba(255,255,255,.15) !important;
  border-radius: 20px !important;
  padding: 4px 12px !important;
  font-size: .82rem !important;
  letter-spacing: .01em;
  border: 1px solid rgba(255,255,255,.2);
}

/* ── Scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(10,33,73,.18); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(10,33,73,.32); }

/* ── Section titles ────────────────────────────────────────────── */
.card-title {
  font-size: 1.1rem !important;
  font-weight: 800 !important;
  color: var(--cc-text) !important;
}
.section-title {
  color: var(--cc-muted) !important;
  font-size: .8rem !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  font-weight: 700 !important;
}

/* ── Responsivitet ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .home-grid { grid-template-columns: 1fr !important; }
  .home-card-icon { width: 44px !important; height: 44px !important; font-size: 1.4rem !important; }
  #app-container { padding: 0 10px 24px !important; }
}



/* ═══ SYNLIGHETSFIKS — header mørk + hvit tekst ═══════════════════ */

/* Tving mørk header uansett spesifisitet */
header.main-header,
.main-header {
  background: linear-gradient(135deg, #0a2149 0%, #163f8f 55%, #1a4fa8 100%) !important;
  box-shadow: 0 8px 32px rgba(10,33,73,.35) !important;
}

/* Nav-stripe — mørk bakgrunn */
header.main-header .main-nav,
.main-header .main-nav {
  background: rgba(0,0,0,.22) !important;
}

/* Alle nav-knapper — hvit tekst */
header.main-header .nav-item,
.main-header .nav-item {
  color: rgba(255,255,255,.72) !important;
}
header.main-header .nav-item:hover,
.main-header .nav-item:hover {
  color: #ffffff !important;
  background: rgba(255,255,255,.12) !important;
}
header.main-header .nav-item.active,
.main-header .nav-item.active {
  color: #ffffff !important;
  background: rgba(255,255,255,.18) !important;
}

/* Brukerinfo-tekst — hvit */
#logged-in-user,
.main-header #logged-in-user {
  color: #ffffff !important;
  background: rgba(255,255,255,.16) !important;
  border: 1px solid rgba(255,255,255,.25) !important;
}

/* "Logg ut"-knapp — hvit tekst synlig */
.btn-logout,
.main-header .btn-logout {
  color: #ffffff !important;
  border-color: rgba(255,255,255,.45) !important;
  background: rgba(255,255,255,.12) !important;
  font-weight: 700 !important;
}
.btn-logout:hover {
  background: rgba(255,255,255,.24) !important;
  border-color: rgba(255,255,255,.7) !important;
}

/* Klokke — hvit */
.header-clock,
.header-clock-time,
.header-clock-date {
  color: rgba(255,255,255,.9) !important;
}
.header-clock-time { color: #ffffff !important; }



/* ════════════════════════════════════════════════════════════════════
   CORECRAFT BRAND THEME  — farger fra logo (#29b6f6 + mørk navy)
   Nullstiller alle tidligere premium-overrides og setter ny palette
   ════════════════════════════════════════════════════════════════════ */

:root {
  --cc2-cyan:       #29b6f6;      /* logo cc-boks og "Control" */
  --cc2-cyan-dk:    #0288d1;      /* mørkere hover */
  --cc2-cyan-lt:    #e1f5fe;      /* lys bakgrunn-aksent */
  --cc2-navy:       #0d1b2a;      /* header topp */
  --cc2-navy2:      #112240;      /* header bunn */
  --cc2-bg:         #f4f8ff;      /* sidebackgrunn */
  --cc2-card:       #ffffff;
  --cc2-border:     #d6e6f7;
  --cc2-text:       #0d1b2a;
  --cc2-muted:      #5b7a9e;
  --cc2-radius:     18px;
  --cc2-shadow:     0 4px 20px rgba(13,27,42,.07);
  --cc2-shadow-lg:  0 12px 36px rgba(13,27,42,.13);
}

/* ── Body & bakgrunn ─────────────────────────────────────────────── */
body {
  background: var(--cc2-bg) !important;
  padding: 0 !important;
}
body::before {
  background:
    radial-gradient(ellipse 70% 50% at 15% 5%, rgba(41,182,246,.09) 0%, transparent 55%),
    radial-gradient(ellipse 50% 70% at 85% 90%, rgba(2,136,209,.07) 0%, transparent 55%),
    var(--cc2-bg) !important;
}

/* ── Header ──────────────────────────────────────────────────────── */
header.main-header,
.main-header {
  background: linear-gradient(140deg, var(--cc2-navy) 0%, var(--cc2-navy2) 60%, #1a3a5c 100%) !important;
  border-radius: 0 0 22px 22px !important;
  box-shadow: 0 8px 32px rgba(13,27,42,.35), 0 1px 0 rgba(41,182,246,.15) !important;
  margin-bottom: 0 !important;
  position: relative;
  overflow: hidden;
}

/* Cyan glow-linje øverst */
header.main-header::before,
.main-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--cc2-cyan) 30%, #81d4fa 60%, transparent 100%);
  animation: none;
}

/* Subtle dot-pattern */
header.main-header::after,
.main-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(41,182,246,.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* ── Nav ─────────────────────────────────────────────────────────── */
header.main-header .main-nav,
.main-header .main-nav {
  background: rgba(0,0,0,.25) !important;
  padding: 6px 14px !important;
  gap: 4px !important;
  position: relative; z-index: 1;
}
header.main-header .nav-item,
.main-header .nav-item {
  color: rgba(255,255,255,.65) !important;
  border-bottom: none !important;
  border-radius: 10px !important;
  padding: 9px 20px !important;
  transition: all .2s !important;
}
header.main-header .nav-item:hover,
.main-header .nav-item:hover {
  color: #ffffff !important;
  background: rgba(41,182,246,.15) !important;
}
header.main-header .nav-item.active,
.main-header .nav-item.active {
  color: var(--cc2-cyan) !important;
  background: rgba(41,182,246,.12) !important;
  box-shadow: 0 0 0 1px rgba(41,182,246,.3) !important;
  border-bottom: none !important;
}

/* ── User / Logg ut ──────────────────────────────────────────────── */
#logged-in-user,
.main-header #logged-in-user {
  color: #fff !important;
  background: rgba(41,182,246,.18) !important;
  border: 1px solid rgba(41,182,246,.35) !important;
  border-radius: 20px !important;
  padding: 4px 12px !important;
  font-size: .82rem !important;
}
.btn-logout,
.main-header .btn-logout {
  color: #fff !important;
  background: rgba(41,182,246,.14) !important;
  border: 1px solid rgba(41,182,246,.4) !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  transition: all .2s !important;
}
.btn-logout:hover {
  background: rgba(41,182,246,.28) !important;
  border-color: var(--cc2-cyan) !important;
  box-shadow: 0 0 12px rgba(41,182,246,.3) !important;
}

/* ── Klokke ─────────────────────────────────────────────────────── */
.header-clock { color: rgba(255,255,255,.8) !important; }
.header-clock-time { color: #fff !important; font-weight: 700 !important; }
.header-clock-date { color: rgba(255,255,255,.6) !important; }

/* ── Logo-wrapper i header ────────────────────────────────────────── */
.header-top { position: relative; z-index: 1; }

/* ── Home-kort ────────────────────────────────────────────────────── */
.home-card {
  border-radius: var(--cc2-radius) !important;
  border: 1px solid var(--cc2-border) !important;
  box-shadow: var(--cc2-shadow) !important;
  transition: all .22s cubic-bezier(.25,.8,.25,1) !important;
  position: relative; overflow: hidden;
}
.home-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--cc2-cyan), #81d4fa);
  opacity: 0; transition: opacity .22s;
}
.home-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 16px 40px rgba(13,27,42,.12) !important;
  border-color: var(--cc2-cyan) !important;
}
.home-card:hover::before { opacity: 1; }

.home-card-icon {
  background: linear-gradient(135deg, var(--cc2-cyan-lt), #b3e5fc) !important;
  border-radius: 14px !important;
  width: 52px !important; height: 52px !important;
  display: flex !important; align-items: center !important;
  justify-content: center !important; font-size: 1.6rem !important;
  flex-shrink: 0 !important;
  box-shadow: 0 3px 10px rgba(41,182,246,.18) !important;
  transition: transform .22s, box-shadow .22s !important;
}
.home-card:hover .home-card-icon {
  transform: scale(1.1) rotate(-4deg);
  box-shadow: 0 6px 18px rgba(41,182,246,.28) !important;
}
.home-card-title { color: var(--cc2-text) !important; font-weight: 700 !important; }
.home-card-desc  { color: var(--cc2-muted) !important; font-size: .83rem !important; }

/* ── Knapper ─────────────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--cc2-cyan-dk), var(--cc2-cyan)) !important;
  border: none !important; border-radius: 12px !important;
  box-shadow: 0 4px 16px rgba(41,182,246,.3) !important;
  color: #fff !important;
  transition: all .2s !important;
}
.btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 28px rgba(41,182,246,.45) !important;
}

/* ── Tab-knapper ──────────────────────────────────────────────────── */
.tab-btn { border-radius: 12px !important; border: 1.5px solid var(--cc2-border) !important; background: #f8fbff !important; }
.tab-btn.active {
  background: linear-gradient(135deg, var(--cc2-cyan-dk), var(--cc2-cyan)) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(41,182,246,.3) !important;
}

/* ── Chips ────────────────────────────────────────────────────────── */
.chip.active {
  background: linear-gradient(135deg, var(--cc2-cyan-dk), var(--cc2-cyan)) !important;
  border-color: transparent !important; color: #fff !important;
  box-shadow: 0 3px 10px rgba(41,182,246,.25) !important;
}

/* ── Cards generelt ──────────────────────────────────────────────── */
.card {
  background: var(--cc2-card) !important;
  border-radius: var(--cc2-radius) !important;
  border: 1px solid var(--cc2-border) !important;
  box-shadow: var(--cc2-shadow) !important;
}
.card:hover { box-shadow: var(--cc2-shadow-lg) !important; transform: translateY(-1px); }

/* ── Input-focus ─────────────────────────────────────────────────── */
.styled-input:focus, .styled-textarea:focus, select.styled-input:focus {
  border-color: var(--cc2-cyan) !important;
  box-shadow: 0 0 0 3px rgba(41,182,246,.15) !important;
}

/* ── Tilbake-knapp ────────────────────────────────────────────────── */
.btn-back {
  background: linear-gradient(135deg, var(--cc2-navy), var(--cc2-navy2)) !important;
  color: #fff !important; border: 1px solid rgba(41,182,246,.3) !important;
  border-radius: 10px !important; padding: 8px 16px !important;
  font-weight: 700 !important; font-size: .85rem !important;
  transition: all .2s !important;
}
.btn-back:hover {
  border-color: var(--cc2-cyan) !important;
  box-shadow: 0 0 12px rgba(41,182,246,.25) !important;
}

/* ── Back-bar wrapper ─────────────────────────────────────────────── */
.back-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  background: var(--cc2-card);
  border-radius: var(--cc2-radius);
  border: 1px solid var(--cc2-border);
  box-shadow: var(--cc2-shadow);
  margin-bottom: 4px;
}

