/* =========================================
  GLOBALT OPPSETT & FONTER
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

html, body {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* VIKTIG: Tvinger Poppins på alle skjema-elementer */
input, button, select, textarea {
    font-family: 'Poppins', sans-serif;
}

/* VIKTIG: Sikrer at alle bilder skalerer ned på mobil */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* En felles container på sider som ikke har egen layout */
.container {
    max-width: 1200px;
    margin: 90px auto 80px auto;
    padding: 0 16px;
}

/* =========================================
  NAVBAR
========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(6px);
    padding: 0.8rem 1.5rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
    color: #00b7ff;
    text-decoration: none;
    text-shadow: 0 0 6px rgba(0, 183, 255, 0.5);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center; /* Sikrer at knappen liner opp med linker */
}

    .nav-links a {
        color: #ccc;
        text-decoration: none;
        font-size: 1rem;
        transition: color 0.3s;
    }

        .nav-links a:hover {
            color: #fff;
        }

/* STYLING FOR LOGG UT KNAPP (Flyttet fra NavMenu.razor) */
.nav-btn-logout {
    background: none;
    border: none;
    color: #ccc;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: color 0.3s;
}

    .nav-btn-logout:hover {
        color: #fff;
    }

/* =========================================
  HAMBURGER-MENY
========================================= */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

    .hamburger span {
        display: block;
        height: 3px;
        background: #fff;
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    .hamburger.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.open span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.open span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

/* =========================================
  MOBILVISNING NAV
========================================= */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 65px;
        left: 0;
        flex-direction: column;
        align-items: center;
        width: 100%;
        background: rgba(15, 15, 15, 0.97);
        transform: translateY(-200%);
        transition: transform 0.4s ease;
        padding: 1rem 0;
        gap: 1rem;
    }

        .nav-links.active {
            transform: translateY(0);
        }

        .nav-links a {
            font-size: 1.2rem;
            color: #eee;
        }

            .nav-links a:hover {
                color: #00b7ff;
            }

    /* Mobiljustering for logg ut knapp */
    .nav-btn-logout {
        font-size: 1.2rem;
        color: #eee;
        padding: 0;
        display: block;
        width: 100%;
        text-align: center;
    }

        .nav-btn-logout:hover {
            color: #00b7ff;
        }
}

/* =========================================
  MAIN-INNHOLD
========================================= */
main {
    margin-top: 90px;
    min-height: calc(100vh - 130px);
    text-align: center;
    padding: 20px 16px 80px 16px;
}

/* =========================================
  FOOTER
========================================= */
footer {
    background: #111;
    color: #ccc;
    text-align: center;
    padding: 15px;
    position: fixed;
    bottom: 0;
    width: 100%;
    font-size: 0.9rem;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.6);
}

.footer-links a {
    color: #00b7ff;
    text-decoration: none;
}

    .footer-links a:hover {
        text-decoration: underline;
    }

/* =========================================
  BILDER PÅ HOVEDSIDE
========================================= */
.image-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
}

    .image-row img, img.img-fluid {
        max-width: 250px;
        width: 100%;
        height: auto;
        border-radius: 8px;
        object-fit: contain;
        box-shadow: 0 0 10px rgba(0, 183, 255, 0.3);
        transition: transform 0.3s ease;
    }

        .image-row img:hover {
            transform: scale(1.05);
        }

.small-top-images {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

    .small-top-images img {
        max-width: 260px;
        width: 100%;
        height: auto;
        border-radius: 8px;
        object-fit: contain;
        box-shadow: 0 0 10px rgba(0, 183, 255, 0.3);
        transition: transform 0.3s ease;
    }

        .small-top-images img:hover {
            transform: scale(1.03);
        }

@media (max-width: 768px) {
    .small-top-images img {
        max-width: 80%;
    }
}

/* =========================================
  CREWOVERSIKT
========================================= */
.crew-section {
    margin: 0 auto;
    padding: 30px 20px 100px 20px;
    max-width: 1200px;
    text-align: center;
}

.page-title {
    color: #00b7ff;
    font-size: 2.2rem;
    margin-bottom: 30px;
    text-shadow: 0 0 8px rgba(0, 183, 255, 0.5);
}

.crew-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.crew-card {
    background: #111;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 183, 255, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .crew-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 0 18px rgba(0, 183, 255, 0.4);
    }

    .crew-card img {
        display: block;
        width: 100%;
        height: 180px;
        object-fit: cover;
    }

    .crew-card h3 {
        color: #00b7ff;
        margin: 15px 0 10px 0;
        font-weight: 600;
    }

.crew-btn {
    display: inline-block;
    margin-bottom: 15px;
    padding: 8px 16px;
    background: #00b7ff;
    color: #000;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s ease;
}

    .crew-btn:hover {
        background: #008ecc;
    }

/* =========================================
  POLICY-SIDER
========================================= */
.policy-container {
    max-width: 900px;
    margin: 100px auto;
    padding: 30px;
    background: #111;
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(0, 183, 255, 0.2);
    text-align: left;
    line-height: 1.7;
}

    .policy-container h1, .policy-container h2 {
        color: #00b7ff;
    }

    .policy-container a {
        color: #00b7ff;
        text-decoration: underline;
    }

/* =========================================
  COOKIE-BANNER
========================================= */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.95);
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 183, 255, 0.3);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 2000;
    max-width: 90%;
    text-align: center;
    font-size: 0.95rem;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.btn-accept, .btn-decline {
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.btn-accept {
    background: #00b7ff;
    color: #000;
}

.btn-decline {
    background: #444;
    color: #fff;
}

.btn-accept:hover {
    background: #0096d1;
}

.btn-decline:hover {
    background: #666;
}

/* =========================================
  LYKKEHJUL – FELLES STYLING
========================================= */
.lykkehjul-page {
    max-width: 1100px;
    margin: 0 auto 80px auto;
    padding: 20px 16px;
}

    .lykkehjul-page h1 {
        font-size: 2rem;
        margin-bottom: 10px;
    }

.lykkehjul-muted {
    opacity: 0.85;
    max-width: 800px;
    margin: 0 auto 20px auto;
}

.lykkehjul-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 20px 0 30px 0;
}

.lykkehjul-card-link {
    text-decoration: none;
    color: inherit;
}

.lykkehjul-card {
    background: radial-gradient(circle at top, #1a2236 0, #050713 55%, #000 100%);
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border: 1px solid rgba(0, 183, 255, 0.28);
}

    .lykkehjul-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 24px 60px rgba(0, 183, 255, 0.45);
        border-color: rgba(0, 183, 255, 0.65);
    }

    .lykkehjul-card h3 {
        margin-top: 0;
        margin-bottom: 6px;
        color: #00b7ff;
    }

.lykkehjul-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.lykkehjul-kpi-card {
    background: #111;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 183, 255, 0.15);
}

.lykkehjul-kpi-number {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 4px 0 2px 0;
}

.lykkehjul-kpi-sub {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0 0 8px 0;
}

.lykkehjul-stat-list {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    text-align: left;
    font-size: 0.95rem;
}

.lykkehjul-stat-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.lykkehjul-badge-soft {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.08);
}

.lykkehjul-badge-ok {
    color: #4ade80;
}

.lykkehjul-badge-err {
    color: #f87171;
}

.lykkehjul-btn-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    justify-content: center;
}

.lykkehjul-pill-btn {
    display: inline-block;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

    .lykkehjul-pill-btn:hover {
        background: rgba(0, 183, 255, 0.18);
        border-color: rgba(0, 183, 255, 0.6);
        transform: translateY(-1px);
    }

/* Lokal logg */
.lykkehjul-log-card {
    background: #111;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 183, 255, 0.15);
    margin-top: 20px;
    text-align: left;
}

    .lykkehjul-log-card h3 {
        margin-top: 0;
        margin-bottom: 8px;
        color: #00b7ff;
    }

.lykkehjul-log-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    font-size: 0.95rem;
}

    .lykkehjul-log-list li {
        margin: 3px 0;
        opacity: 0.9;
    }

/* =========================================
  LYKKEHJUL – ADMIN / MANAGE
========================================= */
.lykkehjul-manage-container {
    max-width: 900px;
    margin: 0 auto 80px auto;
    padding: 20px 16px;
}

.lykkehjul-linkbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 6px 0 12px 0;
}

.lykkehjul-link-btn {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    background: #111;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

    .lykkehjul-link-btn:hover {
        background: rgba(0, 183, 255, 0.2);
        border-color: rgba(0, 183, 255, 0.7);
        transform: translateY(-1px);
    }

.lykkehjul-manage-card {
    background: #111;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 183, 255, 0.2);
}

.lykkehjul-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

    .lykkehjul-row > * {
        min-width: 160px;
    }

.lykkehjul-input {
    flex: 1 1 280px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #000;
    color: #fff;
}

    .lykkehjul-input::placeholder {
        color: rgba(255, 255, 255, 0.45);
    }

.lykkehjul-btn {
    padding: 9px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
}

.lykkehjul-btn-primary {
    background: #00b7ff;
    color: #000;
}

    .lykkehjul-btn-primary:hover {
        background: #0093cc;
    }

.lykkehjul-btn-neutral {
    background: #222;
    color: #fff;
}

    .lykkehjul-btn-neutral:hover {
        background: #333;
    }

.lykkehjul-btn-danger {
    background: #e53935;
    color: #fff;
}

    .lykkehjul-btn-danger:hover {
        background: #c62828;
    }

.lykkehjul-opt-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.lykkehjul-opt-item {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #000;
    border-radius: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

    .lykkehjul-opt-item input {
        flex: 1 1 auto;
        min-width: 160px;
        padding: 9px 10px;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        background: #050505;
        color: #fff;
    }

.lykkehjul-hint {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
    font-size: 0.9rem;
}

/* =========================================
  LYKKEHJUL – SELVE HJULET
========================================= */
.lykkehjul-wheel-root {
    min-height: calc(100vh - 120px);
    display: grid;
    place-items: center;
    padding: 20px 16px 80px 16px;
}

.lykkehjul-wheel-wrapper {
    position: relative;
    width: min(95vw, 95vh);
    height: min(95vw, 95vh);
    max-width: 1100px;
    max-height: 1100px;
}

.lykkehjul-wheel-shell {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, #273353, #161c2f 60%, #0f1426);
    box-shadow: inset 0 14px 40px rgba(0, 0, 0, 0.35), 0 30px 80px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.lykkehjul-wheel-pointer {
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 22px solid transparent;
    border-right: 22px solid transparent;
    border-bottom: 34px solid #ff4757;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
    z-index: 3;
}

.lykkehjul-wheel-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.lykkehjul-spin-btn {
    position: absolute;
    inset: 0;
    margin: auto;
    width: clamp(120px, 22%, 200px);
    height: clamp(120px, 22%, 200px);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: radial-gradient(circle at 38% 35%, #fff, #f6f8ff 45%, #d7dfff 75%);
    color: #0b1020;
    border: 4px solid #dfe6ff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 6px 14px rgba(255, 255, 255, 0.55);
    cursor: pointer;
    user-select: none;
    z-index: 2;
    transition: transform 0.06s ease, box-shadow 0.06s ease;
}

    .lykkehjul-spin-btn:active {
        transform: scale(0.98);
        box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.25);
    }

/* HUD / teller + tilbake-lenke */
.lykkehjul-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto 10px auto;
    padding: 4px 10px;
    font-weight: 600;
}

.lykkehjul-hud-left, .lykkehjul-hud-right {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.lykkehjul-back-link {
    color: #00b7ff;
    text-decoration: none;
}

    .lykkehjul-back-link:hover {
        text-decoration: underline;
    }

/* result-boble */
.lykkehjul-result {
    margin-top: 15px;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 800;
    background: rgba(46, 204, 113, 0.14);
    color: #b5ffcf;
    border: 1px solid rgba(46, 204, 113, 0.35);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.lykkehjul-empty-note {
    margin-top: 15px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 193, 7, 0.12);
    color: #ffe7a3;
    border: 1px solid rgba(255, 193, 7, 0.4);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

@media (max-width: 768px) {
    .lykkehjul-hud {
        flex-direction: column;
        gap: 6px;
    }

    .lykkehjul-page, .lykkehjul-manage-container {
        padding: 16px;
    }
}

/* =========================================
  REGISTRER-SIDE & SKJEMA
========================================= */

.register-container {
    max-width: 1000px;
    margin: 90px auto 80px auto;
    padding: 0 16px;
    text-align: left;
}

    .register-container h1 {
        font-size: 2rem;
        margin-bottom: 6px;
        text-align: center;
        color: #fff;
    }

.register-subtitle {
    margin-top: 0;
    margin-bottom: 16px;
    color: #9ca3af;
    max-width: 650px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* Kort */
.register-card {
    width: 100%;
    background: radial-gradient(circle at top, #1a2236 0, #050713 55%, #000 100%);
    border-radius: 16px;
    padding: 20px 20px 24px;
    border: 1px solid rgba(0, 183, 255, 0.28);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.9);
    color: #f9fafb;
}

/* Gridsystem */
.register-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 26px;
}

    .register-grid .full-width {
        grid-column: 1 / -1;
    }

@media (max-width: 768px) {
    .register-grid {
        grid-template-columns: 1fr;
    }

    .register-card {
        padding: 15px;
    }
}

/* Form-elementer */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

    .form-group label {
        font-weight: 600;
        display: block;
        margin-bottom: 4px;
        color: #e5e7eb;
        font-size: 0.95rem;
    }

/* Input styling */
.form-control {
    width: 100%;
    padding: 12px 15px; /* PADDING ER NÅ KORREKT */
    border-radius: 8px;
    border: 1px solid #4b5563;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    box-sizing: border-box;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

    .form-control::placeholder {
        color: #6b7280;
    }

    .form-control:focus {
        outline: none;
        border-color: #00b7ff;
        background-color: rgba(0, 0, 0, 0.6);
        box-shadow: 0 0 0 2px rgba(0, 183, 255, 0.3);
    }

/* Passord-styrke */
.password-strength-bar, #progressBarContainer {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 6px;
    overflow: hidden;
}

.password-strength-fill, #progressBar {
    height: 100%;
    border-radius: 999px;
    background: #dc3545;
    transition: width 0.15s ease-out;
    width: 0%;
}

/* Krav-tekst */
.password-requirements, #pwd_criteria, #crit-list {
    margin-top: 8px;
    display: grid;
    gap: 2px;
    font-size: 0.85rem;
}

.criteria, .crit {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fca5a5;
}

    .criteria.valid, .crit.valid {
        color: #bbf7d0;
    }

    .criteria-icon, .crit i {
        display: inline-flex;
        width: 14px;
        justify-content: center;
    }

/* =========================================
   FORESATTE-BLOKK (KORRIGERT FOR DARK MODE)
========================================= */
#guardianFields, .guardian-section, #guardian-box {
    margin-top: 25px;
    padding: 20px;
    /* Endret ramme til å passe temaet */
    border: 1px dashed rgba(0, 183, 255, 0.4);
    /* VIKTIG: Mørk bakgrunn (ikke hvit/lys) */
    background: rgba(0, 183, 255, 0.05);
    /* Alternativt for helt sort boks: background: #111; */

    border-radius: 12px;
    /* VIKTIG: Hvit tekst (var #000 før) */
    color: #fff;
    display: none; /* JS slår på denne */
}

    #guardianFields h3, .guardian-section h3, #guardian-box h3 {
        margin-top: 0;
        margin-bottom: 15px;
        color: #00b7ff; /* Theme-farge på overskrift */
        font-size: 1.2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 10px;
    }

    /* Sikrer at labels inni foresatt-boksen er lyse */
    #guardianFields label, .guardian-section label {
        color: #e5e7eb;
    }

/* Vilkår */
.terms-row {
    margin-top: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #e5e7eb;
}

    .terms-row a {
        color: #38bdf8;
        text-decoration: underline;
    }

        .terms-row a:hover {
            color: #0ea5e9;
        }

/* Knapper */
.register-submit, .btn-primary {
    margin-top: 25px;
    padding: 14px 20px;
    border-radius: 999px;
    border: none;
    background: #00b7ff;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    box-shadow: 0 10px 25px rgba(56,189,248,0.45);
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

    .register-submit:hover, .btn-primary:hover {
        background: #0ea5e9;
        transform: translateY(-1px);
        box-shadow: 0 16px 40px rgba(56,189,248,0.6);
    }

    .register-submit:active, .btn-primary:active {
        transform: translateY(0);
        box-shadow: 0 10px 25px rgba(56,189,248,0.45);
    }

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    text-align: left;
}

.alert-success {
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.45);
    color: #bbf7d0;
}

.alert-danger {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.45);
    color: #fecaca;
}

.text-danger {
    color: #ff6b6b;
    font-size: 0.83rem;
    margin-top: 2px;
}
/* =========================================
  FIX FOR READONLY FELTER (Poststed)
========================================= */
.form-control[readonly], .form-control:disabled {
    background-color: rgba(0, 0, 0, 0.5) !important; /* Mørk bakgrunn */
    color: #e0e0e0 !important; /* Lys tekst, men litt gråere */
    border-color: rgba(255, 255, 255, 0.1);
    cursor: default; /* Viser at man ikke kan skrive */
    opacity: 1; /* Hindrer at noen nettlesere gjør den gjennomsiktig */
}

/* =========================================
  ADMIN / MIN SIDE GRID (Fliser)
========================================= */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.admin-card {
    background: #111; /* Fallback */
    background: radial-gradient(circle at top, #1a2236 0, #050713 60%, #000 100%);
    border: 1px solid rgba(0, 183, 255, 0.2);
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

    .admin-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 183, 255, 0.25);
        border-color: rgba(0, 183, 255, 0.6);
        color: #fff;
    }

    .admin-card h3 {
        margin-top: 10px;
        margin-bottom: 10px;
        color: #00b7ff;
        font-size: 1.3rem;
    }

    .admin-card img {
        width: 64px;
        height: 64px;
        object-fit: contain;
        margin-bottom: 15px;
    }

    .admin-card p {
        font-size: 0.9rem;
        color: #aaa;
        margin: 0;
    }

/* Profilbilde sirkel */
.profile-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    cursor: pointer;
    display: inline-block;
}

    .profile-container img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
        border: 3px solid #00b7ff;
        transition: opacity 0.3s;
    }

    .profile-container:hover img {
        opacity: 0.7;
    }

.edit-text {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    pointer-events: none;
}

/* =========================================
  ADMIN: MEDLEMSLISTE (Tabeller & Badges)
========================================= */

/* Tabell-layout */
.admin-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
    font-size: 0.95rem;
}

    .admin-table th {
        padding: 12px;
        text-align: left;
        border-bottom: 2px solid #333;
        font-weight: 600;
        color: #00b7ff;
    }

    .admin-table td {
        padding: 12px;
        border-bottom: 1px solid #222;
        vertical-align: middle;
    }

    .admin-table tr:hover {
        background-color: rgba(255, 255, 255, 0.02);
    }

/* Profilbilde i liste */
.user-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-list-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #444;
}

/* Roller (Badges) */
.badge-role {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 5px;
    color: #000; /* Sort tekst for kontrast */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-admin {
    background-color: #f59e0b;
}
/* Oransje */
.role-chief {
    background-color: #8b5cf6;
    color: #fff;
}
/* Lilla */
.role-skiftleder {
    background-color: #ec4899;
    color: #fff;
}
/* Rosa */
.role-crew {
    background-color: #10b981;
}
/* Grønn */
.role-deltaker {
    background-color: #3b82f6;
}
/* Blå */
.role-bruker {
    background-color: #4b5563;
    color: #fff;
}
/* Grå */

/* Handlingsknapper i tabell */
.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 6px;
    margin-left: 5px;
    transition: transform 0.2s ease, color 0.2s ease;
}

    .action-btn:hover {
        transform: scale(1.2);
    }

.btn-msg {
    color: #3b82f6;
}
/* Melding */
.btn-edit {
    color: #f59e0b;
}
/* Rediger */
.btn-del {
    color: #ef4444;
}
/* Slett */

/* Søkefelt container */
.search-card {
    padding: 15px;
    margin-bottom: 20px;
}

/* Modal/Popup styling (hvis ikke allerede dekket) */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-box {
    max-width: 500px;
    width: 100%;
    position: relative;
    margin: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 15px;
}

/* =========================================
  MELDINGSSYSTEM
========================================= */
.msg-container {
    display: flex;
    gap: 20px;
    min-height: 600px;
}

/* Venstremeny */
.msg-sidebar {
    width: 250px;
    background: rgba(255, 255, 255, 0.03);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px 0 0 8px;
}

.msg-btn {
    display: block;
    width: 100%;
    padding: 10px 15px;
    text-align: left;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: 0.2s;
}

    .msg-btn:hover, .msg-btn.active {
        background: rgba(0, 183, 255, 0.15);
        color: #00b7ff;
    }

    .msg-btn i {
        margin-right: 10px;
    }

/* Meldingsliste */
.msg-list {
    flex: 1;
    background: #111;
    border-radius: 0 8px 8px 0;
    padding: 15px;
}

.msg-item {
    padding: 15px;
    border-bottom: 1px solid #222;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .msg-item:hover {
        background: rgba(255, 255, 255, 0.02);
    }

    .msg-item.unread {
        background: rgba(0, 183, 255, 0.05);
        border-left: 3px solid #00b7ff;
    }

.msg-sender {
    font-weight: bold;
    color: #fff;
    display: block;
}

.msg-subject {
    color: #ddd;
}

.msg-date {
    color: #666;
    font-size: 0.85rem;
}

/* Meldingsvisning (Detalj) */
.msg-detail {
    padding: 20px;
    background: #111;
    border-radius: 8px;
}

.msg-header {
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.msg-body {
    font-size: 1rem;
    line-height: 1.6;
    color: #eee;
    white-space: pre-wrap; /* Bevarer linjeskift */
    min-height: 200px;
}

.msg-attachment {
    margin-top: 20px;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 5px;
    display: inline-block;
}

/* Mobil */
@media (max-width: 768px) {
    .msg-container {
        flex-direction: column;
    }

    .msg-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #333;
        border-radius: 8px 8px 0 0;
    }
}

/* =========================================
   EVENT KORT OG MODAL (RUND DESIGN)
========================================= */

/* Grid-containeren (Sørger for at kortene ligger ved siden av hverandre) */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* Selve kortet (HTML bruker klassen 'event-card-tile') */
.event-card-tile {
    background: #111;
    border: 1px solid #333;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    padding-bottom: 20px;
    text-align: center; /* Sentrerer teksten siden bildet nå er i midten */
    /* NYTT: Begrenser bredden på kortet og sentrerer det i grid-cellen */
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

    .event-card-tile:hover {
        transform: translateY(-5px);
        border-color: #00b7ff;
        box-shadow: 0 10px 30px rgba(0, 183, 255, 0.15);
    }

/* Bilde-containeren - GJORT RUND */
.event-thumb-container {
    width: 180px; /* Fast bredde */
    height: 180px; /* Fast høyde (lik bredde for sirkel) */
    margin: 30px auto 10px auto; /* Sentrerer sirkelen horisontalt + litt luft over */
    border-radius: 50%; /* Gjør den sirkelrund */
    border: 4px solid rgba(0, 183, 255, 0.3); /* En pen ramme rundt sirkelen */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6); /* Skygge bak sirkelen */
    background: #000;
    position: relative;
    overflow: hidden;
    flex-shrink: 0; /* Hindrer at sirkelen blir klemt flat */
}

/* Selve bildet */
.event-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Viktig: Fyller hele sirkelen uten å strekke bildet */
    display: block;
    transition: transform 0.4s ease;
}

/* Zoom-effekt på bildet når man holder over kortet */
.event-card-tile:hover .event-thumb {
    transform: scale(1.1);
}

/* Badge for dato inni sirkelen (hvis du vil ha den synlig) */
.event-date-badge {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 183, 255, 0.9);
    color: #000;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 10;
}

/* Tekst-innholdet */
.event-body {
    padding: 15px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center; /* Sentrerer innholdet vertikalt */
}

/* ==========================================================================
   MODAL / POPUP (RESPONSIV & SCROLLBAR)
   ========================================================================== */
.modal-backdrop-modern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px; /* Liten padding for mobil */
}

.modal-window {
    background: #1a1a1a;
    width: 100%;
    max-width: 800px;
    max-height: 95vh; /* Sikrer at den aldri er høyere enn skjermen */
    border-radius: 16px;
    border: 1px solid #444;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Skjuler scroll på selve rammen */
    box-shadow: 0 25px 50px rgba(0,0,0,0.8);
}

/* Dette er området inni som skal scrolle */
.modal-scroll-area {
    overflow-y: auto; /* Aktiverer vertikal scroll */
    padding: 20px;
    flex: 1; /* Tar all tilgjengelig plass */
    -webkit-overflow-scrolling: touch; /* Glatt scroll på mobil */
}

/* Header bilde i modal */
.modal-hero-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    background: #000;
    display: block;
}

.modal-content-text {
    padding: 10px;
    text-align: left;
}

/* Lukkeknapp */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Info grid i modal (hvis den brukes) */
.event-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    background: rgba(255,255,255,0.03);
    padding: 20px;
    border-radius: 10px;
}

/* Mobil-tilpasning */
@media (max-width: 768px) {
    .modal-window {
        height: 95vh; /* Full høyde på mobil */
        max-height: 95vh;
    }

    .modal-scroll-area {
        padding: 15px;
    }
}

/* ==========================================================================
   10. BESØKSLOGG (SØK DROPDOWN)
   ========================================================================== */
.search-dropdown {
    background: #222;
    border: 1px solid #444;
    max-height: 200px;
    overflow-y: auto;
    position: absolute;
    z-index: 1000;
    width: 100%;
    margin-top: 5px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.search-result-item {
    padding: 12px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    color: #fff;
    background-color: #222;
    transition: background-color 0.2s;
}

    .search-result-item:hover {
        background-color: #00b7ff;
        color: #000;
    }

    .search-result-item small {
        display: block;
        color: #aaa;
        font-size: 0.8rem;
    }

    .search-result-item:hover small {
        color: #333;
    }

/* Status badge farger for besøkslogg */
.visitor-status-ok {
    background: #4ade80;
    color: #000;
}

.visitor-status-warn {
    background: #eab308;
    color: #000;
}

.visitor-status-out {
    background: #ef4444;
    color: #fff;
}

/* ==========================================================================
   11. REGLER SIDE
   ========================================================================== */
.rules-image-container {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 12px;
}

    .rules-image-container img {
        max-height: 150px;
        margin: 0 auto;
    }

.rules-list {
    list-style: none; /* Fjerner standard kulepunkter */
    padding: 0;
    margin-top: 20px;
}

    .rules-list li {
        background: rgba(255, 255, 255, 0.03);
        border-left: 4px solid #00b7ff;
        margin-bottom: 15px;
        padding: 15px;
        border-radius: 0 8px 8px 0;
        font-size: 0.95rem;
        line-height: 1.6;
    }

        .rules-list li strong {
            display: block;
            color: #00b7ff;
            font-size: 1.1rem;
            margin-bottom: 5px;
        }
/* ==========================================================================
   11. SCANNER KIOSK (Oppdatert for å matche Scanner.razor)
   ========================================================================== */
.scanner-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    background-color: #000; /* Standard bakgrunn */
    overflow: hidden;
}

.scanner-content {
    text-align: center;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    z-index: 10;
}

    .scanner-content h1 {
        font-size: 3rem;
        margin-bottom: 20px;
        color: #aaa;
        text-transform: uppercase;
        letter-spacing: 2px;
    }

.scan-name {
    font-size: 4rem;
    margin: 0;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.scan-message {
    font-size: 2.5rem;
    margin-top: 30px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 10px 30px;
    border-radius: 50px;
    background: rgba(0,0,0,0.5);
    display: inline-block;
}

/* STATUS FARGER - Disse brukes av Scanner.razor for å blinke */
.status-idle {
    background-color: #111;
}

.status-success {
    background-color: #10b981 !important; /* Kraftig Grønn */
}

.status-out {
    background-color: #ef4444 !important; /* Kraftig Rød */
}

.status-error {
    background-color: #eab308 !important; /* Gul */
}

/* Animasjon for "Venter på kort..." */
.blink-text {
    animation: blinker 1.5s linear infinite;
    font-size: 1.5rem;
    color: #666;
    margin-top: 20px;
}

@keyframes blinker {
    50% {
        opacity: 0.3;
    }
}

/* =========================================
   SUPPORT SYSTEM TILLEGG
========================================= */

/* Faner for Admin (Tabs) */
.support-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.tab-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #aaa;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .tab-btn:hover {
        border-color: #00b7ff;
        color: #fff;
    }

    .tab-btn.active {
        background: #00b7ff;
        color: #000;
        border-color: #00b7ff;
        font-weight: 600;
    }

/* FAQ Accordion (Utvidbar liste) */
.faq-item {
    background: #111; /* Matcher admin-card */
    border: 1px solid rgba(0, 183, 255, 0.2);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-trigger {
    width: 100%;
    text-align: left;
    background: rgba(0, 183, 255, 0.05);
    border: none;
    padding: 15px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

    .faq-trigger:hover {
        background: rgba(0, 183, 255, 0.15);
    }

.faq-content {
    padding: 20px;
    border-top: 1px solid rgba(0, 183, 255, 0.1);
    color: #ddd;
    background: #0a0a0a;
}

/* Chat / Ticket Detaljer */
.chat-window {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.chat-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 85%;
    line-height: 1.5;
    position: relative;
    font-size: 0.95rem;
}

/* Min melding (Høyre) */
.chat-me {
    align-self: flex-end;
    background: rgba(0, 183, 255, 0.15);
    border: 1px solid rgba(0, 183, 255, 0.4);
    color: #fff;
    border-bottom-right-radius: 2px;
}

/* Support melding (Venstre) */
.chat-other {
    align-self: flex-start;
    background: #222;
    border: 1px solid #444;
    color: #ddd;
    border-bottom-left-radius: 2px;
}

.chat-meta {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 4px;
    display: block;
}

/* Enkel editor toolbar */
.editor-toolbar {
    background: #222;
    padding: 8px;
    border: 1px solid #4b5563;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    display: flex;
    gap: 5px;
}

    .editor-toolbar button {
        background: #333;
        border: 1px solid #555;
        color: #fff;
        padding: 2px 8px;
        border-radius: 4px;
        cursor: pointer;
    }

        .editor-toolbar button:hover {
            background: #00b7ff;
            color: #000;
        }

/* Tag for vedlegg */
.attachment-tag {
    display: inline-block;
    background: #222;
    border: 1px solid #444;
    color: #00b7ff;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    text-decoration: none;
    margin-right: 5px;
    margin-top: 5px;
}

    .attachment-tag:hover {
        border-color: #00b7ff;
        background: rgba(0, 183, 255, 0.1);
    }

/* --- ØKONOMI DASHBOARD (MODERNE) --- */

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}

    .stat-card:hover {
        transform: translateY(-5px);
        border-color: rgba(255, 255, 255, 0.2);
    }

    .stat-card h3 {
        font-size: 0.9rem;
        text-transform: uppercase;
        color: #888;
        margin-bottom: 10px;
        letter-spacing: 1px;
    }

    .stat-card .value {
        font-size: 1.8rem;
        font-weight: 600;
        color: #fff;
    }

    .stat-card.income .value {
        color: #4ade80;
        text-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
    }

    .stat-card.expense .value {
        color: #f87171;
        text-shadow: 0 0 10px rgba(248, 113, 113, 0.3);
    }

    .stat-card.balance .value {
        color: #00b7ff;
        text-shadow: 0 0 10px rgba(0, 183, 255, 0.3);
    }

.action-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* KUNDEKORT */
.customer-list-item {
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
}

    .customer-list-item:hover {
        background: rgba(255,255,255,0.06);
    }

.customer-info h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: #fff;
}

.customer-info span {
    font-size: 0.85rem;
    color: #aaa;
    margin-right: 15px;
}

.customer-info i {
    color: #00b7ff;
    margin-right: 5px;
}

/* MODAL STYLING FIX */
.modal-window {
    background: #1a1a1a;
    border: 1px solid #333;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}