* {
    box-sizing: border-box;
}

:root {
    --panel-soft: rgba(255, 255, 255, 0.065);
    --text: #f3f3f3;
    --muted: #b0b0b0;
    --line: rgba(255, 255, 255, 0.14);
    --gold: #d5b36a;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 18%, rgba(255,255,255,0.08), transparent 24%),
        radial-gradient(circle at 78% 30%, rgba(213,179,106,0.08), transparent 26%),
        linear-gradient(135deg, #000, #090909 48%, #111);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url('/assets/hero-pistol.png') right center / cover no-repeat;
    opacity: 0.13;
    filter: grayscale(1) contrast(1.12);
    pointer-events: none;
    z-index: -3;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px);
    background-size: 70px 70px;
    pointer-events: none;
    z-index: -2;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px clamp(18px, 4vw, 60px);
    background: rgba(0,0,0,0.74);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-mark,
.front-logo {
    border: 2px solid #fff;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 0 7px rgba(255,255,255,0.05);
    display: inline-block;
}

.logo-mark {
    width: 42px;
    height: 42px;
}

.front-logo {
    width: 86px;
    height: 86px;
    box-shadow: 0 0 0 12px rgba(255,255,255,0.04), 0 0 70px rgba(213,179,106,0.18);
}

.logo-mark::before,
.logo-mark::after,
.front-logo::before,
.front-logo::after {
    content: "";
    position: absolute;
    background: #fff;
}

.logo-mark::before {
    width: 2px;
    height: 54px;
    left: 18px;
    top: -8px;
}

.logo-mark::after {
    height: 2px;
    width: 54px;
    left: -8px;
    top: 18px;
}

.front-logo::before {
    width: 3px;
    height: 112px;
    left: 40px;
    top: -15px;
}

.front-logo::after {
    height: 3px;
    width: 112px;
    left: -15px;
    top: 40px;
}

.logo strong {
    display: block;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 15px;
}

.logo small {
    display: block;
    color: var(--muted);
    margin-top: 3px;
    font-size: 12px;
}

.menu-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-wrap {
    position: relative;
}

.top-logout {
    margin: 0;
}

.menu-btn,
.logout-btn {
    border: 1px solid var(--line);
    color: #fff;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 700;
    cursor: pointer;
}

.menu-btn:hover,
.logout-btn:hover {
    background: rgba(255,255,255,0.12);
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 54px;
    min-width: 260px;
    padding: 10px;
    background: rgba(10,10,12,0.96);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(0,0,0,0.55);
}

.menu-open .dropdown-menu,
.menu-wrap:hover .dropdown-menu {
    display: grid;
}

.dropdown-menu a {
    display: block;
    padding: 13px 14px;
    border-radius: 12px;
    color: #dedede;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.front-card {
    margin: 44px 0 22px;
    width: 100%;
    padding: clamp(28px, 6vw, 70px);
    background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.045));
    border: 1px solid var(--line);
    border-radius: 36px;
    box-shadow: 0 30px 100px rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    text-align: center;
}

.front-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.founded-year {
    display: block;
    margin: 0 auto 52px;
    color: var(--gold);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(22px, 3vw, 34px);
    letter-spacing: 0.16em;
    font-weight: 700;
}

.tag {
    display: inline-flex;
    padding: 8px 13px;
    border: 1px solid rgba(213,179,106,0.34);
    background: rgba(213,179,106,0.08);
    color: var(--gold);
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 12px;
}

h1 {
    margin: 0 0 16px;
    font-size: clamp(36px, 5.5vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.035em;
    text-transform: none;
}

h2 {
    margin: 0 0 24px;
    color: var(--gold);
    font-size: clamp(20px, 3vw, 34px);
    font-weight: 400;
}

.about-text {
    width: min(760px, 100%);
    margin: 0 auto;
    color: #d4d4d4;
    line-height: 1.75;
    font-size: 18px;
}

.buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 14px 22px;
    background: rgba(255,255,255,0.07);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background: rgba(255,255,255,0.13);
}

.btn.primary {
    background: #f2f2f2;
    color: #050505;
}

.edit-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--gold);
    font-weight: 700;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding-bottom: 60px;
}

.cards article,
.simple-page,
.login-box,
.admin-page {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 26px;
    backdrop-filter: blur(6px);
}

.cards span {
    color: var(--gold);
    font-weight: 800;
}

.cards h3 {
    font-size: 24px;
    margin: 18px 0 8px;
}

.cards p,
.simple-page p,
.login-box p,
.admin-page p {
    color: var(--muted);
    line-height: 1.6;
}

.simple-page,
.login-page,
.admin-page {
    margin: 70px auto;
    max-width: 780px;
}

.login-page {
    display: grid;
    place-items: center;
    min-height: 64vh;
}

.login-box {
    width: min(460px, 100%);
}

label {
    display: grid;
    gap: 7px;
    margin: 14px 0;
    color: #ddd;
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(0,0,0,0.4);
    color: #fff;
    padding: 13px;
    font: inherit;
}

textarea {
    resize: vertical;
}

.error {
    background: rgba(150, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.25);
    padding: 12px;
    border-radius: 14px;
    color: #ffd4d4;
    margin-bottom: 14px;
}

.success {
    background: rgba(0, 140, 70, 0.18);
    border: 1px solid rgba(0, 200, 100, 0.24);
    padding: 12px;
    border-radius: 14px;
    color: #c6ffd9;
    margin-bottom: 14px;
}

.logout-form {
    margin-top: 18px;
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 26px clamp(18px, 4vw, 60px);
    border-top: 1px solid var(--line);
    background: rgba(0,0,0,0.55);
    color: var(--muted);
}

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

    .logo small {
        display: none;
    }

    footer {
        flex-direction: column;
        text-align: center;
    }
}



h2:empty { display: none; }


@media (max-width: 640px) {
    .topbar {
        flex-direction: row;
        align-items: center;
    }

    .logo {
        max-width: 58%;
    }

    .menu-actions {
        width: auto;
        margin-left: auto;
        justify-content: flex-end;
        align-items: center;
    }

    .menu-wrap {
        position: relative;
    }

    .dropdown-menu {
        right: 0;
        left: auto;
        top: 52px;
        min-width: 245px;
        text-align: right;
    }

    .dropdown-menu a {
        text-align: right;
    }

    body::before {
        background-size: 115%;
        background-position: center 120px;
        opacity: 0.18;
    }

    .front-card {
        margin-top: 28px;
    }
}


/* Adminpanel venstremeny - lagt til uten å endre resten av designet */
.admin-shell {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 20px;
    margin: 42px auto 70px;
    width: min(1180px, 100%);
}

.admin-sidebar,
.admin-main {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 26px;
    backdrop-filter: blur(6px);
}

.admin-sidebar {
    padding: 18px;
    align-self: start;
    position: sticky;
    top: 92px;
}

.admin-sidebar h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 24px;
}

.admin-sidebar a {
    display: block;
    padding: 12px 13px;
    border-radius: 13px;
    color: #d7d7d7;
    margin-bottom: 6px;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(255,255,255,0.10);
    color: #fff;
}

.admin-sidebar a.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.admin-main {
    padding: clamp(22px, 4vw, 36px);
}

.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.admin-cards a {
    display: grid;
    gap: 8px;
    padding: 20px;
    border-radius: 18px;
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--line);
}

.admin-cards strong {
    color: #fff;
    font-size: 20px;
}

.admin-cards span {
    color: var(--muted);
    line-height: 1.5;
}

.admin-subtitle {
    margin: 30px 0 14px;
    color: #fff;
}

.front-card-editor {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,0.05);
    margin-bottom: 16px;
}

.front-card-editor h3 {
    margin: 0 0 12px;
    color: var(--gold);
}

/* Arrangement */
.arrangement-page {
    max-width: 1120px;
}

.arrangement-buttons {
    justify-content: flex-start;
    margin-top: 18px;
}

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

.arr-card {
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.065);
    border: 1px solid var(--line);
    border-radius: 24px;
    cursor: pointer;
    text-align: left;
    transition: transform .18s ease, background .18s ease;
}

.arr-card:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.09);
}

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

.arr-card-content {
    padding: 20px;
}

.arr-card h2 {
    margin: 8px 0 10px;
    color: #fff;
    font-size: 24px;
}

.arr-card p {
    margin: 0;
}

.arr-date {
    color: var(--gold);
    font-weight: 800;
    font-size: 13px;
}

.arr-full-text {
    display: none;
}

.arr-delete {
    position: absolute;
    right: 12px;
    top: 12px;
    margin: 0;
}

.arr-delete button {
    border: 0;
    border-radius: 999px;
    padding: 8px 11px;
    background: rgba(120,0,0,.82);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.arr-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 8000;
    background: rgba(0,0,0,.78);
    padding: 22px;
    overflow-y: auto;
}

.arr-modal.open {
    display: grid;
    place-items: center;
}

.arr-modal-box {
    width: min(820px, 100%);
    background: rgba(12,12,14,.98);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 24px;
    position: relative;
    box-shadow: 0 30px 110px rgba(0,0,0,.65);
}

.arr-modal-box img {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    border-radius: 20px;
    margin-bottom: 18px;
    background: #000;
}

.arr-modal-box h2 {
    margin: 8px 0;
    color: #fff;
}

#arrModalDate {
    color: var(--gold);
    font-weight: 800;
}

#arrModalText {
    color: #d4d4d4;
    line-height: 1.7;
    font-size: 17px;
}

.arr-close,
.add-arr-close {
    position: absolute;
    right: 16px;
    top: 14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #000;
    font-size: 26px;
    font-weight: 900;
    cursor: pointer;
}

.add-arr-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.add-arr-overlay.open {
    display: flex !important;
}

.add-arr-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.78);
    backdrop-filter: blur(5px);
}

.add-arr-popup {
    position: relative;
    z-index: 2;
    width: min(720px, 100%);
    max-height: min(88vh, 820px);
    overflow-y: auto;
    background: rgba(15,15,17,.98);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: clamp(22px, 4vw, 34px);
    box-shadow: 0 35px 120px rgba(0,0,0,.75);
}

.add-arr-popup h2 {
    margin: 0 0 18px;
    color: #fff;
}

.add-arr-popup input[type="datetime-local"] {
    color-scheme: dark;
}

body.add-arr-open {
    overflow: hidden;
}

@media (max-width: 850px) {
    .admin-shell {
        grid-template-columns: 1fr;
        margin-top: 24px;
    }

    .admin-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .add-arr-overlay {
        padding: 10px;
        align-items: flex-start;
        padding-top: 22px;
    }

    .add-arr-popup {
        max-height: calc(100vh - 44px);
        border-radius: 22px;
    }
}


/* Standplassledere */
.standplass-page {
    max-width: 1120px;
}

.spl-list {
    display: grid;
    gap: 16px;
    margin-top: 26px;
}

.spl-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.065);
}

.spl-card h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: clamp(22px, 3vw, 34px);
}

.spl-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.spl-dates span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--gold-soft);
    color: var(--gold);
    border: 1px solid rgba(201,162,75,0.35);
    font-weight: 800;
}

.spl-note {
    margin-top: 30px;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.055);
    color: #eee;
    line-height: 1.7;
    font-size: 18px;
}

.spl-admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 22px 0 30px;
}

.spl-admin-form {
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.045);
}

.spl-admin-form h2 {
    margin: 0 0 12px;
    color: #fff;
}

.spl-delete {
    margin: 0;
}

.spl-delete button {
    border: 0;
    border-radius: 999px;
    padding: 9px 12px;
    background: rgba(120,0,0,.82);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 760px) {
    .spl-admin-grid {
        grid-template-columns: 1fr;
    }

    .spl-card {
        display: grid;
    }
}


.spl-edit-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
}

.spl-edit-form {
    width: 100%;
}

.spl-edit-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 760px) {
    .spl-edit-card {
        grid-template-columns: 1fr;
    }
}


/* Popup-redigering for standplassledere */
.spl-admin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.spl-edit-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.spl-edit-overlay.open {
    display: flex !important;
}

.spl-edit-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.78);
    backdrop-filter: blur(5px);
}

.spl-edit-popup {
    position: relative;
    z-index: 2;
    width: min(680px, 100%);
    max-height: min(88vh, 820px);
    overflow-y: auto;
    background: rgba(15,15,17,.98);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: clamp(22px, 4vw, 34px);
    box-shadow: 0 35px 120px rgba(0,0,0,.75);
}

.spl-edit-popup h2 {
    margin: 0 0 18px;
    color: #fff;
}

.spl-edit-close {
    position: absolute;
    right: 16px;
    top: 14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #000;
    font-size: 26px;
    font-weight: 900;
    cursor: pointer;
}

body.spl-edit-open {
    overflow: hidden;
}

@media (max-width: 760px) {
    .spl-admin-actions {
        width: 100%;
    }

    .spl-admin-actions .btn,
    .spl-admin-actions form,
    .spl-admin-actions button {
        width: 100%;
    }

    .spl-edit-overlay {
        padding: 10px;
        align-items: flex-start;
        padding-top: 22px;
    }

    .spl-edit-popup {
        max-height: calc(100vh - 44px);
        border-radius: 22px;
    }
}


/* Stevneresultater */
.results-page {
    max-width: 1120px;
}

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

.result-card {
    display: block;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.065);
    transition: transform .18s ease, background .18s ease;
}

.result-card:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.09);
}

.result-card span,
.result-admin-card span {
    color: var(--gold);
    font-weight: 900;
}

.result-card h2,
.result-admin-card h2 {
    margin: 10px 0;
    color: #fff;
}

.result-admin-form {
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.045);
    margin: 22px 0 30px;
}

.result-admin-list {
    display: grid;
    gap: 14px;
}

.result-admin-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.055);
}

.result-admin-card a {
    color: var(--gold);
    font-weight: 800;
}

.result-admin-card button {
    border: 0;
    border-radius: 999px;
    padding: 9px 12px;
    background: rgba(120,0,0,.82);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 760px) {
    .result-admin-card {
        display: grid;
    }
}


/* Kontaktpersoner */
.kontakt-page {
    max-width: 1120px;
}

.kontakt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 18px;
    margin-top: 26px;
}

.kontakt-card {
    padding: 24px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.065);
}

.kontakt-card h2,
.kontakt-admin-card h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 900;
}

.kontakt-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 14px;
}

.kontakt-roles span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 11px;
    border-radius: 999px;
    background: var(--gold-soft);
    color: var(--gold);
    border: 1px solid rgba(201,162,75,0.35);
    font-weight: 800;
    font-size: 14px;
}

.kontakt-info {
    color: #ddd;
    line-height: 1.65;
    font-size: 16px;
}

.kontakt-admin-form {
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.045);
    margin: 22px 0 30px;
}

.kontakt-admin-list {
    display: grid;
    gap: 14px;
}

.kontakt-admin-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.055);
}

.kontakt-admin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.kontakt-admin-actions form {
    margin: 0;
}

.kontakt-admin-actions form button {
    border: 0;
    border-radius: 999px;
    padding: 12px 14px;
    background: rgba(120,0,0,.82);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.kontakt-edit-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.kontakt-edit-overlay.open {
    display: flex !important;
}

.kontakt-edit-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.78);
    backdrop-filter: blur(5px);
}

.kontakt-edit-popup {
    position: relative;
    z-index: 2;
    width: min(700px, 100%);
    max-height: min(88vh, 820px);
    overflow-y: auto;
    background: rgba(15,15,17,.98);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: clamp(22px, 4vw, 34px);
    box-shadow: 0 35px 120px rgba(0,0,0,.75);
}

.kontakt-edit-popup h2 {
    margin: 0 0 18px;
    color: #fff;
}

.kontakt-edit-close {
    position: absolute;
    right: 16px;
    top: 14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #000;
    font-size: 26px;
    font-weight: 900;
    cursor: pointer;
}

body.kontakt-edit-open {
    overflow: hidden;
}

@media (max-width: 760px) {
    .kontakt-admin-card {
        display: grid;
    }

    .kontakt-admin-actions,
    .kontakt-admin-actions .btn,
    .kontakt-admin-actions form,
    .kontakt-admin-actions button {
        width: 100%;
    }

    .kontakt-edit-overlay {
        padding: 10px;
        align-items: flex-start;
        padding-top: 22px;
    }

    .kontakt-edit-popup {
        max-height: calc(100vh - 44px);
        border-radius: 22px;
    }
}


/* Mer kompakt redigerings-popup for kontaktpersoner */
.kontakt-edit-popup {
    width: min(620px, 100%) !important;
    padding: 24px !important;
}

.kontakt-edit-popup .admin-form {
    gap: 12px;
}

.kontakt-edit-popup label {
    gap: 6px;
}

.kontakt-edit-popup label small {
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
}

.kontakt-edit-popup input,
.kontakt-edit-popup textarea {
    padding: 11px 13px;
}

.kontakt-edit-popup textarea {
    min-height: unset;
}

.kontakt-edit-popup h2 {
    margin-bottom: 14px !important;
    padding-right: 48px;
}

@media (min-width: 760px) {
    .kontakt-edit-popup .admin-form label:nth-of-type(2),
    .kontakt-edit-popup .admin-form label:nth-of-type(3) {
        margin-top: 2px;
    }
}

@media (max-width: 640px) {
    .kontakt-edit-popup {
        padding: 18px !important;
    }
}


/* TVUNGEN LITEN POPUP FOR KONTAKTPERSONER */
.kontakt-edit-overlay {
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
}

.kontakt-edit-popup {
    width: min(520px, calc(100vw - 32px)) !important;
    max-width: 520px !important;
    max-height: calc(100vh - 80px) !important;
    padding: 18px !important;
    border-radius: 20px !important;
    overflow-y: auto !important;
}

.kontakt-edit-popup h2 {
    font-size: 28px !important;
    line-height: 1.1 !important;
    margin: 0 44px 14px 0 !important;
}

.kontakt-edit-popup .admin-form {
    gap: 9px !important;
}

.kontakt-edit-popup .admin-form label {
    gap: 4px !important;
    font-size: 15px !important;
}

.kontakt-edit-popup .admin-form label small {
    display: inline !important;
    margin-left: 6px !important;
    font-size: 12px !important;
    opacity: 0.75 !important;
}

.kontakt-edit-popup input,
.kontakt-edit-popup textarea {
    padding: 9px 11px !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
    border-radius: 13px !important;
}

.kontakt-edit-popup textarea {
    min-height: 0 !important;
}

#editKpRoles {
    height: 82px !important;
}

#editKpInfo {
    height: 104px !important;
}

.kontakt-edit-popup .btn {
    margin-top: 4px !important;
    padding: 11px 18px !important;
    min-width: 0 !important;
    width: auto !important;
}

.kontakt-edit-close {
    right: 12px !important;
    top: 12px !important;
    width: 34px !important;
    height: 34px !important;
    font-size: 22px !important;
}

@media (max-width: 640px) {
    .kontakt-edit-overlay {
        align-items: center !important;
        padding: 10px !important;
    }

    .kontakt-edit-popup {
        width: calc(100vw - 20px) !important;
        max-height: calc(100vh - 28px) !important;
        padding: 16px !important;
    }

    .kontakt-edit-popup h2 {
        font-size: 24px !important;
    }

    #editKpRoles {
        height: 76px !important;
    }

    #editKpInfo {
        height: 92px !important;
    }
}


/* Priser */
.priser-page {
    max-width: 1180px;
}

.pris-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 28px;
}

.pris-category {
    padding: 24px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.06);
}

.pris-category h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(22px, 3vw, 32px);
}

.pris-list {
    display: grid;
    gap: 12px;
}

.pris-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: start;
    padding: 14px;
    border-radius: 18px;
    background: rgba(0,0,0,0.16);
    border: 1px solid rgba(255,255,255,0.08);
}

.pris-row h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
}

.pris-row p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.pris-row strong {
    color: var(--gold);
    font-size: 18px;
    white-space: nowrap;
}

.pris-note {
    margin-top: 28px;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.055);
    color: #eee;
    line-height: 1.7;
    font-size: 18px;
}

.pris-admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 22px 0 30px;
}

.pris-admin-form {
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.045);
}

.pris-admin-form h2 {
    margin: 0 0 12px;
    color: #fff;
}

.pris-admin-list {
    display: grid;
    gap: 18px;
}

.pris-admin-category {
    display: grid;
    gap: 10px;
}

.pris-admin-category h3 {
    margin: 0;
    color: var(--gold);
    font-size: 22px;
}

.pris-admin-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.055);
}

.pris-admin-card strong {
    display: block;
    color: #fff;
    font-size: 18px;
}

.pris-admin-card span {
    display: inline-block;
    color: var(--gold);
    font-weight: 900;
    margin-top: 4px;
}

.pris-admin-card p {
    margin: 6px 0 0;
}

.pris-admin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.pris-admin-actions form {
    margin: 0;
}

.pris-admin-actions form button {
    border: 0;
    border-radius: 999px;
    padding: 12px 14px;
    background: rgba(120,0,0,.82);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.pris-edit-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.pris-edit-overlay.open {
    display: flex !important;
}

.pris-edit-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.78);
    backdrop-filter: blur(5px);
}

.pris-edit-popup {
    position: relative;
    z-index: 2;
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    background: rgba(15,15,17,.98);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 35px 120px rgba(0,0,0,.75);
}

.pris-edit-popup h2 {
    margin: 0 44px 16px 0;
    color: #fff;
}

.pris-edit-close {
    position: absolute;
    right: 14px;
    top: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #000;
    font-size: 24px;
    font-weight: 900;
    cursor: pointer;
}

body.pris-edit-open {
    overflow: hidden;
}

@media (max-width: 850px) {
    .pris-grid,
    .pris-admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .pris-row {
        grid-template-columns: 1fr;
    }

    .pris-admin-card {
        display: grid;
    }

    .pris-admin-actions,
    .pris-admin-actions .btn,
    .pris-admin-actions form,
    .pris-admin-actions button {
        width: 100%;
    }

    .pris-edit-overlay {
        padding: 10px;
        align-items: center;
    }

    .pris-edit-popup {
        max-height: calc(100vh - 28px);
        padding: 18px;
    }
}


.pris-category-admin {
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.045);
    margin: 0 0 24px;
}

.pris-category-admin h2 {
    margin: 0 0 14px;
    color: #fff;
}

.pris-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pris-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    background: var(--gold-soft);
    border: 1px solid rgba(201,162,75,0.35);
    color: var(--gold);
    font-weight: 900;
}

.pris-category-chip form {
    margin: 0;
}

.pris-category-chip button {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: rgba(120,0,0,.82);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.pris-add-form {
    margin-bottom: 30px;
}

.admin-form select {
    width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(0,0,0,.28);
    color: #fff;
    font: inherit;
}

.admin-form select option {
    background: #111;
    color: #fff;
}


/* Sponsorer */
.sponsorer-page {
    max-width: 1180px;
}

.sponsor-intro {
    max-width: 900px;
    font-size: clamp(18px, 2.2vw, 24px);
}

.sponsor-grid {
    display: grid;
    gap: 24px;
    margin-top: 30px;
}

.sponsor-category {
    padding: 24px;
    border-radius: 26px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.06);
}

.sponsor-category h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(24px, 3vw, 36px);
}

.sponsor-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.sponsor-card {
    display: block;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.11);
    background: rgba(0,0,0,0.16);
    transition: transform .18s ease, background .18s ease;
}

.sponsor-card:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.08);
}

.sponsor-card h3 {
    margin: 0;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
}

.sponsor-card p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.sponsor-card span {
    display: inline-block;
    margin-top: 12px;
    color: var(--gold);
    font-weight: 900;
}

.sponsor-note {
    margin-top: 28px;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.055);
    color: #eee;
    line-height: 1.7;
    font-size: 18px;
}

.sponsor-admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 22px 0 30px;
}

.sponsor-admin-form,
.sponsor-category-admin {
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.045);
}

.sponsor-admin-form h2,
.sponsor-category-admin h2 {
    margin: 0 0 12px;
    color: #fff;
}

.sponsor-category-admin {
    margin: 0 0 24px;
}

.sponsor-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sponsor-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    background: var(--gold-soft);
    border: 1px solid rgba(201,162,75,0.35);
    color: var(--gold);
    font-weight: 900;
}

.sponsor-category-chip form {
    margin: 0;
}

.sponsor-category-chip button {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: rgba(120,0,0,.82);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.sponsor-add-form {
    margin-bottom: 30px;
}

.sponsor-admin-list {
    display: grid;
    gap: 18px;
}

.sponsor-admin-category {
    display: grid;
    gap: 10px;
}

.sponsor-admin-category h3 {
    margin: 0;
    color: var(--gold);
    font-size: 22px;
}

.sponsor-admin-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.055);
}

.sponsor-admin-card strong {
    display: block;
    color: #fff;
    font-size: 18px;
}

.sponsor-admin-card p {
    margin: 6px 0 0;
}

.sponsor-admin-card a {
    display: inline-block;
    margin-top: 6px;
    color: var(--gold);
    font-weight: 900;
}

.sponsor-admin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.sponsor-admin-actions form {
    margin: 0;
}

.sponsor-admin-actions form button {
    border: 0;
    border-radius: 999px;
    padding: 12px 14px;
    background: rgba(120,0,0,.82);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.sponsor-edit-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.sponsor-edit-overlay.open {
    display: flex !important;
}

.sponsor-edit-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.78);
    backdrop-filter: blur(5px);
}

.sponsor-edit-popup {
    position: relative;
    z-index: 2;
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    background: rgba(15,15,17,.98);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 35px 120px rgba(0,0,0,.75);
}

.sponsor-edit-popup h2 {
    margin: 0 44px 16px 0;
    color: #fff;
}

.sponsor-edit-close {
    position: absolute;
    right: 14px;
    top: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #000;
    font-size: 24px;
    font-weight: 900;
    cursor: pointer;
}

body.sponsor-edit-open {
    overflow: hidden;
}

@media (max-width: 850px) {
    .sponsor-admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .sponsor-admin-card {
        display: grid;
    }

    .sponsor-admin-actions,
    .sponsor-admin-actions .btn,
    .sponsor-admin-actions form,
    .sponsor-admin-actions button {
        width: 100%;
    }

    .sponsor-edit-overlay {
        padding: 10px;
        align-items: center;
    }

    .sponsor-edit-popup {
        max-height: calc(100vh - 28px);
        padding: 18px;
    }
}


/* Bilder */
.bilder-page {
    max-width: 1180px;
}

.bilde-mappe-list {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.bilde-mappe {
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.055);
    overflow: hidden;
}

.bilde-mappe-header {
    width: 100%;
    border: 0;
    background: rgba(255,255,255,0.06);
    color: #fff;
    padding: 20px 22px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    cursor: pointer;
    text-align: left;
}

.bilde-mappe-header span {
    font-size: 24px;
    font-weight: 900;
}

.bilde-mappe-header small {
    color: var(--gold);
    font-weight: 900;
}

.bilde-grid {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    padding: 18px;
}

.bilde-mappe.open .bilde-grid {
    display: grid;
}

.bilde-card {
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.16);
    color: #fff;
    border-radius: 20px;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    text-align: left;
}

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

.bilde-card strong {
    display: block;
    padding: 12px 14px;
}

.bilde-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,.82);
    padding: 20px;
    place-items: center;
}

.bilde-modal.open {
    display: grid;
}

.bilde-modal-box {
    position: relative;
    width: min(980px, 100%);
    max-height: calc(100vh - 40px);
    background: rgba(15,15,17,.98);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 20px;
    overflow: auto;
}

.bilde-modal-box img {
    width: 100%;
    max-height: 76vh;
    object-fit: contain;
    border-radius: 18px;
    background: #000;
}

.bilde-modal-box h2 {
    margin: 14px 48px 0 0;
    color: #fff;
}

.bilde-modal-close,
.bilde-edit-close {
    position: absolute;
    right: 14px;
    top: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #000;
    font-size: 24px;
    font-weight: 900;
    cursor: pointer;
}

.bilder-admin-form,
.bilder-admin-mappe,
.bilde-upload-form {
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.045);
    margin-bottom: 18px;
}

.bilder-admin-list {
    display: grid;
    gap: 22px;
    margin-top: 26px;
}

.bilder-admin-mappe-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}

.bilder-admin-mappe-head h2 {
    margin: 0;
    color: #fff;
}

.bilder-admin-mappe-head form {
    margin: 0;
}

.bilder-admin-mappe-head button,
.bilder-admin-actions form button {
    border: 0;
    border-radius: 999px;
    padding: 10px 13px;
    background: rgba(120,0,0,.82);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.bilder-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.bilder-admin-card {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.16);
}

.bilder-admin-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.bilder-admin-card > div {
    padding: 14px;
}

.bilder-admin-card strong {
    display: block;
    color: #fff;
    margin-bottom: 12px;
}

.bilder-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bilder-admin-actions form {
    margin: 0;
}

.bilde-edit-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.bilde-edit-overlay.open {
    display: flex !important;
}

.bilde-edit-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.78);
    backdrop-filter: blur(5px);
}

.bilde-edit-popup {
    position: relative;
    z-index: 2;
    width: min(520px, calc(100vw - 32px));
    background: rgba(15,15,17,.98);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 35px 120px rgba(0,0,0,.75);
}

.bilde-edit-popup h2 {
    margin: 0 44px 16px 0;
    color: #fff;
}

@media (max-width: 640px) {
    .bilde-mappe-header {
        display: grid;
    }

    .bilder-admin-mappe-head {
        display: grid;
    }

    .bilder-admin-mappe-head button,
    .bilder-admin-actions .btn,
    .bilder-admin-actions form,
    .bilder-admin-actions button {
        width: 100%;
    }
}
