body {
    margin: 10px;
    font-family: Arial, sans-serif;
    color: white;

    background-image:
            linear-gradient(
                    rgba(15, 23, 42, 0.82),
                    rgba(15, 23, 42, 0.82)
            ),
            url("/images/bakgrunn/bakgrunn_handleliste_lyst_tema_blure.png");

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.admin-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 25px;
    background: rgba(0, 0, 0, 0.38);
    border: 1px solid rgba(255,255,255,0.25);
    box-sizing: border-box;
}

h1, h2, h3 {
    margin-top: 20px;
    margin-left: 20px;
}

a {
    color: #93c5fd;
    text-decoration: none;
}

.admin-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 25px;
}

.admin-menu a {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 80px;

    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.30);

    color: white;
    font-size: 20px;
    font-weight: bold;
}

input,
select,
button {
    font-size: 16px;
    padding: 10px;
    box-sizing: border-box;
}

input,
select {
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.35);
    color: white;
}

button {
    background: rgba(34, 197, 94, 0.9);
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form input[type="number"],
.admin-form select {
    width: 420px;
    max-width: 100%;
}

.message-success {
    color: #86efac;
}

.message-success_orange {
    color: #FF5F15;
    font-style: italic;
}


.message-error {
    color: #fca5a5;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0,0,0,0.25);
}

th,
td {
    border: 1px solid rgba(255,255,255,0.22);
    padding: 10px;
    text-align: left;
}

th {
    background: rgba(0,0,0,0.45);
}

.product-list-box {
    height: 360px;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.25);
    padding: 10px;
    background: rgba(0,0,0,0.25);
    max-width: 700px;
}

.product-list-box ul {
    margin: 0;
    padding-left: 18px;
}

.product-list-box li {
    padding: 5px 0;
}

.product-category {
    opacity: 0.65;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}

.admin-stat-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.30);
    padding: 20px;
    text-align: center;
}

.admin-stat-title {
    font-size: 18px;
    opacity: 0.75;
    margin-bottom: 10px;
}

.admin-stat-value {
    font-size: 42px;
    font-weight: bold;
}

.admin-return-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 0 18px;

    background: rgba(34, 197, 94, 0.85);
    border: 1px solid rgba(255,255,255,0.30);

    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
}

.admin-return-button:hover {
    background: rgba(34, 197, 94, 0.95);
}

.registration-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
}

.registration-form {
    min-width: 0;
}

.registration-info {
    position: sticky;
    top: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.registration-info h2 {
    margin-top: 0;
}

.registration-info-section + .registration-info-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.registration-info-section h3 {
    margin: 0 0 8px;
}

.registration-info-section p {
    margin: 0 0 10px;
    line-height: 1.55;
}

.registration-info code {
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .registration-layout {
        grid-template-columns: 1fr;
    }

    .registration-info {
        position: static;
    }
}
/* =========================================================
   HJELPEKNAPPER OG OVERLAY – REGISTRERINGSSKJEMA
   ========================================================= */

/*
 * Spørsmålstegn ved feltene.
 * Mer spesifikk selector hindrer at knappen arver
 * den vanlige grønne submit-knappen.
 */
.admin-form .help-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    min-width: 22px;
    height: 22px;
    min-height: 22px;
    margin: 0 0 0 6px;
    padding: 0;
    position: relative;
    top: -4px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

.admin-form .help-button:hover,
.admin-form .help-button:focus,
.admin-form .help-button:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.55);
    outline: none;
    box-shadow: none;
    transform: none;
}


/*
 * Innholdet som JavaScript kopierer inn i modalvinduet.
 * Disse boksene skal aldri vises direkte på siden.
 */
.help-content-template {
    display: none !important;
}


/*
 * Transparent overlay som dekker hele skjermen.
 */
.help-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}


/*
 * Sørger for at overlayet faktisk skjules
 * når hidden-attributtet er aktivt.
 */
.help-overlay[hidden] {
    display: none !important;
}


/*
 * Selve informasjonsboksen.
 */
.help-modal {
    display: block;
    width: min(100%, 660px);
    max-height: calc(100vh - 40px);
    margin: 0;
    padding: 28px;
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #1e293b;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    box-shadow:
            0 24px 60px rgba(0, 0, 0, 0.45),
            0 0 0 1px rgba(255, 255, 255, 0.03);
}

.help-modal h2 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: 24px;
    line-height: 1.25;
}

.help-modal h3 {
    margin: 22px 0 10px;
    color: #ffffff;
    font-size: 18px;
}

.help-modal p {
    margin: 0 0 14px;
    color: #ffffff;
    line-height: 1.65;
}

.help-modal ul,
.help-modal ol {
    margin: 0 0 16px;
    padding-left: 24px;
    color: #ffffff;
    line-height: 1.65;
}

.help-modal img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
}

.help-modal code {
    display: block;
    margin: 14px 0;
    padding: 12px;
    background: #0f172a;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}


/*
 * Området rundt Skjønner-knappen.
 */
.help-modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}


/*
 * Egen stil for Skjønner-knappen.
 */
.help-modal .help-understand-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 140px;
    height: auto;
    margin: 0;
    padding: 12px 22px;
    border: 0;
    border-radius: 6px;
    background: rgba(34, 197, 94, 0.90);
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
}

.help-modal .help-understand-button:hover,
.help-modal .help-understand-button:focus,
.help-modal .help-understand-button:focus-visible {
    background: rgba(34, 197, 94, 1);
    color: #ffffff;
    outline: none;
    transform: none;
}


/*
 * Hindrer at siden bak overlayet scroller.
 */
body.help-modal-open {
    overflow: hidden;
}


/* =========================================================
   MOBIL
   ========================================================= */

@media (max-width: 600px) {
    .admin-form .help-button {
        width: 22px;
        min-width: 22px;
        height: 22px;
        min-height: 22px;
        margin-left: 6px;
        padding: 0;
        background: rgba(255, 255, 255, 0.10);
        border-radius: 50%;
        font-size: 14px;
    }

    .help-overlay {
        align-items: center;
        padding:
                max(12px, env(safe-area-inset-top))
                12px
                max(12px, env(safe-area-inset-bottom));
    }

    .help-modal {
        width: 100%;
        max-width: 100%;
        max-height: calc(100dvh - 24px);
        margin: 0;
        padding: 22px;
        border-radius: 12px;
    }

    .help-modal h2 {
        font-size: 21px;
    }

    .help-modal-actions {
        display: block;
    }

    .help-modal .help-understand-button {
        width: 100%;
        min-width: 0;
    }
}