/* ========================================================================
   W2MG – Sagsbestillingsportal
   ======================================================================== */

/* ── Reset / base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }

body.pb-body {
    margin: 0;
    padding: 0;
    background: #f4f5f7;
    color: #1a1a2e;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.55;
    min-height: 100vh;
}

a { color: #1a6fc4; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.pb-wrap {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.pb-main {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.pb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 1.5rem;
    background: #1a2842;
    color: #fff;
    flex-wrap: wrap;
}

.pb-header__left { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pb-header__right { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.pb-header__site { font-weight: 700; font-size: 1.05rem; }
.pb-header__sep { opacity: .4; }
.pb-header__user { font-size: .9rem; color: rgba(255,255,255,.8); }

.pb-back-link { color: rgba(255,255,255,.85); font-size: .9rem; }
.pb-back-link:hover { color: #fff; text-decoration: none; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.pb-footer {
    background: #1a2842;
    color: rgba(255,255,255,.5);
    text-align: center;
    padding: .75rem 1rem;
    font-size: .82rem;
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.pb-badge {
    display: inline-block;
    background: rgba(255,255,255,.15);
    border-radius: 3px;
    padding: .1em .5em;
    font-size: .78rem;
    vertical-align: middle;
}
.pb-badge--admin { background: #e67e22; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.pb-btn {
    display: inline-block;
    padding: .55rem 1.1rem;
    border: none;
    border-radius: 5px;
    font-size: .92rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.3;
    white-space: nowrap;
    transition: background .15s, opacity .15s;
}
.pb-btn:hover { text-decoration: none; opacity: .88; }
.pb-btn--primary  { background: #1a6fc4; color: #fff; }
.pb-btn--secondary { background: #e8f0fb; color: #1a6fc4; }
.pb-btn--ghost    { background: transparent; border: 1px solid rgba(255,255,255,.35); color: rgba(255,255,255,.9); }
.pb-btn--ghost.pb-btn--sm { background: transparent; border: 1px solid #ccc; color: #555; }
.pb-btn--danger   { background: #e74c3c; color: #fff; }
.pb-btn--sm  { padding: .35rem .8rem; font-size: .84rem; }
.pb-btn--lg  { padding: .7rem 1.6rem; font-size: 1rem; }
.pb-btn--xs  { padding: .2rem .5rem; font-size: .78rem; }
.pb-btn--full { width: 100%; text-align: center; }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.pb-alert {
    padding: .75rem 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    font-size: .93rem;
}
.pb-alert--error   { background: #fde8e8; border-left: 4px solid #e74c3c; color: #7b1a1a; }
.pb-alert--success { background: #e6f7ee; border-left: 4px solid #27ae60; color: #1a5c3a; }
.pb-alert--info    { background: #e8f0fb; border-left: 4px solid #1a6fc4; color: #1a3a5c; }

/* Låst/bekræftet-notifikation */
.pb-locked-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff8e1;
    border: 1px solid #f4c542;
    border-left: 4px solid #f4c542;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #5a4200;
    line-height: 1.55;
}
.pb-locked-notice__icon { flex-shrink: 0; margin-top: 2px; color: #c49a00; }
.pb-locked-notice strong { display: block; margin-bottom: 4px; font-size: 15px; }

/* Status-badges i sagsoversigt */
.pb-status-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.pb-status-badge--confirmed { background: #d1fae5; color: #065f46; }
.pb-status-badge--pending   { background: #dbeafe; color: #1e40af; }
.pb-status-badge--created   { background: #fef3c7; color: #92400e; }

/* Forklarende info-boks (ikke-låste sager) */
.pb-info-notice {
    background: #f0f6ff;
    border: 1px solid #bdd5f5;
    border-left: 4px solid #4a90d9;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 13.5px;
    color: #1a3a5c;
    line-height: 1.55;
}
.pb-info-notice p { margin: 0 0 6px; }
.pb-info-notice p:last-child { margin-bottom: 0; }

/* ── Login ───────────────────────────────────────────────────────────────── */
.pb-login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
    background: #f4f5f7;
}

.pb-login-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,.1);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
}

.pb-login-header { text-align: center; margin-bottom: 2rem; }

/* Weto brand-header */
.pb-login-header .w2mg-brand { padding: 16px 0 8px; }
.pb-login-header .w2mg-brand-name {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f2540;
    line-height: 1;
    margin: 0 0 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.pb-login-header .w2mg-brand-name span { color: #5b8db8; }
.pb-login-header .w2mg-brand-sub {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pb-login-intro { font-size: .92rem; color: #555; margin-bottom: 1.1rem; }
.pb-login-help { margin-top: 1.25rem; text-align: center; font-size: .84rem; color: #888; }

/* ── Form elements ───────────────────────────────────────────────────────── */
.pb-field { margin-bottom: 1.1rem; }
.pb-field label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .92rem; color: #2c3e50; }
.pb-optional { font-weight: 400; color: #94a3b8; font-size: .85rem; margin-left: 4px; }

.pb-input, .pb-select, .pb-textarea {
    width: 100%;
    padding: .55rem .75rem;
    border: 1.5px solid #d1d9e0;
    border-radius: 5px;
    font-size: .93rem;
    font-family: inherit;
    color: #1a1a2e;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.pb-input:focus, .pb-select:focus, .pb-textarea:focus {
    outline: none;
    border-color: #1a6fc4;
    box-shadow: 0 0 0 3px rgba(26,111,196,.12);
}
.pb-input--sm { width: auto; max-width: 240px; }
.pb-textarea { resize: vertical; min-height: 80px; }
.pb-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2.2rem; }
.pb-field__hint { font-size: .82rem; color: #666; margin-top: .3rem; }
.pb-field__hint--error { color: #c0392b; font-weight: 600; }
.pb-input--invalid { border-color: #c0392b !important; box-shadow: 0 0 0 2px rgba(192,57,43,.15) !important; }

.pb-field-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.pb-field-row .pb-field { flex: 1; min-width: 140px; }
.pb-field--half { flex: 0 0 calc(50% - .5rem); min-width: 140px; }
.pb-field--quarter { flex: 0 0 120px; min-width: 80px; }

.pb-form--readonly .pb-input,
.pb-form--readonly .pb-select,
.pb-form--readonly .pb-textarea {
    background: #f9f9f9;
    color: #555;
    cursor: not-allowed;
}

/* ── Fieldset ────────────────────────────────────────────────────────────── */
.pb-fieldset {
    border: 1.5px solid #e0e7ef;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.pb-fieldset legend {
    font-weight: 700;
    font-size: 1rem;
    color: #1a2842;
    padding: 0 .5rem;
}

/* ── Form layout (two columns) ───────────────────────────────────────────── */
.pb-form-layout { display: flex; gap: 2rem; align-items: flex-start; flex-wrap: wrap; }
.pb-form-col--main { flex: 1; min-width: 280px; }
.pb-form-col--side { flex: 0 0 280px; min-width: 240px; }

.pb-page-title { font-size: 1.5rem; margin: 0 0 1.25rem; color: #1a2842; }

.pb-form-actions { display: flex; gap: 1rem; align-items: center; margin-top: .5rem; flex-wrap: wrap; }
.pb-autosave-status { font-size: .85rem; font-weight: 600; padding: .35rem .8rem; border-radius: 20px; opacity: 0; pointer-events: none; transition: opacity .25s; }
.pb-autosave-status:not(:empty) { opacity: 1; }
.pb-autosave--saving { background: #f0f0f0; color: #666; }
.pb-autosave--saved  { background: #27ae60; color: #fff; }
.pb-autosave--error  { background: #e74c3c; color: #fff; }

/* ── Status card (side panel) ────────────────────────────────────────────── */
.pb-status-card {
    background: #fff;
    border-radius: 8px;
    border: 1.5px solid #e0e7ef;
    padding: 1.25rem 1.5rem;
    position: sticky;
    top: 1rem;
}
.pb-status-card h3 { margin: 0 0 .5rem; font-size: .95rem; color: #1a2842; }
.pb-pm-confirmed { margin: .4rem 0 0; font-size: .9rem; color: #0c5460; }
.pb-admin-notes { background: #fffde7; border-left: 3px solid #f0c03a; padding: .5rem .75rem; border-radius: 3px; font-size: .9rem; }
.pb-case-ref { font-size: 1.1rem; font-weight: 700; margin: 0; }
/* ── Aktivitetslog (tidslinje) ───────────────────────────────────────────── */
.pb-log-section { margin: 2rem 1.5rem 0; padding-top: 1.5rem; border-top: 1px solid #e0e7ef; }
.pb-log-title { font-size: .95rem; font-weight: 700; color: #1a2842; margin: 0 0 1rem; }

.pb-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.pb-timeline::before { content: ''; position: absolute; left: 16px; top: 8px; bottom: 8px; width: 2px; background: #dde3ef; }

.pb-timeline__item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; position: relative; }

.pb-timeline__dot {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.pb-timeline__body { flex: 1; min-width: 0; padding-top: 5px; }
.pb-timeline__label { font-size: .82rem; font-weight: 700; display: block; }
.pb-timeline__desc { font-size: .78rem; color: #555; display: block; margin-top: 2px; word-break: break-word; }

.pb-timeline__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding-top: 5px; flex-shrink: 0; }
.pb-timeline__author { font-size: .76rem; font-weight: 600; color: #1a2842; }
.pb-timeline__time { font-size: .72rem; color: #888; white-space: nowrap; }

/* ── Status pills ────────────────────────────────────────────────────────── */
.pb-status {
    display: inline-block;
    padding: .2em .65em;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
}
.pb-status--lg { font-size: 1rem; padding: .35em 1em; }
.pb-status--created   { background: #d1ecf1; color: #0c5460; }
.pb-status--confirmed { background: #d4edda; color: #155724; }
.pb-status--cancelled { background: #f8d7da; color: #721c24; }

/* ── Progress bars ───────────────────────────────────────────────────────── */
.pb-progress-bar {
    height: 8px;
    background: #e0e7ef;
    border-radius: 4px;
    overflow: hidden;
    margin: .4rem 0;
}
.pb-progress-bar__fill { height: 100%; border-radius: 4px; transition: width .3s; background: #1a6fc4; }
.pb-progress-bar__fill--good    { background: #27ae60; }
.pb-progress-bar__fill--partial { background: #f39c12; }
.pb-progress-bar__fill--low     { background: #e74c3c; }

.pb-progress-label { margin: 0; font-size: .85rem; color: #555; }

.pb-progress-sm { width: 80px; height: 6px; background: #e0e7ef; border-radius: 3px; overflow: hidden; display: inline-block; vertical-align: middle; }
.pb-progress-sm__bar { height: 100%; border-radius: 3px; }
.pb-progress-sm__bar--good    { background: #27ae60; }
.pb-progress-sm__bar--partial { background: #f39c12; }
.pb-progress-sm__bar--low     { background: #e74c3c; }

/* ── Sections ────────────────────────────────────────────────────────────── */
.pb-section { margin-bottom: 2rem; }
.pb-case-filter { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pb-case-filter select { min-width: 180px; }
.pb-filter-result { font-size: .85rem; }
.pb-section__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a2842;
    border-bottom: 2px solid #e0e7ef;
    padding-bottom: .5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.pb-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6em;
    height: 1.6em;
    background: #e0e7ef;
    border-radius: 50%;
    font-size: .8rem;
    font-weight: 700;
    color: #333;
}

/* ── Capacity table ──────────────────────────────────────────────────────── */
.pb-cap-table-wrap {
    overflow: auto;
    background: #fff;
    border: 1.5px solid #e0e7ef;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.pb-cap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}
.pb-cap-table th {
    padding: .5rem .75rem;
    background: #f0f4f9;
    font-size: .82rem;
    font-weight: 700;
    color: #333;
    text-align: left;
    border-bottom: 2px solid #e0e7ef;
    white-space: nowrap;
}
.pb-cap-table td {
    padding: .42rem .75rem;
    border-bottom: 1px solid #eef0f4;
    vertical-align: middle;
    white-space: nowrap;
}
.pb-cap-month-row td {
    background: #f0f4f9;
    font-weight: 700;
    font-size: .78rem;
    color: #445;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .55rem .75rem .3rem;
    border-top: 2px solid #dde3ec;
    border-bottom: none;
}
.pb-cap-row--free { background: #fff; }
.pb-cap-row--busy { background: #fffdf4; }
.pb-cap-row--full { background: #fff8f8; }
.pb-cap-row--free:hover td,
.pb-cap-row--busy:hover td,
.pb-cap-row--full:hover td { background: #f5f8fd; }
.pb-cap-row--clickable { cursor: pointer; }
.pb-cap-row--open td { background: #eef4fb !important; }
.pb-cap-table tr:last-child td { border-bottom: none; }
.pb-cap-toggle-col { width: 28px; text-align: center; padding-right: .5rem !important; }
.pb-cap-toggle-icon { display: inline-block; color: #2271b1; font-size: .65rem; user-select: none; transition: transform .15s; }
.pb-cap-expand-row td { padding: 0 !important; border-bottom: 2px solid #bed3ee !important; white-space: normal; }
.pb-cap-expand-row.pb-hidden { display: none; }
.pb-cap-expand-wrap { border-left: 3px solid #2271b1; background: #f4f8fd; }
.pb-cap-case-row {
    display: grid;
    grid-template-columns: 12rem 1fr 1fr 1fr 7rem 3rem;
    align-items: center;
    gap: .25rem 1.25rem;
    padding: .65rem 1rem;
    border-bottom: 1px solid #e0eaf5;
    text-decoration: none;
    color: inherit;
    font-size: .87rem;
    transition: background .12s;
}
.pb-cap-case-row:last-child { border-bottom: none; }
.pb-cap-case-row:hover { background: #eaf1fb; text-decoration: none; }
.pb-cap-case-main { display: flex; flex-direction: column; gap: .1rem; }
.pb-cap-case-num { font-weight: 700; color: #1a2842; }
.pb-cap-case-customer { color: #555; font-size: .82rem; }
.pb-cap-case-col { display: flex; flex-direction: column; gap: .05rem; }
.pb-cap-case-label { font-size: .72rem; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: .04em; }
.pb-cap-case-status { display: flex; align-items: center; }
.pb-cap-case-open { color: #2271b1; font-weight: 600; white-space: nowrap; font-size: .82rem; text-align: right; }
.pb-cap-case-empty { padding: .65rem 1rem; font-size: .87rem; color: #888; }

.pb-cap-week-num strong { font-size: .9rem; color: #1a2842; }
.pb-cap-holiday { font-size: .78rem; color: #c0392b; cursor: help; margin-left: .25rem; }
.pb-cap-dates { color: #666; font-size: .82rem; }
.pb-cap-cases { font-variant-numeric: tabular-nums; }
.pb-cap-days  { font-variant-numeric: tabular-nums; color: #555; }
.pb-cap-bar-col { min-width: 150px; }
.pb-cap-bar {
    height: 7px;
    background: #e0e7ef;
    border-radius: 4px;
    overflow: hidden;
    display: inline-block;
    width: 80px;
    vertical-align: middle;
    margin-right: .45rem;
}
.pb-cap-bar__fill { height: 100%; border-radius: 4px; transition: width .2s; }
.pb-cap-bar__fill--free { background: #27ae60; }
.pb-cap-bar__fill--busy { background: #f39c12; }
.pb-cap-bar__fill--full { background: #e74c3c; }
.pb-cap-tag {
    display: inline-block;
    padding: .1em .45em;
    border-radius: 3px;
    font-size: .75rem;
    font-weight: 700;
    vertical-align: middle;
}
.pb-cap-tag--full { background: #fde8e8; color: #c0392b; }
.pb-cap-tag--busy { background: #fff3cd; color: #856404; }

/* ── Cases table ─────────────────────────────────────────────────────────── */
.pb-cases-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1.5px solid #e0e7ef;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.pb-cases-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
.pb-cases-table th, .pb-cases-table td {
    padding: .7rem .9rem;
    border-bottom: 1px solid #e8edf2;
    text-align: left;
    vertical-align: middle;
}
.pb-cases-table th { background: #f0f4f9; font-weight: 700; font-size: .85rem; color: #333; }
.pb-cases-table a { text-decoration: none; }
.pb-cases-table a:hover { text-decoration: none; }
.pb-cases-table tr:hover td { background: #f9fbfd; }
.pb-cases-table tr:last-child td { border-bottom: none; }

.pb-empty { text-align: center; padding: 3rem 1rem; color: #666; }
.pb-empty p { margin-bottom: 1rem; }
.pb-muted { color: #888; }

/* ── Service items ───────────────────────────────────────────────────────── */
.pb-service-item {
    background: #f8fafc;
    border: 1px solid #e0e7ef;
    border-radius: 6px;
    padding: .75rem 1rem;
    margin-bottom: .6rem;
}
.pb-service-label { display: flex; gap: .6rem; cursor: pointer; }
.pb-service-label input[type="checkbox"] { margin-top: .1em; flex-shrink: 0; }
.pb-service-hint { font-size: .82rem; color: #888; margin-left: auto; }
.pb-service-desc { margin-top: .5rem; padding-top: .5rem; border-top: 1px solid #e0e7ef; }
.pb-service-desc label { font-size: .82rem; color: #555; margin-bottom: .3rem; display: block; }
.pb-hidden { display: none; }

/* ── DAWA autocomplete ───────────────────────────────────────────────────── */
.pb-autocomplete-wrap { position: relative; }
.pb-autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #1a6fc4;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.pb-autocomplete-list:empty { display: none; }
.pb-autocomplete-item {
    padding: .55rem .85rem;
    cursor: pointer;
    font-size: .9rem;
    border-bottom: 1px solid #f0f0f0;
}
.pb-autocomplete-item:last-child { border-bottom: none; }
.pb-autocomplete-item:hover, .pb-autocomplete-item.is-active { background: #e8f0fb; }

/* ── Files section ───────────────────────────────────────────────────────── */
.pb-files-section { margin-top: 2rem; }
.pb-file-guidance { background: #f0f4ff; border-left: 3px solid #4a6cf7; padding: .75rem 1rem; margin-bottom: 1rem; border-radius: 0 6px 6px 0; font-size: .9rem; line-height: 1.5; color: #333; }
.pb-file-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .75rem;
    background: #f8fafc;
    border: 1px solid #e0e7ef;
    border-radius: 5px;
    margin-bottom: .4rem;
}
.pb-file-icon { display:flex; align-items:center; flex-shrink: 0; line-height:1; }
.pb-file-name { flex: 1; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-file-label-input { width: 160px; flex-shrink: 0; font-size: .82rem !important; padding: .2rem .5rem !important; }
.pb-file-label-text { font-size: .82rem; color: #666; font-style: italic; }
.pb-upload-area { display: flex; gap: .75rem; align-items: center; margin-top: .75rem; flex-wrap: wrap; }
.pb-upload-area--disabled { opacity: .6; }
.pb-upload-area--disabled button[disabled] { cursor: not-allowed; }
#pb-upload-progress { margin-top: .75rem; }
#pb-upload-status { font-size: .85rem; color: #555; margin-left: .5rem; }

/* ── Manglende felter / checkliste ───────────────────────────────────────── */
.pb-checklist-ok {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #1a7a3f;
    font-size: .9rem;
    font-weight: 600;
    padding: .5rem 0;
}
.pb-checklist-intro {
    font-size: .85rem;
    color: #555;
    margin: .25rem 0 .4rem;
}
.pb-missing-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.pb-missing-list li {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .88rem;
    color: #7b1a1a;
    padding: .2rem 0;
    border-bottom: 1px solid #fde8e8;
}
.pb-missing-list li:last-child { border-bottom: none; }

.pb-check-icon { font-style: normal; font-weight: 700; flex-shrink: 0; }
.pb-check-icon--ok      { color: #27ae60; font-size: 1.1em; }
.pb-check-icon--missing { color: #e74c3c; font-size: 1em; }

/* ── Tegningsadvarsel ─────────────────────────────────────────────────────── */
.pb-drawings-warning {
    display: flex;
    gap: .65rem;
    align-items: flex-start;
    background: #fff8e1;
    border: 1.5px solid #f0c040;
    border-radius: 6px;
    padding: .75rem;
    margin-top: 1.25rem;
}
.pb-drawings-warning strong { display: block; color: #7a5800; font-size: .9rem; }
.pb-drawings-warning p { margin: .2rem 0 0; font-size: .82rem; color: #7a5800; }
.pb-warn-icon { font-size: 1.4rem; color: #e0a000; flex-shrink: 0; line-height: 1; }

.pb-drawings-ok {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #1a7a3f;
    font-size: .88rem;
    margin-top: 1.25rem;
}

/* ── Dashboard info-indikator ────────────────────────────────────────────── */
.pb-info-ok      { color: #1a7a3f; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.pb-info-missing { color: #b05a00; font-size: .85rem; font-weight: 600; white-space: nowrap; }

/* ── Tegningsindikator i sagsoversigt ────────────────────────────────────── */
.pb-files-ok,
.pb-files-missing {
    display: inline-flex;
    align-items: center;
    gap: .3em;
    font-size: .85rem;
    white-space: nowrap;
}
.pb-files-ok      { color: #1a7a3f; }
.pb-files-missing { color: #aaa; }

.pb-file-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ── Week full option ────────────────────────────────────────────────────── */
option.pb-week-full { color: #c0392b; font-style: italic; }

/* ── Hint colors ─────────────────────────────────────────────────────────── */
.pb-hint--warn { color: #8a6200; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .pb-form-layout { flex-direction: column; }
    .pb-form-col--side { flex: 1 1 auto; position: static; }
    .pb-status-card { position: static; }
    .pb-field--half, .pb-field--quarter { flex: 1 1 100%; }
    .pb-header { padding: .6rem 1rem; }

    /* Kapacitetstabel: scroll vandret — alle kolonner synlige */
    .pb-cap-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .pb-cap-bar { min-width: 60px; }

    /* Sagstabel → kortvisning */
    .pb-cases-table-wrap { overflow-x: visible; border: none; box-shadow: none; background: transparent; }
    .pb-cases-table { font-size: .88rem; }
    .pb-cases-table thead { display: none; }
    .pb-cases-table tbody tr {
        display: block;
        background: #fff;
        border: 1.5px solid #e0e7ef;
        border-radius: 8px;
        margin-bottom: 10px;
        padding: 2px 0;
        box-shadow: 0 1px 4px rgba(0,0,0,.05);
    }
    .pb-cases-table tbody tr:hover td { background: transparent; }
    .pb-cases-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        padding: .55rem .9rem;
        border-bottom: 1px solid #f0f4f9;
        text-align: right;
    }
    .pb-cases-table tbody td:last-child { border-bottom: none; }
    .pb-cases-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: .8rem;
        color: #555;
        text-align: left;
        flex-shrink: 0;
        white-space: nowrap;
    }
    /* Sagsnummer-cellen: label øverst, indhold fylder bredden */
    .pb-cases-table tbody td:first-child {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        background: #f5f8fd;
        border-radius: 6px 6px 0 0;
        font-size: .95rem;
    }
    .pb-cases-table tbody td:first-child::before {
        font-size: .72rem;
        color: #888;
        margin-bottom: 2px;
    }
}

@media (max-width: 480px) {
    .pb-login-box { padding: 1.75rem 1.25rem; }
    .pb-header__left, .pb-header__right { flex-wrap: wrap; }
}

/* ── Vis sag – modal ─────────────────────────────────────────────────────── */
.pb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.pb-modal {
    background: #fff;
    border-radius: 8px;
    width: 560px;
    max-width: 100%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0,0,0,.2);
}
.pb-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.pb-modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
}
.pb-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
    line-height: 1;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.pb-modal-close:hover { color: #111827; background: #f3f4f6; }
.pb-modal-body {
    overflow-y: auto;
    padding: 1.25rem 1.5rem 1.5rem;
    flex: 1;
}
.pb-modal-loading { color: #6b7280; font-size: .95rem; }
.pb-modal-error   { color: #b91c1c; font-size: .9rem; }

/* Admin-info boks */
.pb-admin-info-box {
    background: #f0f4ff;
    border: 1.5px solid #c7d4f5;
    border-radius: 7px;
    padding: .85rem 1.1rem;
    margin-bottom: 1.4rem;
}
.pb-admin-info-box__label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #4a5fa8;
    margin-bottom: .6rem;
}
.pb-admin-info-box__row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.pb-admin-info-box__item {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.pb-admin-info-box__key {
    font-size: .75rem;
    color: #6b7ab5;
}
.pb-admin-info-box__val {
    font-size: .95rem;
    font-weight: 600;
    color: #1e2a5e;
}

/* Sektioner i modal */
.pb-detail-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f0f0f0;
}
.pb-detail-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.pb-detail-section-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7280;
    margin: 0 0 .65rem;
}
.pb-detail-row {
    display: flex;
    gap: .75rem;
    font-size: .9rem;
    line-height: 1.5;
    padding: .4rem .5rem;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0;
}
.pb-detail-row:nth-child(odd)  { background: #f9fafb; }
.pb-detail-row:nth-child(even) { background: #ffffff; }
.pb-detail-row:first-child { border-radius: 4px 4px 0 0; }
.pb-detail-row:last-child  { border-bottom: none; border-radius: 0 0 4px 4px; }
.pb-detail-label {
    flex-shrink: 0;
    width: 130px;
    color: #6b7280;
}
.pb-detail-val { color: #111827; font-weight: 500; }
.pb-detail-desc { font-size: .9rem; color: #374151; line-height: 1.6; margin: 0; }
.pb-detail-service {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: .7rem .9rem;
    margin-bottom: .6rem;
    font-size: .9rem;
}
.pb-detail-service strong { display: block; margin-bottom: .4rem; color: #111827; }
.pb-detail-service-scope { margin: .3rem 0 0; font-size: .875rem; color: #374151; line-height: 1.5; }
.pb-detail-files { list-style: none; margin: 0; padding: 0; }
.pb-detail-files li { margin-bottom: .4rem; }
.pb-detail-file-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .9rem;
    color: #2563eb;
    text-decoration: none;
}
.pb-detail-file-link:hover { text-decoration: underline; }
