﻿

*{box-sizing:border-box}
body{margin:0;background:#f3f5f6;color:#243746;font:16px/1.5 Arial,sans-serif}
main{max-width:100%;margin:auto;padding:0px 00px 00px 20px}
.hero{background:#102b43;color:white;padding:32px 0px 32px 34px ;margin:0px 0px 0px 2px  ;border-radius:16px;margin-bottom:20px}
.hero h1{margin:0 0 8px;font-size:clamp(25px,4vw,38px)}
.hero p{margin:0;color:#e8edf1}
.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:20px}
.card{background:white;padding:22px;border:1px solid #dfe5e9;border-radius:14px;margin-bottom:18px;min-width:0}
.kpi{font-size:36px;font-weight:700;color:#102b43}
.muted{color:#667582;font-size:14px}
h2{font-size:21px;color:#102b43;margin:0 0 16px}
.bar-row{margin:13px 0}
.bar-label{display:flex;justify-content:space-between;gap:12px;margin-bottom:5px;font-size:14px}
.bar-label strong{white-space:nowrap}
.bar-bg{height:12px;background:#e8edf1;border-radius:10px;overflow:hidden}
.bar-fill{height:100%;background:#b6a16b;border-radius:10px}
.text-answer{padding:12px 0;border-bottom:1px solid #dfe5e9;overflow-wrap:anywhere}
@media(min-width:700px){.cards{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:420px){main{padding:12px}.hero,.card{padding:18px}.kpi{font-size:30px}.bar-label{font-size:13px}}
@media print{body{background:white}.card,.hero{break-inside:avoid}main{max-width:none}}





/* =====================================
   ANVÄNDARE – GEMENSAM ADMINSTIL
   ===================================== */

.user-admin {
    width: 100%;
    box-sizing: border-box;
    color: #334155;
    font-size: 14px;
}

.user-admin *,
.user-admin *::before,
.user-admin *::after {
    box-sizing: border-box;
}

/* Rubrik och huvudknapp */

.user-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px;
    margin-bottom: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.user-admin-title {
    color: #334155;
    font-size: 18px;
    font-weight: 700;
}

/* Knappar */

.user-admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 16px;
    border: 1px solid #1d4ed8;
    border-radius: 7px;
    background: #1d4ed8;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.user-admin-button:hover {
    background: #1e40af;
    color: #fff;
}

/* Kategorifilter */

.user-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px;
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.user-category-item {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
    color: #334155;
    text-decoration: none;
}

.user-category-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.user-category-item.is-selected {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

/* Bokstäver */

.user-letter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 14px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.user-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    color: #334155;
    font-weight: 600;
    text-decoration: none;
}

.user-letter:hover {
    background: #eff6ff;
    border-color: #93b4fd;
    color: #1d4ed8;
}

.user-letter.is-selected {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

/* Mobil */

@media (max-width: 600px) {
    .user-admin-header {
        align-items: stretch;
        flex-direction: column;
    }

    .user-admin-button {
        width: 100%;
    }

    .user-category-list,
    .user-letter-list {
        padding: 10px;
        gap: 6px;
    }

    .user-letter {
        width: 32px;
        height: 34px;
    }
}
```








/* =========================================
   GEMENSAM ADMINSTANDARD
   Classic ASP – KMK
   ========================================= */

:root {
    --admin-bg: #ffffff;
    --admin-header-bg: #f8fafc;
    --admin-border: #e2e8f0;
    --admin-divider: #edf2f7;
    --admin-text: #334155;
    --admin-muted: #64748b;
    --admin-heading: #475569;
    --admin-link: #1d4ed8;
    --admin-radius: 10px;
    --admin-padding: 16px;
}

/* Huvudpanel */

.nw-admin {
    width: 100%;
    box-sizing: border-box;
    color: var(--admin-text);
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    overflow: hidden;
    font-size: 14px;
}

/* Rubrikrad */

.nw-admin-header {
    padding: 16px;
    background: var(--admin-header-bg);
    border-bottom: 1px solid var(--admin-border);
    color: var(--admin-heading);
    font-size: 15px;
    font-weight: 700;
}

/* Formulär */

.nw-admin-form {
    padding: var(--admin-padding);
    box-sizing: border-box;
}

.nw-admin-form *,
.nw-admin-form *::before,
.nw-admin-form *::after {
    box-sizing: border-box;
}

/* Aktiv och status */

.nw-admin-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--admin-divider);
}

.nw-admin-active {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--admin-text);
    font-weight: 600;
    cursor: pointer;
}

.nw-admin-active input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--admin-link);
}

.nw-admin-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nw-admin-status label,
.nw-admin-label {
    color: var(--admin-heading);
    font-size: 12px;
    font-weight: 700;
}

/* Fält */

.nw-admin-field {
    margin-bottom: 18px;
}

.nw-admin-label {
    display: block;
    margin-bottom: 6px;
}

.nw-admin-input,
.nw-admin-select,
.nw-admin-textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--admin-border);
    border-radius: 7px;
    background: #ffffff;
    color: var(--admin-text);
    font: inherit;
    outline: none;
    transition: border-color .15s ease,
                box-shadow .15s ease;
}

.nw-admin-select {
    width: auto;
    min-width: 150px;
}

.nw-admin-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.nw-admin-input:focus,
.nw-admin-select:focus,
.nw-admin-textarea:focus {
    border-color: #93b4fd;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .10);
}

/* Knappar */

.nw-admin-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--admin-divider);
}

.nw-admin-submit {
    min-height: 40px;
    padding: 10px 20px;
    border: 1px solid var(--admin-link);
    border-radius: 7px;
    background: var(--admin-link);
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.nw-admin-submit:hover {
    background: #1e40af;
    border-color: #1e40af;
}

/* Mobil */

@media (max-width: 600px) {
    .nw-admin-header {
        padding: 14px;
    }

    .nw-admin-form {
        padding: 14px;
    }

    .nw-admin-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .nw-admin-status {
        width: 100%;
        justify-content: space-between;
    }

    .nw-admin-select {
        flex: 1;
        min-width: 0;
    }

    .nw-admin-actions {
        justify-content: stretch;
    }

    .nw-admin-submit {
        width: 100%;
    }
}

/* =========================================
   KMK – enhetliga och snygga formulärfält
   ========================================= */

.nw-admin .nw-admin-form input[type="text"],
.nw-admin .nw-admin-form input[type="email"],
.nw-admin .nw-admin-form input[type="tel"],
.nw-admin .nw-admin-form input[type="password"],
.nw-admin .nw-admin-form select,
.nw-admin .nw-admin-form textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 11px 13px;

    background-color: #ffffff;
    color: #334155;

    border: 1px solid #cbd5e1;
    border-radius: 8px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;

    box-sizing: border-box;
    box-shadow: none;
    outline: none;

    transition: border-color .2s ease,
                box-shadow .2s ease;
}

/* Textfält och textområde vid fokus */

.nw-admin .nw-admin-form input[type="text"]:focus,
.nw-admin .nw-admin-form input[type="email"]:focus,
.nw-admin .nw-admin-form input[type="tel"]:focus,
.nw-admin .nw-admin-form input[type="password"]:focus,
.nw-admin .nw-admin-form select:focus,
.nw-admin .nw-admin-form textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
    background-color: #ffffff;
}

/* Textområdet */

.nw-admin .nw-admin-form textarea {
    min-height: 130px;
    resize: vertical;
    line-height: 1.6;
}

/* Avstånd mellan fälten */

.nw-admin .nw-admin-field {
    margin: 0 0 20px;
}

/* Etiketter */

.nw-admin .nw-admin-label {
    display: block;
    margin: 0 0 7px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

/* Statusfältet ska inte fylla hela raden */

.nw-admin .nw-admin-status select {
    display: inline-block;
    width: auto;
    min-width: 165px;
    cursor: pointer;
}

/* Checkboxen ska behålla sin normala storlek */

.nw-admin .nw-admin-active input[type="checkbox"] {
    width: 17px;
    height: 17px;
    min-height: 0;
    padding: 0;
    margin: 0;
    accent-color: #1d4ed8;
}

/* Mobil */

@media (max-width: 600px) {
    .nw-admin .nw-admin-form input[type="text"],
    .nw-admin .nw-admin-form input[type="email"],
    .nw-admin .nw-admin-form input[type="tel"],
    .nw-admin .nw-admin-form input[type="password"],
    .nw-admin .nw-admin-form select,
    .nw-admin .nw-admin-form textarea {
        font-size: 16px;
    }

    .nw-admin .nw-admin-status select {
        flex: 1;
        min-width: 0;
    }
}

/* ========================================
   ANVÄNDARLISTA
   ======================================== */

.user-list-panel {
    width: 100%;
    margin: 0 0 18px;
    color: #334155;
    font-size: 13px;
}

.user-list-scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}

.user-list {
    min-width: 1120px;
    width: 100%;
}

.user-list-grid {
    display: grid;
    grid-template-columns:
        34px
        54px
        minmax(145px, 1.5fr)
        75px
        minmax(115px, 1fr)
        minmax(115px, 1fr)
        80px
        70px
        minmax(95px, 1fr)
        72px
        58px
        58px;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
}

.user-list-header {
    min-height: 48px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    font-weight: 700;
}

.user-list-header a {
    color: #334155;
    text-decoration: none;
}

.user-list-header a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.user-sort-name {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.user-sort-name span {
    color: #94a3b8;
}

.user-list-row {
    min-height: 62px;
    border-bottom: 1px solid #edf2f7;
    background: #fff;
}

.user-list-row:last-child {
    border-bottom: 0;
}

.user-list-row:hover {
    background: #f8fafc;
}

.user-list-row > div {
    min-width: 0;
    overflow-wrap: anywhere;
}

.user-list-row a {
    color: #334155;
    text-decoration: none;
}

.user-list-row a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.user-list-number,
.user-list-order {
    text-align: center;
}

.user-list-photo img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #f8fafc;
}

.user-list-name {
    font-weight: 600;
}

.user-list-muted {
    color: #94a3b8;
}

.user-order-select {
    width: 58px;
    max-width: 100%;
    min-height: 36px;
    padding: 5px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #334155;
}

.user-status {
    display: inline-block;
    padding: 4px 7px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    text-align: center;
}

.user-status.is-yes {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.user-status.is-no {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #64748b;
}

.user-list-empty {
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #64748b;
    text-align: center;
}

@media (max-width: 600px) {
    .user-list-scroll {
        border-radius: 8px;
    }
}





/* ========================================
   REDIGERA ANVÄNDARE
   ======================================== */

.user-edit-page {
    width: 100%;
    margin: 0 0 24px;
    color: #334155;
    font-size: 14px;
}

.user-edit-page *,
.user-edit-page *::before,
.user-edit-page *::after {
    box-sizing: border-box;
}

.user-edit-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.user-edit-heading h2 {
    margin: 4px 0 6px;
    color: #1e293b;
    font-size: 22px;
    font-weight: 700;
}

.user-edit-heading p,
.user-ui-card-heading p {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}

.user-edit-eyebrow {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.user-edit-form {
    width: 100%;
    margin: 0;
}

.user-ui-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.user-ui-card-heading {
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #edf2f7;
}

.user-ui-card-heading h3 {
    margin: 0 0 6px;
    color: #334155;
    font-size: 17px;
    font-weight: 700;
}

.user-edit-permissions {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 16px 22px;
}

.user-role-field {
    flex: 1 1 220px;
    max-width: 360px;
}

.user-edit-delete {
    margin-left: auto;
}

.user-edit-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.user-ui-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.user-ui-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 7px;
}

.user-ui-field-full {
    grid-column: 1 / -1;
}

.user-ui-field > label,
.user-ui-label-row > label:first-child {
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

.user-ui-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.user-ui-input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 43px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    color: #1e293b;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: none;
}

.user-ui-input:focus {
    border-color: #60a5fa;
    outline: 2px solid #dbeafe;
    outline-offset: 0;
}

.user-ui-name-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.user-ui-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    color: #475569;
    font-size: 13px;
    cursor: pointer;
}

.user-ui-check input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #1d4ed8;
}

.user-ui-check-small {
    min-height: 24px;
    font-size: 12px;
    font-weight: 400;
}

.user-ui-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #edf2f7;
}

.user-ui-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 15px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.user-ui-button-primary {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #fff;
}

.user-ui-button-primary:hover {
    border-color: #1e40af;
    background: #1e40af;
    color: #fff;
}

.user-ui-button-light {
    border-color: #cbd5e1;
    background: #fff;
    color: #334155;
}

.user-ui-button-light:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    color: #1e293b;
}

.user-ui-button-danger {
    border-color: #fecaca;
    background: #fff;
    color: #b91c1c;
}

.user-ui-button-danger:hover {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #991b1b;
}

.user-edit-bottom-grid {
    display: grid;
    grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.5fr);
    align-items: start;
    gap: 18px;
    margin-top: 18px;
}

.user-photo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

.user-photo-preview img {
    display: block;
    width: 100%;
    max-width: 200px;
    max-height: 240px;
    object-fit: contain;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
}

.user-photo-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 14px;
}

.user-photo-actions .user-ui-button {
    width: 100%;
}

.user-category-add-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.user-category-add-form > .user-ui-button {
    grid-column: 1 / -1;
    justify-self: start;
}

.user-membership-add {
    margin-bottom: 16px;
}

.user-membership-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-membership-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.user-membership-row:hover {
    background: #f8fafc;
}

.user-membership-info {
    min-width: 0;
}

.user-membership-category {
    color: #334155;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.user-membership-title {
    margin-top: 4px;
    color: #64748b;
    overflow-wrap: anywhere;
}

.user-membership-remove {
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .user-edit-contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .user-edit-bottom-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .user-edit-delete {
        margin-left: 0;
    }
}

@media (max-width: 600px) {
    .user-edit-heading {
        align-items: stretch;
        flex-direction: column;
        padding: 16px;
    }

    .user-edit-heading h2 {
        font-size: 20px;
    }

    .user-edit-heading > .user-ui-button {
        width: 100%;
    }

    .user-ui-card {
        padding: 14px;
    }

    .user-ui-fields,
    .user-ui-name-fields,
    .user-category-add-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .user-category-add-form > .user-ui-button {
        grid-column: auto;
        width: 100%;
    }

    .user-edit-permissions {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .user-role-field {
        max-width: none;
    }

    .user-edit-permissions > .user-ui-button,
    .user-edit-delete .user-ui-button {
        width: 100%;
    }

    .user-ui-form-actions .user-ui-button {
        width: 100%;
    }

    .user-membership-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-membership-remove {
        width: 100%;
    }
}



/* ========================================
   LÄGG TILL ANVÄNDARE
   ======================================== */

.user-create-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding: 16px 0 0;
    border-top: 1px solid #e2e8f0;
}

.user-create-actions input[type="submit"] {
    font-family: inherit;
}

@media (max-width: 600px) {
    .user-create-actions {
        flex-direction: column-reverse;
    }

    .user-create-actions .user-ui-button {
        width: 100%;
    }
}




/* ==========================================
   NATTVAKT – DJURGÅRDSHAMNEN
   ========================================== */

.nw-page {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    color: #1e293b;
}

/* Sidhuvud */

.nw-page-hero {
    padding: 26px 30px;
    margin-bottom: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.nw-page-eyebrow,
.nw-admin-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.nw-page-hero h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.25;
    font-weight: 700;
}

.nw-page-hero h1 span {
    color: #2563eb;
}

.nw-page-hero p {
    margin: 9px 0 0;
    color: #64748b;
    font-size: 15px;
}

/* Gemensamma kort */

.nw-admin-card,
.booking-list-panel {
    min-width: 0;
    margin-bottom: 20px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
}

.nw-admin-card-heading {
    margin-bottom: 22px;
}

.nw-admin-card-heading h3,
.booking-list-title h2 {
    margin: 0;
    color: #0f172a;
    font-size: 19px;
    font-weight: 700;
}

.nw-admin-card-heading p,
.booking-list-title p {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

/* Redigera bokning */

.nw-admin {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.nw-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding: 22px 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.nw-admin-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 21px;
}

.nw-admin-date {
    padding: 9px 13px;
    color: #1d4ed8;
    background: #eff6ff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}

.nw-admin-top {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 24px;
}

.nw-admin-active {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.nw-admin-active input,
.nw-admin-check input {
    width: 17px;
    height: 17px;
    accent-color: #2563eb;
}

.nw-admin-status {
    width: 230px;
    max-width: 100%;
}

.nw-admin-status label,
.nw-admin-field label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.nw-admin-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.nw-admin-field {
    min-width: 0;
}

.nw-admin-field-full {
    grid-column: 1 / -1;
}

.nw-admin-input,
.nw-admin-select,
.nw-admin-textarea {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    box-sizing: border-box;
    color: #1e293b;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.nw-admin-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.nw-admin-input:focus,
.nw-admin-select:focus,
.nw-admin-textarea:focus {
    outline: none;
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* Knappar */

.nw-admin-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}

.nw-admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 19px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.2s, border-color 0.2s;
}

.nw-admin-button-primary {
    color: #ffffff;
    background: #2563eb;
    border-color: #2563eb;
}

.nw-admin-button-primary:hover {
    color: #ffffff;
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.nw-admin-button-light {
    color: #334155;
    background: #ffffff;
    border-color: #cbd5e1;
}

.nw-admin-button-light:hover {
    color: #0f172a;
    background: #f1f5f9;
}


/* Nattvaktslistan – behåll ursprunglig tabellkänsla */

.booking-list-panel {
    width: 100%;
    margin: 20px 0;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-sizing: border-box;
}

.booking-list-title {
    margin-bottom: 18px;
}

.booking-list-scroll {
    width: 100%;
    overflow-x: auto;
}

.booking-list {
    width: 100%;
    min-width: 1050px;
    color: #1e293b;
    font-size: 13px;
}

.booking-list-header,
.booking-list-row {
    display: grid;
    grid-template-columns:
        1.1fr
        1.2fr
        0.9fr
        1.6fr
        1fr
        1fr
        1fr;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    box-sizing: border-box;
}

.booking-list-header {
    background: #f1f5f9;
    color: #334155;
    font-weight: 700;
    border-bottom: 1px solid #cbd5e1;
}

.booking-list-header a {
    color: #334155;
    text-decoration: none;
}

.booking-list-header a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.booking-list-row {
    color: #334155;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    text-decoration: none;
}

.booking-list-row:nth-child(even) {
    background: #f8fafc;
}

.booking-list-row:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.booking-list-row > div {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Mobil: behåll kolumnerna och tillåt sidscrollning */
@media (max-width: 700px) {
    .booking-list-panel {
        padding: 12px;
    }

    .booking-list-scroll {
        overflow-x: auto;
    }

    .booking-list {
        min-width: 1050px;
    }

    .booking-list-header,
    .booking-list-row {
        display: grid;
    }

    .booking-list-row > div::before {
        content: none;
    }
}


/* ==========================================
   NATTVAKT – FULLBREDD
   ========================================== */

.nw-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 16px 20px;
    box-sizing: border-box;
}

.nw-admin {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* Rubrik och datum */

.nw-admin-header {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding: 22px 26px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.nw-admin-header h2 {
    margin: 0;
    color: #1e293b;
    font-size: 23px;
}

.nw-admin-date {
    flex-shrink: 0;
}

/* Formulär */

.nw-admin-form {
    width: 100%;
    margin: 0;
}

.nw-admin-card {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 20px;
    padding: 24px 26px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.035);
}

.nw-admin-card-heading {
    margin-bottom: 22px;
}

.nw-admin-card-heading h3 {
    margin: 0;
    color: #1e293b;
    font-size: 19px;
}

.nw-admin-card-heading p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 14px;
}

/* Statusraden */

.nw-admin-top {
    display: flex;
    align-items: flex-end;
    gap: 32px;
    flex-wrap: wrap;
}

.nw-admin-status {
    width: 280px;
    max-width: 100%;
}

/* Medlemsfält – full bredd */

.nw-admin-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 24px;
    width: 100%;
}

.nw-admin-field {
    min-width: 0;
}

.nw-admin-field-full {
    grid-column: 1 / -1;
}

.nw-admin-field label,
.nw-admin-status label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.nw-admin-input,
.nw-admin-select,
.nw-admin-textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    box-sizing: border-box;
    color: #1e293b;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
}

.nw-admin-textarea {
    min-height: 130px;
    resize: vertical;
}

.nw-admin-input:focus,
.nw-admin-select:focus,
.nw-admin-textarea:focus {
    outline: none;
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* Knapprad */

.nw-admin-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 20px;
    padding: 18px 0 0;
    border-top: 1px solid #e2e8f0;
}

.nw-admin-button {
    min-height: 44px;
    padding: 11px 22px;
    box-sizing: border-box;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.nw-admin-button-primary {
    color: #ffffff;
    background: #2563eb;
    border: 1px solid #2563eb;
}

.nw-admin-button-primary:hover {
    background: #1d4ed8;
}

.nw-admin-button-light {
    color: #334155;
    background: #ffffff;
    border: 1px solid #cbd5e1;
}

.nw-admin-button-light:hover {
    background: #f1f5f9;
}

/* Anpassa kolumner efter skärmbredd */

@media (max-width: 1000px) {
    .nw-admin-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .nw-page {
        padding: 10px;
    }

    .nw-admin-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .nw-admin-card {
        padding: 18px;
    }

    .nw-admin-fields {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .nw-admin-field-full {
        grid-column: auto;
    }

    .nw-admin-top {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
    }

    .nw-admin-status {
        width: 100%;
    }

    .nw-admin-actions {
        flex-direction: column-reverse;
    }

    .nw-admin-button {
        width: 100%;
        text-align: center;
    }
}
 
/* Tvinga nattvaktssidan till full tillgänglig bredd */

.nw-page,
.nw-page .nw-admin,
.nw-page .nw-admin-form,
.nw-page .nw-admin-header,
.nw-page .nw-admin-card,
.nw-page .nw-admin-actions {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
}

/* Ta bort eventuella begränsningar på formulärets föräldrar */
body:has(.nw-page) {
    overflow-x: auto;
}

.nw-page {
    margin: 0 !important;
}

/* Om sidans innehåll ligger i en vanlig wrapper */
body:has(.nw-page) #content,
body:has(.nw-page) .content,
body:has(.nw-page) .main,
body:has(.nw-page) .container,
body:has(.nw-page) .mainContent,
body:has(.nw-page) .content-wrapper {
    max-width: none !important;
}
/* ==========================================
   KMK NATTVAKTSKALENDER – FULLBREDD
   ========================================== */

.nw-calendar-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 16px 20px 28px;
    box-sizing: border-box;
    color: #1e293b;
    font-family: Arial, sans-serif;
}

.nw-calendar-page * {
    box-sizing: border-box;
}

.nw-calendar-hero {
    width: 100%;
    margin-bottom: 20px;
    padding: 28px 30px;
    color: #ffffff;
    background: #102b43;
    border-radius: 14px;
}

.nw-calendar-hero h1 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.25;
}

.nw-calendar-hero p {
    margin: 0;
    color: #e8edf1;
    font-size: 15px;
}

.nw-calendar-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #b6a16b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.nw-calendar-panel,
.nw-calendar-info {
    width: 100%;
    margin-bottom: 20px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04);
}

.nw-calendar-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.nw-calendar-section-heading h2,
.nw-calendar-info h2 {
    margin: 0;
    color: #102b43;
    font-size: 21px;
}

.nw-calendar-section-heading p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 14px;
}

/* Kalenderinformation */

.nw-calendar-info {
    display: grid;
    grid-template-columns: minmax(160px, 260px) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
}

.nw-calendar-info-image img {
    display: block;
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    border-radius: 10px;
}

.nw-calendar-info-text p {
    color: #475569;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.nw-calendar-info-date {
    color: #64748b;
    font-size: 13px;
}

/* Månadsval */

.nw-month-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.nw-month-form {
    margin: 0;
}

.nw-month-button {
    min-height: 40px;
    padding: 9px 15px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nw-month-button:hover {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #93c5fd;
}

.nw-month-button.is-selected {
    color: #ffffff;
    background: #2563eb;
    border-color: #2563eb;
}

/* Färgförklaring */

.nw-calendar-legend,
.nw-calendar-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: center;
}

.nw-calendar-legend span,
.nw-calendar-footer span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #475569;
    font-size: 12px;
}

.nw-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 50%;
}

.nw-legend-free {
    background: #27834a;
}

.nw-legend-pending {
    background: #db8b1a;
}

.nw-legend-booked {
    background: #ab020e;
}

/* Sjudagarskalender */

.nw-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}

.nw-weekday {
    padding: 10px 4px;
    color: #475569;
    background: #f1f5f9;
    border-radius: 7px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}

.nw-calendar-empty {
    min-height: 125px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 9px;
}

.nw-calendar-day {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 135px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #dbe3e9;
    border-radius: 9px;
}

.nw-calendar-day-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 9px 10px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.nw-calendar-day-name {
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.nw-calendar-day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 5px;
    color: #102b43;
    background: #ffffff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
}

.nw-calendar-day-content {
    display: flex;
    flex: 1;
    align-items: stretch;
    padding: 7px;
}

.nw-day-form {
    display: flex;
    flex: 1;
    width: 100%;
    min-width: 0;
    margin: 0;
}

.nw-day-booking-button,
.nw-day-free-button {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-width: 0;
    min-height: 76px;
    padding: 9px 6px;
    border: 1px solid transparent;
    border-radius: 7px;
    font: inherit;
    text-align: center;
    cursor: pointer;
    overflow-wrap: anywhere;
    transition: filter 0.15s, transform 0.15s;
}

.nw-day-booking-button:hover,
.nw-day-free-button:hover {
    filter: brightness(0.96);
}

.nw-day-booking-status {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.nw-day-booking-name {
    max-width: 100%;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.nw-day-free-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
}

.nw-day-free-button {
    color: #176238;
    background: #e7f5eb;
    border-color: #b7e0c3;
    font-size: 12px;
    font-weight: 700;
}

.nw-day-free .nw-calendar-day-heading {
    background: #f3fbf5;
}

.nw-day-pending .nw-calendar-day-heading {
    background: #fff5e5;
}

.nw-day-pending .nw-day-booking-button {
    color: #70430a;
    background: #fff0d5;
    border-color: #e9bd72;
}

.nw-day-booked .nw-calendar-day-heading {
    background: #fff0f0;
}

.nw-day-booked .nw-day-booking-button {
    color: #ffffff;
    background: #ab020e;
    border-color: #8f0009;
}

.nw-day-past {
    background: #f8fafc;
}

.nw-day-past .nw-calendar-day-number {
    color: #64748b;
    background: #e2e8f0;
}

.nw-day-past-label {
    align-self: center;
    margin: auto;
    color: #94a3b8;
    font-size: 12px;
}

.nw-calendar-footer {
    padding: 4px 2px 0;
}

/* Responsivt */

@media (max-width: 1000px) {
    .nw-calendar-grid {
        gap: 5px;
    }

    .nw-calendar-day {
        min-height: 120px;
    }

    .nw-calendar-day-heading {
        padding: 7px 5px;
    }

    .nw-calendar-day-content {
        padding: 4px;
    }

    .nw-day-booking-name {
        font-size: 11px;
    }
}

@media (max-width: 650px) {
    .nw-calendar-page {
        padding: 10px;
    }

    .nw-calendar-hero {
        padding: 22px 18px;
    }

    .nw-calendar-panel,
    .nw-calendar-info {
        padding: 14px;
    }

    .nw-calendar-info {
        grid-template-columns: minmax(0, 1fr);
    }

    .nw-calendar-info-image img {
        max-height: 180px;
    }

    .nw-calendar-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 3px;
    }

    .nw-weekday {
        padding: 8px 0;
        font-size: 10px;
    }

    .nw-calendar-empty {
        min-height: 74px;
    }

    .nw-calendar-day {
        min-height: 90px;
        border-radius: 6px;
    }

    .nw-calendar-day-heading {
        flex-direction: column;
        justify-content: center;
        gap: 2px;
        padding: 4px 1px;
    }

    .nw-calendar-day-name {
        font-size: 9px;
    }

    .nw-calendar-day-number {
        min-width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .nw-calendar-day-content {
        padding: 2px;
    }

    .nw-day-booking-button,
    .nw-day-free-button {
        min-height: 52px;
        padding: 4px 2px;
        gap: 4px;
        border-radius: 4px;
    }

    .nw-day-booking-status {
        font-size: 8px;
    }

    .nw-day-booking-name {
        font-size: 9px;
        line-height: 1.2;
    }

    .nw-day-free-button {
        font-size: 9px;
    }

    .nw-day-free-icon {
        width: 18px;
        height: 18px;
        font-size: 14px;
    }

    .nw-calendar-legend {
        gap: 8px;
    }

    .nw-calendar-legend span {
        font-size: 11px;
    }
}

@media print {
    .nw-calendar-page {
        padding: 0;
    }

    .nw-calendar-hero,
    .nw-calendar-panel,
    .nw-calendar-info {
        box-shadow: none;
        break-inside: avoid;
    }

    .nw-month-list {
        display: none;
    }

    .nw-day-booking-button,
    .nw-day-free-button {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* ==========================================
   MODERN HEADER – NATTVAKTSÖVERSIKT
   ========================================== */

.nw-calendar-hero {
    position: relative;
    width: 100%;
    margin: 0 0 22px;
    padding: 28px 32px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(115deg, #102b43 0%, #183e59 100%);
    border: 1px solid #294c64;
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(16, 43, 67, 0.12);
}

.nw-header-content {
    position: relative;
    z-index: 1;
    max-width: 100%;
}

.nw-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.nw-header-accent {
    display: inline-block;
    width: 28px;
    height: 3px;
    background: #c8ae70;
    border-radius: 3px;
}

.nw-header-label {
    color: #d8e3eb;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.nw-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nw-header-main h1 {
    margin: 0 0 9px;
    color: #ffffff;
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.nw-header-main p {
    margin: 0;
    color: #d4e0e8;
    font-size: 15px;
    line-height: 1.5;
}

.nw-header-month {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 9px;
    padding: 15px 19px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 10px;
}

.nw-header-month-label {
    margin-right: 3px;
    color: #d4e0e8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.nw-header-month strong {
    color: #e6cc8b;
    font-size: 17px;
    font-weight: 700;
}

.nw-header-month > span:last-child {
    color: #ffffff;
    font-size: 15px;
}

/* Mobil */

@media (max-width: 650px) {
    .nw-calendar-hero {
        padding: 22px 18px;
        border-radius: 11px;
    }

    .nw-header-brand {
        margin-bottom: 20px;
    }

    .nw-header-label {
        font-size: 10px;
        letter-spacing: 1.4px;
    }

    .nw-header-main {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .nw-header-main h1 {
        font-size: 27px;
    }

    .nw-header-main p {
        font-size: 14px;
    }

    .nw-header-month {
        flex-wrap: wrap;
        padding: 11px 13px;
    }
}

/* Header – blå bakgrund, samma stil som övriga sidor */

.nw-calendar-hero {
    width: 100%;
    margin: 0 0 20px;
    padding: 28px 32px;
    color: #ffffff;
    background: #102b43;
    border: 0;
    border-radius: 14px;
    box-shadow: none;
}

.nw-calendar-hero h1 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: clamp(25px, 3vw, 36px);
    font-weight: 700;
    line-height: 1.3;
}

.nw-calendar-hero p {
    margin: 0;
    color: #e8edf1;
    font-size: 14px;
}

@media (max-width: 650px) {
    .nw-calendar-hero {
        padding: 20px;
    }
}

/* Nattvaktsronder */

.nw-rounds {
    width: 100%;
    min-width: 0;
    margin: 0 0 24px;
    color: #243746;
    font-family: Arial, sans-serif;
}

.nw-rounds-header {
    display: flex;
    align-items: center;
    min-height: 76px;
    margin-bottom: 0;
    padding: 16px 22px;
    color: #ffffff;
    border-color: #3f4669;
    border: 1px solid red;
    border-radius: 9px 9px 0 0;
}

.nw-rounds-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
}

.nw-rounds-header p {
    margin: 5px 0 0;
    color: #e1e5f0;
    font-size: 13px;
}

.nw-rounds-list {
    width: 100%;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e0e5eb;
    
    
border-radius: 9px 9px 0 0;
}

.nw-rounds-columns,
.nw-round-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr)
                           minmax(150px, 1.2fr)
                           minmax(130px, 1fr);
    gap: 16px;
    align-items: center;
    padding: 13px 20px;
}

.nw-rounds-columns {
    color: #4b5563;
    background: #f3f5f8;
    border-bottom: 1px solid #dce2e8;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nw-round-row {
    min-height: 52px;
    border-bottom: 1px solid #e8edf1;
    transition: background 0.15s ease;
}

.nw-round-row:last-child {
    border-bottom: 0;
}

.nw-round-row:hover {
    background: #f7f8fc;
}

.nw-round-cell {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #475569;
    font-size: 14px;
}

.nw-round-name {
    color: #243746;
    font-weight: 600;
}

@media (max-width: 600px) {
    .nw-rounds-header {
        padding: 16px;
    }

    .nw-rounds-header h2 {
        font-size: 19px;
    }

    .nw-rounds-columns {
        display: none;
    }

    .nw-round-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding: 14px 16px;
    }

    .nw-round-cell {
        display: grid;
        grid-template-columns: minmax(105px, 0.8fr) minmax(0, 1.2fr);
        gap: 10px;
        font-size: 14px;
    }

    .nw-round-cell::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 12px;
        font-weight: 600;
    }
}


/* Sticky KMK-meny */

.kmk-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Profilbild */

.kmk-nav-profile {
    display: block;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.65);
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
}

.kmk-nav-profile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.kmk-nav-profile:hover {
    border-color: #ffffff;
}

.kmk-nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kmk-nav-user form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

@media (max-width: 480px) {
    .kmk-nav-user {
        width: 100%;
        flex-wrap: wrap;
    }

    .kmk-nav-user form {
        flex: 1;
        min-width: 0;
        flex-wrap: wrap;
    }
}

/* ==========================================
   KMK – gemensam stil för startsida
   ========================================== */

.nw-calendar-page,
.nw-calendar-page * {
    box-sizing: border-box;
}

.nw-calendar-page {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    color: #273047;
    font-family: inherit;
}

/* Sidhuvud */

.nw-page-hero {
    margin: 0 0 24px;
    padding: 26px 30px;
    color: #fff;
    background: linear-gradient(135deg, #3f4669, #505982);
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(31, 41, 71, .12);
}

.nw-page-eyebrow {
    margin-bottom: 8px;
    color: #dce2f5;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.nw-page-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.25;
    font-weight: 700;
}

.nw-page-hero h1 span {
    color: #dce2f5;
}

.nw-page-hero p {
    margin: 9px 0 0;
    color: #eef0f8;
    font-size: 15px;
    line-height: 1.6;
}

/* Gemensamma paneler */

 
.nightwatch-panel {
    width: 48%;
    max-width: 900px;
float:left;position:relative;display:block;
    margin: 20px 0;
    font-family: inherit;
    color: #1f2937;
    box-sizing: border-box;
}
.kmk-calendar {
    width: 100%;
    min-width: 0;
    margin: 0 0 24px;
    padding: 24px;
    color: #273047;
    background: #fff;
    border: 1px solid #e0e4ee;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(31, 41, 71, .06);
}

/* Panelrubriker */

.nw-heading,
.kmk-calendar-header {
    margin: 0 0 18px;
}

.nw-heading h2,
.kmk-calendar-header h2 {
    margin: 0 0 7px;
    color: #3f4669;
    font-size: 23px;
    line-height: 1.35;
    font-weight: 700;
}

.nw-heading p,
.kmk-calendar-intro {
    margin: 0;
    color: #647087;
    font-size: 14px;
    line-height: 1.7;
}

/* Ronderingarnas verktygsrad */

.nw-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #f5f6fa;
    border: 1px solid #e4e7f0;
    border-radius: 10px;
}

.nw-toggle,
.nw-update {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.nw-toggle {
    color: #3f4669;
    background: #e8ebf5;
}

.nw-toggle:hover {
    color: #293252;
    background: #dce1f1;
}

.nw-update {
    color: #fff;
    background: #3f4669;
}

.nw-update:hover {
    color: #fff;
    background: #303754;
}

.nw-icon {
    font-size: 17px;
}

/* Ronderingslistan */

.nw-list {
    width: 100%;
    min-width: 0;
}

.nw-row {
    display: grid;
    grid-template-columns: 1.3fr 1.1fr 1fr .7fr 1.2fr;
    gap: 12px;
    align-items: center;
    padding: 13px 12px;
    border-bottom: 1px solid #edf0f5;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.nw-row:last-child {
    border-bottom: 0;
}

.nw-labels {
    color: #5b6480;
    background: #f5f6fa;
    border: 1px solid #e4e7f0;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.nw-name {
    color: #303957;
    font-weight: 650;
}

.nw-value {
    color: #536078;
}

.nw-empty {
    padding: 24px 16px;
    color: #647087;
    background: #f8f9fc;
    border: 1px dashed #d7dce8;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
}

/* Kalender */

.kmk-calendar {
    max-width: none;
}

.kmk-calendar-feature {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 22px;
}

.kmk-calendar-feature img {
    display: block;
    width: 38%;
    max-width: 300px;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.kmk-calendar-month {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 16px;
    color: #3f4669;
    background: #f5f6fa;
    border: 1px solid #e1e5ef;
    border-radius: 10px;
}

.kmk-calendar-month a {
    color: #3f4669;
    font-weight: 700;
    text-decoration: none;
}

.kmk-calendar-month a:hover {
    text-decoration: underline;
}

.kmk-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0 0 16px;
    color: #647087;
    font-size: 12px;
}

.kmk-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.kmk-legend-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 3px;
}

.kmk-legend-free {
    background: #dcfce7;
    border: 1px solid #86efac;
}

.kmk-legend-booked {
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

.kmk-legend-past {
    background: #e9ecf3;
    border: 1px solid #cbd2e1;
}

.kmk-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.kmk-calendar-weekday {
    padding: 8px 2px;
    color: #647087;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.kmk-calendar-empty {
    min-height: 78px;
    background: #f7f8fb;
    border: 1px solid #edf0f5;
    border-radius: 9px;
}

.kmk-calendar-day {
    min-width: 0;
    min-height: 92px;
    padding: 8px 5px;
    overflow: hidden;
    border: 1px solid #e0e4ee;
    border-radius: 9px;
    text-align: center;
}

.kmk-calendar-day-number {
    display: block;
    margin-bottom: 8px;
    color: #303957;
    font-size: 13px;
    font-weight: 700;
}

.kmk-day-free {
    background: #f0fdf4;
    border-color: #86efac;
}

.kmk-day-booked {
    background: #fef2f2;
    border-color: #fca5a5;
}

.kmk-day-past {
    background: #f5f6fa;
    border-color: #e0e4ee;
}

.kmk-day-action {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 7px 3px;
    border: 0;
    border-radius: 6px;
    font: inherit;
    font-size: 11px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.kmk-day-free .kmk-day-action {
    color: #166534;
    background: #dcfce7;
}

.kmk-day-free .kmk-day-action:hover {
    background: #bbf7d0;
}

.kmk-day-booked .kmk-day-action {
    color: #991b1b;
    background: #fee2e2;
}

.kmk-day-past .kmk-day-action {
    color: #59647c;
    background: #e6e9f1;
    cursor: default;
}

.kmk-calendar-day form {
    margin: 0;
}

/* Surfplatta och mobil */

@media (max-width: 900px) {
    .nw-calendar-page {
        padding: 14px;
    }

    .nw-row {
        grid-template-columns: 1.2fr 1fr 1fr .7fr;
    }

    .nw-row > :nth-child(5) {
        grid-column: 1 / -1;
    }

    .nw-labels > :nth-child(5) {
        display: none;
    }
}

@media (max-width: 650px) {
    .nw-calendar-page {
        padding: 8px;
    }

    .nw-page-hero {
        padding: 20px;
        margin-bottom: 16px;
        border-radius: 11px;
    }

 
    .kmk-calendar {
        padding: 14px;
        margin-bottom: 16px;
        border-radius: 11px;
    }

    .nw-heading h2,
    .kmk-calendar-header h2 {
        font-size: 20px;
    }

    .nw-toolbar {
        align-items: stretch;
    }

    .nw-toggle,
    .nw-update {
        flex: 1 1 auto;
    }

    .nw-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 7px 12px;
        padding: 12px 8px;
        font-size: 12px;
    }

    .nw-labels {
        display: none;
    }

    .nw-row > :nth-child(5) {
        grid-column: auto;
    }

    .nw-row > div::before {
        display: block;
        margin-bottom: 3px;
        color: #778098;
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
    }

    .nw-row .nw-name::before {
        content: "Namn";
    }

    .nw-row .nw-place::before {
        content: "Plats";
    }

    .nw-row .nw-date::before {
        content: "Datum";
    }

    .nw-row .nw-time::before {
        content: "Tid";
    }

    .nw-row .nw-ip::before {
        content: "IP-adress";
    }

    .kmk-calendar-feature {
        flex-direction: column;
        gap: 12px;
    }

    .kmk-calendar-feature img {
        width: 100%;
        max-width: 100%;
    }

    .kmk-calendar-grid {
        gap: 4px;
    }

    .kmk-calendar-weekday {
        padding: 6px 0;
        font-size: 9px;
    }

    .kmk-calendar-empty {
        min-height: 48px;
    }

    .kmk-calendar-day {
        min-height: 76px;
        padding: 5px 2px;
        border-radius: 7px;
    }

    .kmk-calendar-day-number {
        margin-bottom: 6px;
        font-size: 10px;
    }

    .kmk-day-action {
        padding: 6px 1px;
        font-size: 10px;
    }

    .kmk-calendar-month {
        padding: 11px;
        font-size: 13px;
    }
}

/* Deltagaruppgifter – KMK */

.nw-participants {
    min-width: 0;
}

.nw-participant-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.nw-participant {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 18px;
    background: #f7f9fc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    min-width: 0;
}

.nw-participant-number {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 0 0 150px;
}

.nw-participant-label {
    color: #64748b;
    font-size: 12px;
}

.nw-participant-number strong {
    color: #1e293b;
    font-size: 15px;
}

.nw-participant-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.nw-participant-name {
    color: #1e293b;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.nw-participant-email {
    color: #2563eb;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.nw-participant-email:hover {
    text-decoration: underline;
}

.nw-participant-empty {
    padding: 18px;
    color: #64748b;
    background: #f7f9fc;
    border-radius: 12px;
}

@media (max-width: 600px) {
    .nw-participant {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px;
    }

    .nw-participant-number {
        flex-basis: auto;
    }
}

.nw-print-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 22px;
    border: 1px solid #24476b;
    border-radius: 10px;
    background: linear-gradient(135deg, #24476b, #142b46);
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 10px rgba(15, 35, 60, 0.16);
    cursor: pointer;
    transition: background 0.2s ease,
                box-shadow 0.2s ease,
                transform 0.2s ease;
}

.nw-print-button:hover {
    background: linear-gradient(135deg, #315b85, #1c3b5d);
    box-shadow: 0 6px 14px rgba(15, 35, 60, 0.22);
    transform: translateY(-1px);
}

.nw-print-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(15, 35, 60, 0.15);
}

.nw-print-button:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

#kmk-survey .contact-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

#kmk-survey .contact-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

#kmk-survey .contact-field label {
  font-weight: 700;
  color: var(--navy);
}

#kmk-survey .contact-field input {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #cbd4db;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

#kmk-survey .contact-field input:focus {
  outline: 3px solid #d9c78f;
  outline-offset: 2px;
  border-color: var(--gold);
}

@media (max-width: 600px) {
  #kmk-survey .contact-fields {
    grid-template-columns: 1fr;
  }
}

/* Deltagarlista – kompakt tabellayout */
.nw-participants .nw-participant {
    display: grid;
    grid-template-columns: 150px minmax(180px, 1fr) minmax(220px, 1.2fr);
    gap: 16px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e9ed;
    font-weight: 400;
    font-size: 14px;
}

.nw-participants .nw-participant-header {
    padding-top: 9px;
    padding-bottom: 9px;
    background: #f5f7f8;
    border-top: 1px solid #dfe5e9;
    border-bottom: 1px solid #dfe5e9;
    color: #667582;
    font-size: 12px;
    font-weight: 600;
}

.nw-participants .nw-participant:not(.nw-participant-header) {
    background: #fff;
}

.nw-participants .nw-participant-email {
    color: #243746;
    text-decoration: none;
    overflow-wrap: anywhere;
    font-weight: 400;
}

.nw-participants .nw-participant-email:hover {
    text-decoration: underline;
}

@media (max-width: 650px) {
    .nw-participants .nw-participant {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .nw-participants .nw-participant-header {
        display: none;
    }
}

@media print {
    /* Dölj allt utom deltagarlistan */
    body * {
        visibility: hidden !important;
    }

    .nw-participants,
    .nw-participants * {
        visibility: visible !important;
    }

    .nw-participants {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: #fff !important;
    }

    .nw-participants h2 {
        color: #000 !important;
        font-size: 20px !important;
        margin-bottom: 16px !important;
    }

    .nw-participant-actions,
    .nw-participants .muted {
        display: none !important;
    }

    .nw-participants .nw-participant {
        display: grid !important;
        grid-template-columns: 130px 1fr 1.2fr !important;
        gap: 12px !important;
        padding: 7px 5px !important;
        border-bottom: 1px solid #ccc !important;
        color: #000 !important;
        font-size: 11px !important;
        break-inside: avoid;
    }

    .nw-participants .nw-participant-header {
        display: grid !important;
        background: #eee !important;
        border-top: 1px solid #999 !important;
        font-weight: 600 !important;
    }

    .nw-participants .nw-participant-email {
        color: #000 !important;
        text-decoration: none !important;
    }

    @page {
        size: A4 portrait;
        margin: 15mm;
    }
}
