:root {
    --brand:       #6b121e;
    --brand-dark:  #4a0d15;
    --brand-light: #8b1e2e;
    --navy:        #1e293b;
    --bg:          #f8fafc;
    --bg2:         #f1f5f9;
    --text:        #1e293b;
    --text-muted:  #64748b;
    --border:      #e2e8f0;
    --white:       #ffffff;
    --radius:      12px;
    --radius-lg:   20px;
    --shadow:      0 4px 20px rgba(0,0,0,0.07);
    --shadow-lg:   0 10px 40px rgba(0,0,0,0.12);
    --transition:  all 0.25s ease;
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* NAV */
.top-bar {
    background: var(--navy);
    height: 68px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
    border-bottom: 3px solid var(--brand);
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-img { height: 40px; }

.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.3px;
}

.brand-text span { color: #94a3b8; }

.nav-links {
    list-style: none;
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-btn {
    background: transparent;
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
}

.nav-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-color: rgba(255,255,255,0.3);
}

.nav-btn.active {
    background: var(--brand);
    color: white;
    border-color: var(--brand);
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 1.4rem;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
}

/* INNHOLD */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
    width: 100%;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.action-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand);
}

.card-icon {
    width: 52px;
    height: 52px;
    background: #fff1f2;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.card-body h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.card-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
}

.btn-main {
    background: var(--brand);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-block;
    transition: var(--transition);
    font-family: inherit;
}

.btn-main:hover {
    background: var(--brand-light);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--brand);
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    border: 2px solid var(--brand);
    cursor: pointer;
    display: inline-block;
    transition: var(--transition);
    font-family: inherit;
}

.btn-secondary:hover { background: #fff1f2; }

/* LOGIN (beholdt for evt. senere bruk) */
.auth-card {
    background: var(--white);
    padding: 48px;
    border-radius: var(--radius-lg);
    max-width: 420px;
    margin: 40px auto;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.auth-card h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.auth-card p { color: var(--text-muted); margin-bottom: 28px; font-size: 0.95rem; }

.auth-card input {
    width: 100%;
    padding: 14px;
    margin-bottom: 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1.4rem;
    text-align: center;
    font-family: inherit;
    letter-spacing: 6px;
    transition: var(--transition);
}

.auth-card input:focus { outline: none; border-color: var(--brand); }

.hidden { display: none !important; }

/* KLASSEKORT (FORSIDE) */
.klasse-kort {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.klasse-kort:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand);
}

.klasse-header {
    background: var(--brand);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 20px;
    text-align: center;
    letter-spacing: -0.5px;
}

.klasse-body {
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.klasse-icon {
    font-size: 3.5rem;
}

.klasse-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.klasse-link-btn {
    background: #fff1f2;
    color: var(--brand);
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid #fecdd3;
    transition: var(--transition);
}

.klasse-link-btn:hover {
    background: var(--brand);
    color: white;
    border-color: var(--brand);
}

/* MOBIL */
@media (max-width: 768px) {
    .menu-toggle { display: block; }

    .nav-links {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        width: 100%;
        background: var(--navy);
        flex-direction: column;
        padding: 16px;
        gap: 8px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.2);
        border-top: 2px solid var(--brand);
    }

    .nav-links.show { display: flex; }
    .nav-btn { width: 100%; text-align: center; }

    .card-grid { grid-template-columns: 1fr; }
    .action-card { flex-direction: column; }
    .auth-card { padding: 32px 24px; }
}