/* ==========================================================================
   Lokalt hostede fonte for Dansk El-Forbund (IBM Plex Sans)
   Overholder Content Security Policy (font-src 'self') uden eksterne kald
   ========================================================================== */
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/IBMPlexSans-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/IBMPlexSans-Italic.ttf') format('truetype');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/IBMPlexSans-SemiBold.ttf') format('truetype');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/IBMPlexSans-Bold.ttf') format('truetype');
}

/* ==========================================================================
   DEF Dashboard Design System (Løntjek Beregneren)
   Inspireret af Dansk El-Forbund (def.dk)
   Klassisk dyb marineblå (#080c52), energisk koral (#ff7a59) og rolig layout
   ========================================================================== */

:root {
    /* Primære DEF Farver */
    --def-navy-dark: #050838;
    --def-navy: #080c52;
    --def-navy-light: #16208a;
    --def-navy-soft: #e8ecf8;
    --def-navy-subtle: #f1f4fb;

    /* DEF Koral / Accent */
    --def-coral: #ff7a59;
    --def-coral-hover: #e56342;
    --def-coral-light: #fff1ed;
    --def-coral-border: #ffd3c7;

    /* Funktionelle signalfarver */
    --def-green: #059669;
    --def-green-subtle: #ecfdf5;
    --def-green-border: #a7f3d0;
    --def-green-text: #065f46;

    --def-alert: #e11d48;
    --def-alert-hover: #be123c;
    --def-alert-subtle: #fff1f2;
    --def-alert-border: #fecdd3;
    --def-alert-text: #9f1239;

    --def-amber: #d97706;
    --def-amber-subtle: #fffbeb;
    --def-amber-border: #fde68a;

    /* Neutrale baggrunde og overflader */
    --def-font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --def-bg: #f4f6fb;
    --def-surface: #ffffff;
    --def-surface-alt: #f8fafc;
    --def-text-main: #0f172a;
    --def-text-muted: #5b6e88;
    --def-border: #d5deeb;
    --def-border-focus: #080c52;

    /* Radius & Skygger */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-pill: 9999px;

    --shadow-sm: 0 1px 3px rgba(8, 12, 82, 0.04), 0 1px 2px rgba(8, 12, 82, 0.03);
    --shadow-md: 0 4px 14px rgba(8, 12, 82, 0.07);
    --shadow-lg: 0 10px 28px rgba(8, 12, 82, 0.11);
}

/* Nulstilling & Grundopsætning */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--def-font-sans);
    background-color: var(--def-bg);
    color: var(--def-text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* Typografi */
h1, h2, h3, h4, h5 {
    color: var(--def-navy);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

p {
    margin-bottom: 0.5rem;
}

p:last-child {
    margin-bottom: 0;
}

code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    background: #edf2f7;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.88em;
    color: var(--def-navy);
}

/* Layout beholdere */
.container {
    width: 100%;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.main-content, .main-wrapper {
    flex: 1;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}

/* Header */
.site-header {
    background: linear-gradient(180deg, var(--def-navy-dark) 0%, var(--def-navy) 100%);
    color: #ffffff;
    padding: 0.7rem 0;
    box-shadow: 0 2px 12px rgba(5, 8, 56, 0.28);
    position: relative;
    z-index: 50;
    border-bottom: 3px solid var(--def-coral);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #ffffff;
    flex-shrink: 0;
}

.brand-logo-image {
    display: block;
    height: 38px;
    max-height: 42px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.brand-logo-image.is-def {
    filter: brightness(0) invert(1);
}

.brand-logo-image.with-bg-pill {
    background: #ffffff;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.brand-product-name {
    color: var(--def-coral);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-left: 1.5px solid rgba(255, 255, 255, 0.25);
    padding-left: 0.75rem;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-pill);
    background: rgba(0, 0, 0, 0.25);
    flex-wrap: nowrap;
    scrollbar-width: none; /* Skjul scrollbar i Firefox */
    -ms-overflow-style: none; /* Skjul scrollbar i IE/Edge */
}

.nav-menu::-webkit-scrollbar {
    display: none; /* Skjul scrollbar i Chrome/Safari */
}

.nav-btn {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.45rem 0.95rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background-color: transparent;
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.nav-btn.active {
    background-color: var(--def-coral);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(255, 122, 89, 0.4);
}

.header-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

.active-case-banner {
    background: rgba(5, 150, 105, 0.3);
    border: 1px solid rgba(110, 231, 183, 0.7);
    color: #a7f3d0;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-pill);
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-version {
    display: inline-block;
    background: var(--def-coral);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 850;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-pill);
    letter-spacing: 0.04em;
    vertical-align: middle;
    margin-left: 0.4rem;
    box-shadow: 0 1px 4px rgba(255, 122, 89, 0.4);
}
.def-card-drawer {
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    background: #f8fafc;
    transition: all 0.2s ease-in-out;
}
.def-card-drawer[open] {
    border-color: var(--def-coral);
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.def-card-drawer summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--def-navy);
}

/* Brugerprofil / Menu */
.account-menu { position: relative; }
.account-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-pill);
    color: #ffffff;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    list-style: none;
    transition: background 0.15s;
}
.account-menu-trigger:hover { background: rgba(255, 255, 255, 0.12); }
.account-menu-trigger::-webkit-details-marker { display: none; }
.account-menu-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 100;
    width: 260px;
    padding: 0.5rem;
    border: 1px solid var(--def-border);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--def-text-main);
    box-shadow: var(--shadow-lg);
}
.account-menu-meta {
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.78rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.account-menu-meta span { color: var(--def-text-muted); font-size: 0.72rem; }
.account-menu-link, .account-menu-logout button {
    display: block;
    width: 100%;
    padding: 0.55rem 0.8rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--def-text-main);
    text-align: left;
    text-decoration: none;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}
.account-menu-link:hover, .account-menu-logout button:hover {
    background: var(--def-navy-subtle);
    color: var(--def-navy);
}
.account-menu-logout {
    margin-top: 0.35rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.35rem;
}

/* Hero sektioner */
.hero-section {
    background: linear-gradient(135deg, var(--def-navy) 0%, var(--def-navy-dark) 100%);
    color: #ffffff;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.hero-title {
    color: #ffffff;
    font-size: 1.85rem;
    font-weight: 850;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}
.hero-subtitle {
    font-size: 0.95rem;
    color: #cbd5e1;
    max-width: 860px;
    line-height: 1.55;
}

/* ==========================================================================
   Rapport Visning & PDF / Print Design
   ========================================================================== */
.print-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2.5px solid var(--def-navy);
    padding-bottom: 0.85rem;
    margin-bottom: 1.25rem;
}

.print-report-logo {
    height: 48px;
    max-height: 48px;
    width: auto;
    object-fit: contain;
}

.print-report-title {
    text-align: right;
}

.print-report-title h1 {
    font-size: 1.45rem;
    color: var(--def-navy);
    margin: 0;
    font-weight: 850;
    letter-spacing: -0.015em;
}

.print-report-title p {
    font-size: 0.78rem;
    color: var(--def-text-muted);
    margin: 0;
}

.print-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    background: var(--def-surface-alt);
    border: 1.5px solid var(--def-border);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.15rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
    .print-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.print-meta-item strong {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--def-text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.15rem;
}

.print-meta-item span {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--def-navy);
}

.print-claim-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 0.75rem;
    margin-top: 0.6rem;
}

.claim-reconciliation {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    padding: 0.65rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.claim-reconciliation > div {
    min-width: 0;
}

.claim-reconciliation span,
.claim-reconciliation strong {
    display: block;
}

.claim-reconciliation span {
    color: #cbd5e1;
    font-size: 0.7rem;
    font-weight: 700;
}

.claim-reconciliation strong {
    margin-top: 0.15rem;
    font-size: 0.95rem;
}

.claim-reconciliation-total {
    padding-left: 0.65rem;
    border-left: 2px solid var(--def-coral);
}

@media (max-width: 768px) {
    .print-claim-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .claim-reconciliation {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.5rem;
    }
}

.print-claim-grid div strong {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    color: #cbd5e1;
    margin-bottom: 0.15rem;
}

.print-claim-grid div span {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
}

.print-signatures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3.25rem;
}

.print-signature-box {
    border-top: 1.5px solid #cbd5e1;
    padding-top: 0.65rem;
    font-size: 0.78rem;
    color: var(--def-text-muted);
}

@media screen and (max-width: 540px) {
    .print-signatures {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }
    .print-signature-box {
        min-width: 0;
        overflow-wrap: anywhere;
    }
    .print-defect-box {
        display: inline-block;
        max-width: 220px;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

/* Sagsforløb / Workflow-bar */
.case-workflow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.5rem;
    padding: 0;
    list-style: none;
}
.case-workflow li {
    background: #ffffff;
    border: 1px solid var(--def-border);
    border-top: 3.5px solid #cbd5e1;
    border-radius: var(--radius-md);
    color: var(--def-text-muted);
    font-size: 0.82rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    overflow: hidden;
}
.case-workflow li > a,
.case-workflow li > .step-inner {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 1.05rem;
    color: inherit;
    text-decoration: none;
    height: 100%;
    width: 100%;
}
.case-workflow li:not(:has(> a)):not(:has(> .step-inner)) {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 1.05rem;
}
.case-workflow li > a:hover {
    background-color: var(--def-surface-alt);
}
.case-workflow li > a:hover strong {
    color: var(--def-coral);
}
.case-workflow .step-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.case-workflow .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: var(--def-navy);
    color: #ffffff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
}
.case-workflow li strong {
    color: var(--def-navy);
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.25;
}
.case-workflow li small {
    display: block;
    color: var(--def-text-muted);
    font-size: 0.74rem;
    line-height: 1.4;
}
.case-workflow li[aria-current="step"] {
    border-top-color: var(--def-coral);
    border-color: rgba(255, 122, 89, 0.5);
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 122, 89, 0.15);
}
.case-workflow li[aria-current="step"] .step-num {
    background: var(--def-coral);
}
.case-workflow li[aria-current="step"] strong {
    color: var(--def-coral);
}

/* Kort / Cards */
.def-card, .card {
    background-color: var(--def-surface);
    border: 1px solid var(--def-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}
.def-card:last-child {
    margin-bottom: 0;
}
.card-accent-coral {
    border-left: 5px solid var(--def-coral);
}
.card-accent-navy {
    border-left: 5px solid var(--def-navy);
}
.def-card-header {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--def-navy);
    border-bottom: 1.5px solid #f1f5f9;
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--def-navy);
    color: #ffffff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 800;
}
.card-title {
    font-size: 1.2rem;
    font-weight: 850;
    color: var(--def-navy);
    margin-bottom: 0.6rem;
}
.section-badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: var(--radius-pill);
    margin-bottom: 0.6rem;
}
.badge-coral { background: var(--def-coral-light); color: var(--def-coral); }
.badge-navy { background: var(--def-navy-subtle); color: var(--def-navy); }
.badge-green { background: var(--def-green-subtle); color: var(--def-green-text); }
.badge-amber { background: var(--def-amber-subtle); color: var(--def-amber); }

.section-lead {
    font-size: 0.95rem;
    color: var(--def-text-muted);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

/* Informationsgitter (GDPR, vejledning mv.) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
    margin-top: 1rem;
}
.info-item {
    background: var(--def-surface-alt);
    border: 1px solid var(--def-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.info-item strong {
    color: var(--def-navy);
    font-size: 0.88rem;
    font-weight: 800;
}
.info-item span {
    color: var(--def-text-muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

/* Trinliste (Guidekort) */
.step-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.75rem;
}
.step-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    align-items: start;
    background: var(--def-surface-alt);
    border: 1px solid var(--def-border);
    border-radius: var(--radius-md);
    padding: 1.2rem;
}
.step-number {
    width: 32px;
    height: 32px;
    background: var(--def-navy);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 850;
    font-size: 0.88rem;
}
.step-content h4 {
    font-size: 0.96rem;
    color: var(--def-navy);
    margin-bottom: 0.35rem;
}
.step-content p {
    font-size: 0.84rem;
    color: var(--def-text-muted);
    line-height: 1.55;
}

/* Kategori-kasser */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
    margin-top: 0.75rem;
}
.category-box {
    background: var(--def-surface-alt);
    border: 1px solid var(--def-border);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.35rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category-box-actions {
    margin-top: 1.25rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}

.category-box-actions form {
    margin: 0;
    display: inline-flex;
}
.category-box h3 {
    font-size: 1rem;
    color: var(--def-navy);
    margin-bottom: 0.45rem;
}
.category-box p {
    font-size: 0.84rem;
    color: var(--def-text-muted);
    line-height: 1.55;
}

/* Stilfulde lister */
.styled-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.styled-list li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--def-text-main);
}
.styled-list li::before {
    content: "\2022";
    position: absolute;
    left: 0.3rem;
    color: var(--def-coral);
    font-size: 1.4rem;
    line-height: 1;
}

/* Form Layout Grids */
.form-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

.field-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.field-label {
    font-size: 0.8rem;
    font-weight: 750;
    color: var(--def-navy);
    margin-bottom: 0.35rem;
    line-height: 1.3;
}
.field-input {
    width: 100%;
    border: 1.5px solid var(--def-border);
    border-radius: var(--radius-sm);
    min-height: 2.6rem;
    padding: 0.5rem 0.8rem;
    font-size: 0.88rem;
    background-color: #ffffff;
    color: var(--def-text-main);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field-input:focus {
    outline: none;
    border-color: var(--def-navy);
    box-shadow: 0 0 0 3px rgba(8, 12, 82, 0.14);
}
.field-input::placeholder { color: #94a3b8; font-size: 0.82rem; }
.field-input:read-only, .field-input[readonly] {
    background-color: #f8fafc;
    color: #64748b;
    border-color: #e2e8f0;
    cursor: default;
}
.field-input-sm {
    min-height: 2.1rem !important;
    padding: 0.25rem 0.55rem !important;
    font-size: 0.78rem !important;
}

/* Valideringsfejl / Markering */
.input-error {
    border-color: var(--def-alert) !important;
    background-color: var(--def-alert-subtle) !important;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.18) !important;
}

/* Knapper */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.35rem;
    font-size: 0.88rem;
    font-weight: 750;
    border-radius: var(--radius-pill);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.25;
}
.btn-coral, .btn-primary {
    background-color: var(--def-coral);
    color: var(--theme-on-accent, #ffffff);
    border-color: var(--def-coral);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.btn-coral:hover, .btn-primary:hover {
    background-color: var(--def-coral-hover);
    border-color: var(--def-coral-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 122, 89, 0.4);
}
.btn-navy {
    background-color: var(--def-navy);
    color: #ffffff;
    border-color: var(--def-navy);
    box-shadow: 0 2px 8px rgba(8, 12, 82, 0.2);
}
.btn-navy:hover {
    background-color: var(--def-navy-light);
    border-color: var(--def-navy-light);
    transform: translateY(-1px);
}
.btn-outline-navy, .btn-secondary {
    background-color: transparent;
    border: 1.5px solid var(--def-navy);
    color: var(--def-navy);
}
.btn-outline-navy:hover, .btn-secondary:hover {
    background-color: var(--def-navy);
    color: #ffffff;
}
.btn-danger {
    background-color: var(--def-alert);
    color: #ffffff;
    border-color: var(--def-alert);
}
.btn-danger:hover {
    background-color: var(--def-alert-hover);
    border-color: var(--def-alert-hover);
}
.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.78rem;
    min-height: auto;
}
.btn-delete-link {
    background: none;
    border: none;
    color: var(--def-coral);
    font-weight: 750;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}
.btn-delete-link:hover { text-decoration: underline; }
.btn-delete-link.text-danger { color: var(--def-alert) !important; }

/* Statusmeddelelser & Callouts */
.status-message {
    padding: 1rem 1.35rem;
    margin-bottom: 1.35rem;
    border: 1.5px solid;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 650;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.status-message.status-error, .status-error {
    border-color: var(--def-alert-border);
    background: var(--def-alert-subtle);
    color: var(--def-alert-text);
}
.status-message.status-success, .status-success {
    border-color: var(--def-green-border);
    background: var(--def-green-subtle);
    color: var(--def-green-text);
}
.card-callout-info {
    background-color: #ffffff;
    border: 1px solid var(--def-border);
    border-left: 5px solid var(--def-navy);
    border-radius: var(--radius-md);
    padding: 1rem 1.35rem;
    color: var(--def-navy);
    font-size: 0.88rem;
}

/* Resultat Opslag & Efterkrav (Summary Card) */
.summary-card {
    background: linear-gradient(135deg, var(--def-navy-dark) 0%, var(--def-navy) 100%);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.35rem;
    box-shadow: var(--shadow-lg);
    border-top: 4px solid var(--def-coral);
}
.summary-card p {
    color: #cbd5e1;
}
.summary-card strong {
    color: #ffffff;
}
.summary-card .btn-outline-navy {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.08);
}
.summary-card .btn-outline-navy:hover {
    color: var(--def-navy);
    background: #ffffff;
    border-color: #ffffff;
}
.summary-amount {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--def-coral);
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

/* Status Badges */
.badge-status {
    padding: 0.25rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
}
.badge-status.ok { background-color: var(--def-green-subtle); color: var(--def-green-text); border: 1px solid var(--def-green-border); }
.badge-status.alert { background-color: var(--def-alert-subtle); color: var(--def-alert-text); border: 1px solid var(--def-alert-border); }

.logo-badge {
    background-color: var(--def-navy);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-block;
}

/* Tabeller */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--def-border);
    background: #ffffff;
    margin-top: 0.75rem;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    line-height: 1.5;
    text-align: left;
}
.data-table th {
    background-color: #f8fafc;
    color: var(--def-navy);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.85rem 0.95rem;
    border-bottom: 2px solid var(--def-border);
    white-space: nowrap;
    letter-spacing: 0.01em;
}
.data-table td {
    padding: 0.8rem 0.95rem;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
    vertical-align: middle;
}
.data-table tr:last-child td {
    border-bottom: none;
}
.data-table tr:hover td {
    background-color: #f8fafc;
}

/* Afvigelser i tabeller */
.audit-difference, .audit-gross-difference { font-weight: 750; }
.audit-difference.is-underpaid, .audit-gross-difference.is-underpaid { color: var(--def-alert); }
.audit-gross-difference.is-overpaid { color: var(--def-green); }

/* Handlingsknapper i tabeller */
.case-action-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.case-action-primary {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}
.case-assign-form {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.case-action-danger {
    display: flex;
    align-items: center;
}
.btn-delete-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-height: 32px;
    padding: 0;
    border: 1px solid var(--def-alert-border);
    border-radius: 50%;
    background: var(--def-alert-subtle);
    line-height: 1;
}

/* Modul Fanelinje for Administratorsider */
.admin-module-tab-bar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: #ffffff;
    border: 1.5px solid var(--def-border);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.65rem;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.admin-module-tab-bar .tab-label {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--def-text-muted);
    letter-spacing: 0.05em;
    margin-right: 0.25rem;
    white-space: nowrap;
}

.admin-module-tab-bar .tab-item {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--def-navy);
    text-decoration: none;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-pill);
    background: var(--def-surface-alt);
    border: 1px solid var(--def-border);
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.admin-module-tab-bar .tab-item:hover {
    background: var(--def-navy-subtle);
    border-color: var(--def-navy);
}

.admin-module-tab-bar .tab-item.is-active {
    background: var(--def-navy);
    color: #ffffff;
    border-color: var(--def-navy);
}

/* 3-Kolonners Responsivt Gitter til Nøgletal (Stat Cards) */
.grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    align-items: stretch;
}

.grid-3col > .def-card,
.grid-3col > .stat-card {
    height: 100%;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (max-width: 860px) {
    .grid-3col {
        grid-template-columns: 1fr;
    }
}

/* Profil Page Equal Height Cards */
.profile-grid-equal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

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

.profile-card-flex {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-bottom: 0 !important;
}

.profile-form-flex {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.case-timeline-event {
    display: grid;
    grid-template-columns: 120px 150px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    border-left: 4px solid var(--def-coral);
    background: #f8fafc;
    padding: 0.7rem 0.85rem;
    border-radius: 6px;
}

@media (max-width: 700px) {
    .case-timeline-event {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
}

.totp-setup-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.totp-qr-panel {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border: 1px solid var(--def-border);
    border-radius: var(--radius-sm);
    background: #ffffff;
}

#totpQrCode {
    width: 184px;
    height: 184px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#totpQrCode svg {
    display: block;
    width: 184px;
    height: 184px;
}

@media (max-width: 700px) {
    .totp-setup-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .totp-qr-panel {
        min-height: 0;
    }
}

.user-directory-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.user-scope-row { display: flex; align-items: stretch; gap: 0.65rem; margin-bottom: 0.9rem; }
.user-breadcrumb { display: flex; flex: 1; align-items: center; gap: 0.45rem; flex-wrap: wrap; margin: 0; padding: 0.65rem 0.8rem; border-left: 3px solid var(--def-coral); background: var(--def-surface-alt); color: var(--def-text-muted); font-size: 0.78rem; }
.user-breadcrumb strong { color: var(--def-navy); }
.user-scope-badge { display: inline-flex; align-items: center; max-width: 20rem; padding: 0.55rem 0.75rem; border: 1px solid var(--def-border); border-radius: var(--radius-sm); background: #fff; color: var(--def-navy); font-size: 0.72rem; font-weight: 800; }
.user-directory-stats { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 0.25rem 0 1rem; }
.user-directory-stats span { padding: 0.35rem 0.65rem; border: 1px solid var(--def-border); border-radius: 999px; background: var(--def-surface-alt); font-size: 0.78rem; color: var(--def-text-muted); }
.user-directory-stats strong { color: var(--def-navy); }
.user-command-panel { display: grid; grid-template-columns: minmax(16rem, 1.8fr) repeat(4, minmax(9rem, 1fr)); gap: 0.75rem; align-items: end; padding: 0.9rem; margin-bottom: 1rem; border: 1px solid var(--def-border); border-radius: var(--radius-sm); background: var(--def-surface-alt); }
.user-command-panel label, .user-command-panel .field-input { min-width: 0; }
.user-command-panel .field-input:disabled { color: var(--def-text-main); background: #eef2f7; opacity: 1; cursor: not-allowed; }
.user-directory .data-table { min-width: 980px; }
.user-directory .data-table th, .user-directory .data-table td { padding: 0.65rem 0.75rem; vertical-align: top; }
.user-directory .data-table th { position: sticky; top: 0; z-index: 2; }
.user-inline-email { display: block; margin-top: 0.2rem; color: var(--def-text-muted); font-size: 0.72rem; line-height: 1.35; overflow-wrap: anywhere; }
.user-inline-department { display: block; font-size: 0.8rem; line-height: 1.35; }
.user-directory-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 0.85rem; color: var(--def-text-muted); font-size: 0.82rem; }
.user-pagination { display: flex; align-items: center; gap: 0.65rem; }
.user-actions-menu { position: relative; text-align: right; }
.user-actions-menu > summary { list-style: none; margin-left: auto; min-width: 42px; font-size: 1.15rem; }
.user-actions-menu > summary::-webkit-details-marker { display: none; }
.user-actions-panel { position: absolute; top: calc(100% + 0.35rem); right: 0; z-index: 20; display: grid; gap: 0.45rem; width: min(16rem, calc(100vw - 2rem)); padding: 0.65rem; border: 1px solid var(--def-border); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-md); text-align: left; }
.user-actions-panel > .btn, .user-actions-panel > form { width: 100%; }
.user-actions-panel > form > .btn { width: 100%; }
.user-actions-panel .password-reset-details { width: 100%; }
.user-actions-panel .password-reset-details > summary { width: 100%; }
.user-actions-panel .password-reset-form { min-width: 0; width: 100%; }
#createUserModal .modal-card { max-width: 900px; max-height: calc(100vh - 2rem); overflow-y: auto; }
#createUserModal .form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 720px) {
    .user-directory-header { align-items: stretch; flex-direction: column; }
    .user-directory-header > .btn { width: 100%; }
    .user-scope-row { align-items: stretch; flex-direction: column; }
    .user-breadcrumb { gap: 0.35rem; }
    .user-scope-badge { max-width: none; }
    .user-command-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .user-command-panel .user-search-field { grid-column: 1 / -1; }
    .user-command-panel .field-label { min-height: 1.1rem; }
    .user-directory .table-responsive { overflow: visible; }
    .user-directory .data-table { min-width: 0; display: block; }
    .user-directory .data-table thead { display: none; }
    .user-directory .data-table tbody { display: grid; gap: 0.75rem; }
    .user-directory .data-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; border: 1px solid var(--def-border); border-radius: var(--radius-sm); background: #fff; padding: 0.25rem 0.5rem; }
    .user-directory .data-table td { display: block; border: 0; padding: 0.45rem; }
    .user-directory .data-table td:nth-child(2),
    .user-directory .data-table td:nth-child(5),
    .user-directory .data-table td:nth-child(6) { grid-column: 1; }
    .user-directory .data-table td:nth-child(3) { grid-column: 1 / -1; }
    .user-directory .data-table td:nth-child(4) { grid-column: 2; grid-row: 1; text-align: right; }
    .user-directory .data-table td:last-child { grid-column: 2; grid-row: 2 / span 3; }
    .user-directory .data-table td::before { display: block; margin-bottom: 0.2rem; color: var(--def-text-muted); font-size: 0.66rem; font-weight: 700; text-transform: uppercase; }
    .user-directory .data-table td:nth-child(3)::before { content: 'Organisation / Afdeling'; }
    .user-directory .data-table td:nth-child(5)::before { content: 'Oprettet'; }
    .user-directory .data-table td:nth-child(6)::before { content: 'Tilknytninger'; }
    .user-directory-footer { align-items: stretch; flex-direction: column; }
    .user-pagination { justify-content: space-between; }
    #createUserModal .form-grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* Modaler */
.modal-backdrop, .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 56, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1.25rem;
    backdrop-filter: blur(2px);
}
.modal-card, .modal-content {
    background: #ffffff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    padding: 1.75rem;
    box-shadow: 0 16px 36px rgba(5, 8, 56, 0.35);
    border: 1px solid var(--def-border);
}

#inspectModal .inspection-modal-card {
    max-width: 860px;
    max-height: calc(100vh - 2.5rem);
    padding: 1.25rem 1.4rem 1rem;
    overflow-y: auto;
}

.inspection-modal-header,
.inspection-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.inspection-modal-header {
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--def-border);
}

.inspection-modal-header h3 {
    margin: 0;
    color: var(--def-navy);
    font-size: 1.15rem;
}

.inspection-eyebrow {
    margin: 0 0 0.2rem;
    color: var(--def-text-muted);
    font-size: 0.66rem;
    font-weight: 800;
}

.inspection-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0.9rem 0 1rem;
}

.inspection-summary-item {
    min-width: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--def-border);
    border-radius: var(--radius-sm);
    background: #f8fafc;
}

.inspection-summary-item span,
.inspection-summary-item strong {
    display: block;
    overflow-wrap: anywhere;
}

.inspection-summary-item span {
    margin-bottom: 0.15rem;
    color: var(--def-text-muted);
    font-size: 0.68rem;
    font-weight: 700;
}

.inspection-summary-item strong {
    color: var(--def-navy);
    font-size: 0.88rem;
}

.inspection-section-title {
    margin: 1rem 0 0.45rem;
    color: var(--def-navy);
    font-size: 0.9rem;
}

.inspection-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.inspection-comparison {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.inspection-comparison th,
.inspection-comparison td {
    padding: 0.42rem 0.5rem;
    border-bottom: 1px solid var(--def-border);
    text-align: right;
}

.inspection-comparison th:first-child,
.inspection-comparison td:first-child {
    text-align: left;
}

.inspection-comparison thead th {
    color: var(--def-text-muted);
    font-size: 0.66rem;
    font-weight: 800;
}

.inspection-difference-positive {
    color: #b42318;
    font-weight: 800;
}

.inspection-difference-negative {
    color: #175cd3;
    font-weight: 800;
}

.inspection-note {
    margin: 0.45rem 0 0;
    color: var(--def-text-muted);
    font-size: 0.72rem;
}

.inspection-details {
    margin-top: 0.8rem;
    padding: 0.65rem 0.75rem;
    border-top: 1px solid var(--def-border);
    border-bottom: 1px solid var(--def-border);
}

.inspection-details summary {
    color: var(--def-navy);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 750;
}

.inspection-modal-footer {
    justify-content: flex-end;
    margin-top: 0.9rem;
}

@media (max-width: 600px) {
    #inspectModal .inspection-modal-card {
        max-height: calc(100vh - 1rem);
        padding: 0.9rem;
    }
    .inspection-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .inspection-comparison th,
    .inspection-comparison td {
        padding: 0.38rem 0.25rem;
        font-size: 0.7rem;
    }
}

/* Kilder / Lovarkiv kort */
.kilde-card {
    background: var(--def-surface);
    border: 1px solid var(--def-border);
    border-radius: var(--radius-md);
    min-width: 0;
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}
.kilde-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--def-navy);
}
.kilde-card.is-current {
    border-top: 4px solid var(--def-coral);
    box-shadow: var(--shadow-md);
}
.kilde-badge-current {
    background: var(--def-coral-light);
    color: var(--def-coral);
    font-size: 0.68rem;
    font-weight: 850;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
}
.kilde-badge-history {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 850;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
}
.kilde-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.82rem;
}
.kilde-list li {
    color: var(--def-text-main);
}
.kilde-list li strong {
    color: var(--def-navy);
}

/* Visuel Tidslinje for lærlinge */
.timeline-container {
    display: flex;
    overflow-x: auto;
    padding: 1rem 0;
    gap: 0.75rem;
}
.timeline-step {
    flex: 1;
    min-width: 140px;
    background: var(--def-surface-alt);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--def-navy);
    font-size: 0.78rem;
    border-top: 1px solid var(--def-border);
    border-right: 1px solid var(--def-border);
    border-bottom: 1px solid var(--def-border);
}
.timeline-step strong {
    display: block;
    color: var(--def-navy);
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

/* Tooltip Popup */
/* Valgfri container / Harmonika */
.optional-section-card {
    background: #fdfefe;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 0;
    overflow: hidden;
}

.optional-details-panel {
    width: 100%;
}

.optional-details-summary {
    padding: 1rem 1.25rem;
    font-size: 0.92rem;
    font-weight: 750;
    color: var(--def-navy);
    cursor: pointer;
    background: var(--def-surface-alt);
    border-bottom: 1px solid transparent;
    transition: background 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    list-style: none;
}

.optional-details-summary::-webkit-details-marker {
    display: none;
}

.optional-details-summary:hover {
    background: #f1f5f9;
}

.optional-details-panel[open] .optional-details-summary {
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.optional-details-panel .space-y-4 {
    padding: 1.25rem 1.5rem;
}

/* Footer */
.site-footer {
    background: linear-gradient(180deg, var(--def-navy) 0%, var(--def-navy-dark) 100%);
    color: #ffffff;
    padding-top: 1.6rem;
    padding-bottom: 1.2rem;
    margin-top: auto;
    border-top: 3px solid var(--def-coral);
    font-size: 0.82rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1.1fr 1.4fr;
    gap: 2rem;
    margin-bottom: 1.25rem;
    align-items: start;
}
/* ==========================================================================
   Logo & Brand Assocs (DEF, TEKNIQ & OK)
   ========================================================================== */
.footer-partners {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    flex-wrap: wrap;
}

.footer-partners-block {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-org-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.footer-org-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    min-width: 110px;
}

.footer-org-logos {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

/* Ensartede Brand-Pills for samtlige logoer på mørk baggrund */
.footer-brand-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    height: 48px;
    padding: 6px 16px;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.footer-brand-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.38);
}

.footer-brand-pill img {
    height: 34px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
    display: block;
}

.footer-def-logo-main {
    height: 38px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: transform 0.15s ease;
}

.footer-def-logo-main:hover {
    transform: scale(1.04);
}

.footer-partner-logo {
    height: 22px;
    width: auto;
    object-fit: contain;
}

.footer-logo-light-bg {
    background: #ffffff;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
}

.footer-org-sep {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}

.footer-ok-signature-wrap {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 1.25rem;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
}

.footer-ok-badge-large {
    height: 48px;
    width: 48px;
    min-width: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.footer-ok-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.footer-ok-text strong {
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
}

.footer-ok-text span {
    color: #cbd5e1;
    font-size: 0.72rem;
    line-height: 1.35;
}


/* Kompakt genvejs-dropdown & pænt layout */
.footer-nav-select {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 0.65rem;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.footer-nav-select:hover, .footer-nav-select:focus {
    background-color: rgba(255, 255, 255, 0.18);
    border-color: var(--def-coral);
    outline: none;
}
.footer-nav-select option {
    background-color: var(--def-navy-dark);
    color: #ffffff;
}

.footer-quick-pills {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.footer-pill-link {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    text-decoration: none;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    transition: all 0.15s ease;
}
.footer-pill-link:hover {
    background: var(--def-coral);
    color: #ffffff;
}

.kilde-partners-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1px solid var(--def-border);
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.kilde-partners-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.kilde-ok-logo {
    height: 38px;
    width: 38px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.kilde-tekniq-logo {
    height: 34px;
    width: auto;
    object-fit: contain;
}

.kilde-di-logo {
    height: 34px;
    width: auto;
    max-width: 90px;
    object-fit: contain;
}

.kilde-co-logo {
    height: 32px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}

.kilde-logos-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.kilde-tab-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.kilde-tab-btn {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    background: #ffffff;
    border: 1.5px solid var(--def-border);
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 750;
    color: var(--def-navy);
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.kilde-tab-btn:hover {
    border-color: var(--def-navy);
    background: var(--def-navy-subtle);
}

.kilde-tab-btn.is-active {
    background: var(--def-navy);
    color: #ffffff;
    border-color: var(--def-navy);
    box-shadow: var(--shadow-sm);
}

.kilde-tab-badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: var(--radius-pill);
    background: rgba(0, 0, 0, 0.08);
}

.kilde-tab-btn.is-active .kilde-tab-badge {
    background: var(--def-coral);
    color: #ffffff;
}

.kilde-card-brand-img {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.link-partner-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
    background: #ffffff;
    border: 1.5px solid var(--def-border);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    transition: all 0.15s ease;
    color: var(--def-navy);
    font-weight: 750;
    font-size: 0.88rem;
}

.link-partner-card:hover {
    border-color: var(--def-navy);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.link-partner-logo {
    height: 26px;
    width: auto;
    object-fit: contain;
}

.link-partner-ok-logo {
    height: 26px;
    width: 26px;
    border-radius: 50%;
    object-fit: cover;
}
.footer-col h4 {
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}
.footer-col p {
    color: #cbd5e1;
    line-height: 1.55;
    font-size: 0.82rem;
}
.footer-col a {
    color: #cbd5e1;
    text-decoration: none;
    display: block;
    margin-bottom: 0.45rem;
    transition: color 0.15s ease;
}
.footer-col a:hover {
    color: var(--def-coral);
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 1.25rem;
    text-align: center;
    color: #cbd5e1;
    font-size: 0.76rem;
    line-height: 1.7;
}
.footer-bottom a {
    display: inline;
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.footer-bottom a:hover {
    color: var(--def-coral);
}

/* Generelle hjælpeklasser */
.hidden,
[hidden] { display: none !important; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }
.text-muted { color: var(--def-text-muted); }
.text-navy { color: var(--def-navy); }
.text-coral { color: var(--def-coral); }
.text-danger { color: var(--def-alert) !important; font-weight: 800; }
.font-bold { font-weight: 800; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* Responsive justeringer */
@media (max-width: 992px) {
    .form-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .form-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .case-workflow { grid-template-columns: repeat(2, 1fr); }
}

@media screen and (max-width: 768px) {
    html, body {
        max-width: 100%;
        overflow-x: clip;
    }
    .header-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.65rem;
    }
    .brand-logo {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }
    .header-tools {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }
    .nav-menu {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        scroll-snap-type: x proximity;
    }
    .nav-btn { scroll-snap-align: start; }
    .form-grid-4, .form-grid-3, .form-grid-2, .info-grid, .category-grid, .footer-grid { grid-template-columns: minmax(0, 1fr); }
    .kilde-card, .kilde-card-header, .form-grid-4 > *, .form-grid-3 > *, .form-grid-2 > * { min-width: 0; }
    .kilde-card-header { flex-wrap: wrap; gap: 0.5rem; }
    .case-workflow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }
    .case-workflow li > a,
    .case-workflow li > .step-inner,
    .case-workflow li:not(:has(> a)):not(:has(> .step-inner)) {
        padding: 0.7rem 0.75rem;
    }
    .case-workflow .step-header { align-items: flex-start; }
    .case-workflow li strong { font-size: 0.82rem; }
    .case-workflow li small { font-size: 0.68rem; }
}

/* Print Styling for mæglingsmøder & fagretlige forhandlinger */
.print-only {
    display: none !important;
}

@media print {
    body:has(.kvik-print-summary) > *:not(.kvik-print-summary) {
        display: none !important;
    }

    body:has(.kvik-print-summary) .kvik-print-summary {
        display: block !important;
        max-width: 720px;
        margin: 0 auto;
        padding: 12mm;
        color: #111827;
        background: #ffffff;
        font: 11pt/1.5 var(--def-font-sans);
    }

    .kvik-print-summary h1 {
        color: var(--def-navy);
        font-size: 22pt;
        margin-bottom: 6mm;
    }

    .kvik-print-summary dl {
        margin: 7mm 0;
        border-top: 1px solid #94a3b8;
    }

    .kvik-print-summary dl > div {
        display: grid;
        grid-template-columns: 48% 52%;
        gap: 4mm;
        padding: 3mm 0;
        border-bottom: 1px solid #cbd5e1;
    }

    .kvik-print-summary dt {
        font-weight: 700;
    }

    .kvik-print-meta,
    .kvik-print-footer {
        color: #334155;
    }

    .no-print, .site-header, .site-footer, .case-workflow, .nav-menu {
        display: none !important;
    }
    .print-only {
        display: inline !important;
    }
    @page {
        size: A4 portrait;
        margin: 8mm 8mm 8mm 8mm;
    }
    body {
        background: #ffffff !important;
        color: #0f172a !important;
        font-size: 8pt !important;
        line-height: 1.3;
        font-family: 'IBM Plex Sans', -apple-system, sans-serif !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .main-content, .main-wrapper {
        padding: 0 !important;
    }
    .def-card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin-bottom: 0 !important;
        background: transparent !important;
    }
    .def-card-header {
        font-size: 0.95rem !important;
        border-bottom: 1.5px solid var(--def-navy) !important;
        padding-bottom: 0.2rem !important;
        margin-bottom: 0.4rem !important;
        color: var(--def-navy) !important;
    }

    .print-page-break {
        page-break-before: always !important;
        break-before: page !important;
    }
    .only-print {
        display: flex !important;
    }
    .print-report-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-bottom: 2px solid var(--def-navy) !important;
        padding-bottom: 0.4rem !important;
        margin-bottom: 0.5rem !important;
    }
    .print-report-logo {
        height: 30px !important;
        width: auto !important;
    }
    .print-report-title {
        text-align: right !important;
    }
    .print-report-title h1 {
        font-size: 1.15rem !important;
        color: var(--def-navy) !important;
        margin: 0 !important;
        font-weight: 850 !important;
    }
    .print-report-title p {
        font-size: 0.7rem !important;
        color: #475569 !important;
        margin: 0 !important;
    }

    /* Print Stamdata boks */
    .print-meta-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.35rem !important;
        background: #f8fafc !important;
        border: 1px solid #cbd5e1 !important;
        border-radius: 4px !important;
        padding: 0.35rem 0.6rem !important;
        margin-bottom: 0.5rem !important;
    }
    .print-meta-item strong {
        display: block !important;
        font-size: 0.62rem !important;
        text-transform: uppercase !important;
        color: #64748b !important;
        letter-spacing: 0.03em !important;
    }
    .print-meta-item span {
        font-size: 0.76rem !important;
        font-weight: 750 !important;
        color: var(--def-navy) !important;
    }

    /* Print Efterkrav Boks (Klar og autoritativ) */
    .summary-card {
        background: #ffffff !important;
        color: var(--def-navy) !important;
        border: 1.5px solid var(--def-navy) !important;
        border-left: 5px solid var(--def-coral) !important;
        border-radius: 4px !important;
        padding: 0.45rem 0.75rem !important;
        margin-bottom: 0.5rem !important;
        box-shadow: none !important;
    }
    .summary-card * {
        color: #0f172a !important;
    }
    .summary-amount {
        color: var(--def-navy) !important;
        font-size: 1.35rem !important;
        font-weight: 900 !important;
        margin-top: 0.05rem !important;
        margin-bottom: 0.2rem !important;
        line-height: 1.1 !important;
    }
    .claim-reconciliation {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        border-color: #cbd5e1 !important;
    }
    .claim-reconciliation-total {
        border-left-color: var(--def-coral) !important;
    }
    .print-claim-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.35rem !important;
        border-top: 1px solid #e2e8f0 !important;
        padding-top: 0.35rem !important;
        margin-top: 0.25rem !important;
    }
    .print-claim-grid div strong {
        display: block !important;
        font-size: 0.62rem !important;
        text-transform: uppercase !important;
        color: #64748b !important;
    }
    .print-claim-grid div span {
        font-size: 0.76rem !important;
        font-weight: 800 !important;
        color: var(--def-navy) !important;
    }

    /* Print Tabeller - Fuld bredde og intet scroll/afskæring */
    .table-responsive {
        border: none !important;
        overflow: visible !important;
        display: block !important;
        width: 100% !important;
        margin-top: 0.25rem !important;
        margin-bottom: 0.75rem !important;
        border-radius: 0 !important;
        background: transparent !important;
    }
    .data-table {
        width: 100% !important;
        table-layout: auto !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
        border: none !important;
        font-size: 7.2pt !important;
    }
    .data-table thead {
        display: table-header-group !important;
    }
    .data-table tfoot {
        display: table-footer-group !important;
    }
    .data-table tbody {
        display: table-row-group !important;
    }
    .data-table tbody.period-entry-group {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .data-table th {
        background-color: var(--def-navy) !important;
        color: #ffffff !important;
        border: none !important;
        border-top: 1.5px solid var(--def-navy) !important;
        border-bottom: 1.5px solid var(--def-navy) !important;
        padding: 4px 5px !important;
        font-weight: 800 !important;
        font-size: 6.8pt !important;
        text-transform: uppercase !important;
        letter-spacing: 0.03em !important;
        white-space: nowrap !important;
    }
    .data-table td {
        border: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding: 3.5px 5px !important;
        color: #0f172a !important;
        vertical-align: middle !important;
    }
    .period-row-main td {
        background-color: #ffffff !important;
        border-top: 1px solid #cbd5e1 !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }
    .period-defect-row td {
        background-color: #fffaf9 !important;
        border-bottom: 2px solid #94a3b8 !important;
    }
    .data-table tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* Fejlbånd i print */
    .print-defect-box {
        padding: 0.15rem 0.45rem !important;
        font-size: 6.8pt !important;
        margin-bottom: 0.15rem !important;
        border: 1px solid #fdba74 !important;
    }

    /* Skjul overflødige/tekniske elementer i print */
    .print-hide, details, summary, .case-action-group {
        display: none !important;
    }

    /* Underskriftslinjer til faglig mægling / forlig */
    .print-signatures {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 3.5rem !important;
        margin-top: 2.75rem !important;
        padding-top: 0.5rem !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .print-signature-box {
        border-top: 1.5px solid var(--def-navy) !important;
        padding-top: 0.5rem !important;
        font-size: 0.72rem !important;
        color: #334155 !important;
        line-height: 1.35 !important;
    }

    /* Juridisk hjemmel bilag på Side 2 */
    .legal-infringement-panel {
        page-break-inside: auto !important;
    }
    .legal-infringement-item {
        padding: 0.4rem 0.6rem !important;
        margin-bottom: 0.4rem !important;
        page-break-inside: avoid !important;
    }
}

/* ==========================================================================
   Login Side Styling
   ========================================================================== */
/* ==========================================================================
   Login & Kvik-Tjek Side Layout (To-kolonne på store skærme)
   ========================================================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--def-navy-dark) 0%, var(--def-navy) 60%, #10186b 100%);
    padding: 2rem 1.5rem;
}

.login-page-container {
    width: 100%;
    min-width: 0;
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.public-entry-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    width: 100%;
    padding: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    background: rgba(5, 8, 56, 0.55);
}

.public-entry-tab {
    min-height: 46px;
    padding: 0.55rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-size: 0.93rem;
    font-weight: 750;
    cursor: pointer;
}

.public-entry-tab span {
    display: block;
    margin-top: 0.05rem;
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 600;
}

.public-entry-tab[aria-selected="true"] {
    background: #ffffff;
    border-color: rgba(255, 255, 255, 0.7);
    color: var(--def-navy);
    box-shadow: var(--shadow-md);
}

.public-entry-tab[aria-selected="true"] span {
    color: var(--def-text-muted);
}

.public-entry-tab:focus-visible {
    outline: 3px solid var(--def-coral);
    outline-offset: 2px;
}

.public-entry-panel[hidden] {
    display: none !important;
}

.kvik-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 45px rgba(5, 8, 56, 0.45);
    padding: 2.25rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 4px solid var(--def-coral);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Kvik-Tjek Guide & Disclaimer Paneler */
.kvik-guide-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-left: 4px solid var(--def-navy);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    margin-bottom: 1.15rem;
    font-size: 0.93rem;
    color: var(--def-navy);
    line-height: 1.5;
}

.kvik-guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 42px;
    font-weight: 800;
    font-size: 0.93rem;
    color: var(--def-navy);
    cursor: pointer;
    list-style: none;
}

.kvik-guide-header::-webkit-details-marker {
    display: none;
}

.kvik-guide-header::after {
    content: '+';
    flex: 0 0 auto;
    font-size: 1.2rem;
}

.kvik-guide-card[open] .kvik-guide-header::after {
    content: '-';
}

.kvik-guide-header:focus-visible {
    outline: 3px solid var(--def-coral);
    outline-offset: 3px;
}

.kvik-guide-label {
    margin-left: auto;
    color: var(--def-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.kvik-guide-steps {
    margin: 0.5rem 0 0;
    padding-left: 1.15rem;
    color: #334155;
}

.kvik-guide-steps li {
    margin-bottom: 0.35rem;
}

.kvik-guide-steps li:last-child {
    margin-bottom: 0;
}

.field-hint-text {
    display: block;
    font-size: 0.93rem;
    color: var(--def-text-muted);
    margin-top: 0.2rem;
    line-height: 1.4;
}

.kvik-disclaimer-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    margin-top: 1.15rem;
    font-size: 0.93rem;
    line-height: 1.5;
    color: #78350f;
}

.kvik-disclaimer-header {
    font-weight: 800;
    color: #92400e;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.93rem;
}

.kvik-disclaimer-box p {
    margin: 0 0 0.5rem 0;
}

.kvik-disclaimer-box p:last-child {
    margin-bottom: 0;
}

.kvik-result-note {
    font-size: 0.93rem;
    color: var(--def-text-muted);
    line-height: 1.45;
    padding-top: 0.45rem;
    margin-top: 0.35rem;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.kvik-badge-anon {
    background: var(--def-green-subtle);
    color: var(--def-green-text);
    border: 1px solid var(--def-green-border);
    font-size: 0.7rem;
    font-weight: 750;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    display: inline-block;
}

.kvik-title {
    font-size: 1.5rem;
    font-weight: 850;
    color: var(--def-navy);
    letter-spacing: -0.02em;
    margin-top: 0.4rem;
    margin-bottom: 0.25rem;
}

.kvik-subtitle {
    font-size: 0.93rem;
    color: var(--def-text-muted);
    line-height: 1.45;
    margin-bottom: 1.25rem;
}

.kvik-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.kvik-reset-button {
    min-height: 42px;
    padding: 0.25rem 0.4rem;
    border: 0;
    background: transparent;
    color: var(--def-text-muted);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.kvik-reset-button:hover {
    color: var(--def-navy);
}

.kvik-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.kvik-result-box {
    margin-top: 1.25rem;
    padding: 1.15rem;
    border-radius: var(--radius-md);
    background: var(--def-surface-alt);
    border: 1.5px solid var(--def-border);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.kvik-result-box.has-underpayment {
    background: var(--def-alert-subtle);
    border-color: var(--def-alert-border);
}

.kvik-result-box.is-ok {
    background: var(--def-green-subtle);
    border-color: var(--def-green-border);
}

.kvik-result-status {
    font-size: 1rem;
    font-weight: 850;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.kvik-result-context {
    display: grid;
    gap: 0.3rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--def-border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.72);
    color: var(--def-text-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.kvik-result-context strong {
    color: var(--def-text-main);
}

.kvik-result-status.text-alert {
    color: var(--def-alert-text);
}

.kvik-result-status.text-ok {
    color: var(--def-green-text);
}

.kvik-result-item {
    font-size: 0.8rem;
    color: var(--def-text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
    padding-bottom: 0.35rem;
}

.kvik-result-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.kvik-result-box.has-error .kvik-result-context,
.kvik-result-box.has-error .kvik-result-item,
.kvik-result-box.has-error .kvik-result-note {
    display: none;
}

.kvik-result-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.65rem;
    padding-top: 0.75rem;
}

.kvik-result-actions .btn {
    min-height: 44px;
    text-align: center;
    justify-content: center;
}

.kvik-print-summary {
    display: none;
}

.kvik-cta-notice {
    margin-top: 0.65rem;
    font-size: 0.74rem;
    color: var(--def-text-muted);
    line-height: 1.4;
}

.kvik-cta-notice a {
    color: var(--def-navy);
    font-weight: 750;
    text-decoration: underline;
}

.login-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 45px rgba(5, 8, 56, 0.45);
    padding: 2.25rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 4px solid var(--def-navy);
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-card > *,
.login-partner-band,
.login-partner-grid {
    min-width: 0;
}

.login-partner-grid img {
    max-width: 100% !important;
}

.login-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-brand-partners {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.login-def-logo {
    height: 125px;
    max-height: 140px;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.login-def-logo:hover {
    transform: scale(1.02);
}

.login-tekniq-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.login-ok-badge {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.login-title {
    font-size: 1.65rem;
    font-weight: 850;
    color: var(--def-navy);
    letter-spacing: -0.02em;
}

.login-alert {
    background: var(--def-alert-subtle);
    border: 1.5px solid var(--def-alert-border);
    color: var(--def-alert-text);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-weight: 650;
    margin-bottom: 1.25rem;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.password-toggle-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-field {
    padding-right: 3.5rem !important;
}

.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: var(--def-text-muted);
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    text-transform: uppercase;
}
.password-toggle-btn:hover {
    color: var(--def-navy);
}

.login-footer-note {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    font-size: 0.93rem;
    color: var(--def-text-muted);
}

.cookie-banner-bar {
    width: 100%;
    max-width: 1080px;
    margin-top: 1rem;
    padding: 0.85rem 0;
    color: #e2e8f0;
    font-size: 0.93rem;
    line-height: 1.45;
    text-align: center;
}

.cookie-banner-bar a {
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
}

@media (max-width: 540px) {
    .login-page {
        padding: 1rem 0.75rem;
    }

    .kvik-card,
    .login-card {
        padding: 1.25rem;
    }

    .kvik-grid-2,
    .kvik-result-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .login-partner-grid {
        gap: 0.9rem;
    }

    .public-entry-tabs {
        gap: 0.25rem;
    }

    .public-entry-tab {
        padding: 0.5rem;
        font-size: 0.82rem;
    }

    .public-entry-tab span {
        font-size: 0.72rem;
    }

    .cookie-banner-bar {
        padding: 0.75rem 0.5rem 0;
    }
}

/* ==========================================================================
   Admin Kontrolcenter Styling
   ========================================================================== */
.admin-nav-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--def-border);
}
.admin-nav-pills a {
    color: var(--def-navy);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 750;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    background: var(--def-surface-alt);
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
}
.admin-nav-pills a:hover {
    background: var(--def-coral);
    color: #ffffff;
    border-color: var(--def-coral);
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 768px) {
    .stat-grid { grid-template-columns: 1fr; }
}
.stat-card {
    background: #ffffff;
    border: 1px solid var(--def-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.stat-card strong {
    font-size: 1.85rem;
    font-weight: 850;
    color: var(--def-navy);
    line-height: 1.1;
}
.stat-card span {
    color: var(--def-text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.account-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.password-reset-details summary {
    font-size: 0.75rem;
    color: var(--def-navy);
    font-weight: 750;
    cursor: pointer;
}
.password-reset-form {
    background: #f8fafc;
    border: 1px solid var(--def-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 220px;
}
.dept-change-form {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    margin-top: 0.35rem;
}

/* Hjælpeklasser til layout, marginer og konsistent opbygning */
.m-0 { margin: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 1.25rem !important; }
.p-6 { padding: 1.5rem !important; }
.p-8 { padding: 2rem !important; }
.text-xs { font-size: 0.75rem !important; }
.justify-end { justify-content: flex-end !important; }

.login-badge-offset {
    display: inline-block;
    margin-top: 0.5rem;
}

.login-submit-btn {
    font-size: 0.95rem;
    padding: 0.85rem;
    margin-top: 0.5rem;
}

.stat-card-navy { border-top: 4px solid var(--def-navy); }
.stat-card-coral { border-top: 4px solid var(--def-coral); }
.stat-card-green { border-top: 4px solid var(--def-green); }

.admin-tool-tip {
    font-size: 0.78rem;
    color: var(--def-text-muted);
    margin-top: 0.35rem;
}

.form-grid-span-full-right {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.dept-change-summary {
    font-size: 0.72rem;
    color: var(--def-navy);
    cursor: pointer;
}

.btn-action-compact {
    font-size: 0.72rem !important;
    padding: 0.35rem 0.65rem !important;
    min-width: 65px;
    text-align: center;
    justify-content: center;
}

.btn.is-disabled,
.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed !important;
    pointer-events: none;
    box-shadow: none !important;
    transform: none !important;
}

.takst-group-header-row.clickable {
    cursor: pointer;
}

.takst-group-header-row.clickable:hover td {
    background: #dbe4f3 !important;
}

.takst-group-chevron {
    display: inline-block;
    width: 14px;
    font-size: 0.72rem;
    color: var(--def-navy);
}

.modal-btn-row {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.65rem;
}

.grid-2col {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 1.25rem;
    align-items: start;
}

.demo-report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 900px) {
    .grid-2col,
    .demo-report-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .grid-2col > *, .grid-2col > * > *, .demo-report-grid > * {
        min-width: 0;
    }
}

.kilde-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.6rem;
}

.kilde-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--def-navy-dark);
}

.kilde-card-desc {
    font-size: 0.8rem;
    color: var(--def-text-muted);
    margin-bottom: 0.85rem;
}

.kilde-section-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--def-navy-dark);
    margin-bottom: 0.4rem;
}

.kilde-section-desc {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.kilde-section-subtitle {
    font-size: 0.75rem;
    color: var(--def-navy-dark);
}

.kilde-btn-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-text-center {
    text-align: center;
}

/* ==========================================================================
   Admin Dokumenter & Takster (CSP-Compliant Design System)
   ========================================================================== */
.admin-card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.admin-card-header-flex-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.85rem;
    margin-bottom: 1.25rem;
}

.admin-header-title-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.admin-period-title {
    font-size: 1.35rem;
    font-weight: 850;
    color: var(--def-navy-dark);
    margin: 0;
}

.admin-btn-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.table-row-fixed-3 {
    width: 100%;
    border-collapse: separate;
    border-spacing: 1rem 0;
    table-layout: fixed;
    margin-bottom: 0.5rem;
}

.table-row-fixed-4 {
    width: 100%;
    border-collapse: separate;
    border-spacing: 1rem 0;
    table-layout: fixed;
}

.table-row-fixed-4-spaced {
    width: 100%;
    border-collapse: separate;
    border-spacing: 1rem 0;
    table-layout: fixed;
    margin-top: 0.85rem;
}

.table-cell-field {
    vertical-align: top;
    padding: 0;
}

.field-label-block {
    display: block;
    margin-bottom: 0.35rem;
}

.field-subtext {
    display: block;
    margin-top: 0.25rem;
}

.form-actions-bar {
    width: 100%;
    text-align: right;
    margin-top: 1rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
}

.form-actions-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
}

.w-full {
    width: 100%;
}

.file-input-compact {
    width: 100%;
    padding: 0.35rem 0.5rem !important;
    font-size: 0.82rem !important;
}

.doc-name-strong {
    color: var(--def-navy-dark);
    font-size: 0.88rem;
}

.doc-actions-cell {
    text-align: right;
    white-space: nowrap;
}

.doc-actions-wrap {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

.details-dropdown {
    position: relative;
    display: inline-block;
}

.details-dropdown-summary {
    cursor: pointer;
    list-style: none;
}

.details-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    background: #ffffff;
    border: 1.5px solid var(--def-border);
    border-radius: var(--radius-md);
    padding: 0.85rem;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    min-width: 280px;
    text-align: left;
}

.details-dropdown-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.35rem;
}

.nowrap {
    white-space: nowrap;
}

/* Takster sektioner og tabeller */
.takst-box-muted {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.takst-box-white {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.takst-box-coral {
    background: #fff8f5;
    border: 1.5px solid var(--def-coral);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.takst-box-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--def-navy);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.takst-box-title-coral {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--def-coral-hover);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.apprentice-inputs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0.6rem 0;
    table-layout: fixed;
    margin-bottom: 0.75rem;
}

.apprentice-label-compact {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
}

.apprentice-label-voksen {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
    color: var(--def-coral);
    font-weight: 800;
}

.field-input-voksen {
    width: 100%;
    border: 2px solid var(--def-coral) !important;
    background: #ffffff !important;
}

.apprentice-sub-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 1rem 0;
    table-layout: fixed;
    margin-top: 0.85rem;
    border-top: 1px dashed var(--def-coral-border);
    padding-top: 0.75rem;
}

.table-custom-border {
    margin-top: 0;
    border: 1.5px solid var(--def-border);
}

.th-takst-kategori {
    width: 140px;
    padding: 0.75rem 1rem;
    color: var(--def-navy);
    font-size: 0.82rem;
    white-space: nowrap;
}

.th-takst-main {
    padding: 0.75rem 1rem;
    color: var(--def-navy);
    font-size: 0.82rem;
}

.th-takst-pension {
    width: 250px;
    padding: 0.75rem 1rem;
    color: var(--def-navy);
    font-size: 0.82rem;
    white-space: nowrap;
}

.th-takst-overtid {
    width: 260px;
    padding: 0.75rem 1rem;
    color: var(--def-navy);
    font-size: 0.82rem;
    white-space: nowrap;
}

.td-takst-category {
    vertical-align: middle;
    padding: 0.85rem 1rem;
    background: #fafbfc;
    border-right: 1px solid var(--def-border);
    white-space: nowrap;
}

.td-takst-category-voksen {
    vertical-align: middle;
    padding: 0.85rem 1rem;
    background: #fff5f0;
    border-right: 1px solid #ffd3c7;
    white-space: nowrap;
}

.td-takst-cell {
    vertical-align: middle;
    padding: 0.85rem 1rem;
}

.td-takst-cell-nowrap {
    vertical-align: middle;
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.takst-hourly-big {
    font-size: 1.15rem;
    font-weight: 850;
    color: var(--def-navy-dark);
    white-space: nowrap;
}

.apprentice-pill-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.apprentice-pill-box {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.45rem 0.75rem;
    white-space: nowrap;
}

.apprentice-pill-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--def-navy);
}

.apprentice-pill-amount {
    font-size: 1.05rem;
    color: var(--def-navy-dark);
    margin-left: 0.25rem;
}

.voksen-rate-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--def-coral);
    color: #ffffff;
    padding: 0.45rem 1rem;
    border-radius: 6px;
    white-space: nowrap;
}

.voksen-rate-label {
    font-size: 0.72rem;
    text-transform: uppercase;
}

.voksen-rate-amount {
    font-size: 1.25rem;
    font-weight: 850;
}

.voksen-table-row {
    border-top: 1.5px solid #e2e8f0;
    background: #fffaf7;
}

.voksen-subtext {
    color: #c2410c;
}

.custom-rate-border {
    border-left: 5px solid var(--def-coral);
    margin-bottom: 2rem;
}

.code-rate-border {
    border-left: 5px solid var(--def-navy);
    margin-bottom: 2rem;
}

.bg-coral {
    background-color: var(--def-coral) !important;
}

.bg-navy {
    background-color: var(--def-navy) !important;
}

.table-header-alt {
    background: #f1f5f9;
    border-bottom: 2px solid var(--def-border);
}

.table-row-divider {
    border-top: 1.5px solid #e2e8f0;
}
/* Visuel Ensretning: Handlinger, Kasser og Metrikker */
.card-actions-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    width: 100%;
}

.card-actions-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    width: 100%;
}

@media (max-width: 540px) {
    .admin-card-header-flex-center,
    .case-action-primary,
    .card-actions-right,
    .card-actions-between {
        flex-direction: column;
        align-items: stretch;
        min-width: 0;
        max-width: 100%;
    }
    .case-action-primary .btn {
        width: 100%;
        justify-content: center;
    }
    .card-actions-right .btn,
    .card-actions-between .btn {
        width: 100%;
        justify-content: center;
    }
    .optional-details-summary {
        flex-wrap: wrap;
        overflow-wrap: anywhere;
    }
    .section-toolbar,
    .section-toolbar form {
        min-width: 0;
        max-width: 100%;
        width: 100%;
        flex-wrap: wrap;
    }
    .section-toolbar input,
    .section-toolbar select {
        width: 100% !important;
        min-width: 0;
    }
    .nav-btn,
    .account-menu-link,
    .account-menu-logout button,
    .footer-nav-select,
    .footer-grid a,
    .btn,
    .btn-sm,
    .btn-delete-link {
        min-height: 42px !important;
    }
    .btn-delete-icon {
        width: 42px;
    }
    .field-input,
    .field-input-sm,
    .field-select,
    select.field-input {
        min-height: 42px !important;
    }
}

.summary-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 900px) {
    .summary-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .summary-metrics-grid {
        grid-template-columns: 1fr;
    }
}

.summary-metric-item {
    display: flex;
    flex-direction: column;
}

.summary-metric-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #cbd5e1;
    margin-bottom: 0.25rem;
}

.summary-metric-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--def-coral);
}

.summary-metric-val-white {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
}

.table-input-cell {
    padding: 0.35rem !important;
}

.table-input-cell .field-input,
.table-input-cell input,
.table-input-cell select {
    font-size: 0.8rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--def-border);
    border-radius: var(--radius-sm);
    width: 100%;
}

/* ==========================================================================
   Fler-linjers Periodeoversigt Design (flerperiode.php)
   Undgår horisontal scroll og skjuler valgfrie poster som standard
   ========================================================================== */

.savings-evidence-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #fed7aa;
    border-radius: var(--radius-sm);
    background: #fff7ed;
}

.savings-evidence-toolbar > div:first-child {
    max-width: 760px;
}

.savings-evidence-toolbar p {
    margin: 0.2rem 0 0;
    color: #7c2d12;
    font-size: 0.78rem;
    line-height: 1.4;
}

.savings-evidence-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.savings-evidence-toolbar-actions .field-input {
    width: 300px;
    margin: 0;
}

.counterclaim-control-section {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem 1rem;
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--def-border);
    border-radius: var(--radius-sm);
    background: #f8fafc;
}

.counterclaim-control-section legend {
    padding: 0 0.35rem;
    color: var(--def-navy);
    font-weight: 800;
    font-size: 0.86rem;
}

.counterclaim-control-section p {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--def-text-muted);
    font-size: 0.76rem;
    line-height: 1.4;
}

.counterclaim-control-section .field-checkbox-control {
    align-items: flex-start;
    min-width: 0;
    font-size: 0.78rem;
}

.counterclaim-control-section input[type="checkbox"] {
    flex: 0 0 auto;
    margin-top: 0.1rem;
}

.period-cards-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.period-row-card {
    background: #ffffff;
    border: 1.5px solid var(--def-border);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}

.period-row-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-md);
}

.period-row-card.is-active-card {
    border-color: var(--def-navy);
}

.period-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.period-card-title-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.period-badge-num {
    background: var(--def-navy);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.78rem;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-pill);
}

.period-card-meta-tags {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.period-tag {
    background: var(--def-surface-alt);
    border: 1px solid var(--def-border);
    border-radius: var(--radius-pill);
    padding: 0.18rem 0.55rem;
    font-size: 0.72rem;
    color: var(--def-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.period-tag strong {
    color: var(--def-navy);
}

.period-card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.period-toggle-btn {
    background: var(--def-surface-alt);
    border: 1px solid var(--def-border);
    color: var(--def-navy);
    font-size: 0.76rem;
    font-weight: 750;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s ease;
}

.period-toggle-btn:hover {
    background: #e2e8f0;
    color: var(--def-navy-dark);
}

.period-toggle-btn.is-open {
    background: var(--def-navy-subtle);
    border-color: var(--def-navy);
    color: var(--def-navy);
}

/* Fler-linjers gitter i kortet - Rent, robust to-rækkers layout */
.period-grid-primary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem 1rem;
    align-items: end;
}

.period-grid-primary .field-group {
    min-width: 0;
}

.period-grid-primary .field-label {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    font-size: 0.78rem;
    line-height: 1.35;
    margin-bottom: 0.35rem;
}

.field-checkbox-control {
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--def-border);
    border-radius: var(--radius-sm);
    background: var(--def-surface-alt);
    color: var(--def-navy);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.field-checkbox-control input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    flex: 0 0 auto;
}

.period-grid-primary .field-group-pension-ag .field-label {
    white-space: normal !important;
    overflow: visible !important;
}

@media (max-width: 900px) {
    .counterclaim-control-section {
        grid-template-columns: 1fr;
    }
    .savings-evidence-toolbar,
    .savings-evidence-toolbar-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .savings-evidence-toolbar-actions .field-input,
    .savings-evidence-toolbar-actions .btn {
        width: 100%;
    }
    .period-grid-primary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .period-grid-primary {
        grid-template-columns: 1fr;
    }
}

.period-card-expanded-drawer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--def-border);
    background: #fafbfc;
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    animation: fadeIn 0.15s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.period-drawer-section-title {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--def-text-muted);
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.period-grid-secondary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.period-grid-overtime-compare {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    gap: 0.75rem 1.25rem;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
}

@media (max-width: 650px) {
    .period-grid-overtime-compare {
        grid-template-columns: 1fr;
    }
}

.period-grid-tertiary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

@media (max-width: 900px) {
    .period-grid-secondary,
    .period-grid-tertiary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .period-grid-secondary,
    .period-grid-tertiary {
        grid-template-columns: 1fr;
    }
}

.period-controls-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: #f8fafc;
    border: 1px solid var(--def-border);
    border-radius: var(--radius-md);
    padding: 0.65rem 1rem;
    margin-bottom: 0.75rem;
}

.period-toolbar-left,
.period-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Forbedret resultat-tabel layout */
.spec-table-compact {
    width: 100%;
    table-layout: auto;
}

.spec-table-compact th {
    font-size: 0.78rem;
    padding: 0.65rem 0.75rem;
}

.spec-table-compact td {
    font-size: 0.82rem;
    padding: 0.65rem 0.75rem;
    overflow-wrap: anywhere;
}

#fullAuditResult .table-responsive {
    overflow-x: visible;
    border: 0;
}

#fullAuditResult .spec-table-compact,
#fullAuditResult .spec-table-compact tbody {
    display: block;
    width: 100%;
}

#fullAuditResult .spec-table-compact thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

#fullAuditResult .spec-table-compact tbody {
    display: grid;
    gap: 0.55rem;
}

#fullAuditResult .spec-table-compact tr {
    display: grid;
    grid-template-columns: 42px 102px minmax(126px, 1.2fr) 78px minmax(120px, 1fr) repeat(3, minmax(110px, 1fr));
    grid-template-rows: auto auto;
    gap: 0.45rem 0.65rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--def-border);
    border-radius: var(--radius-sm);
    background: #ffffff;
}

#fullAuditResult .spec-table-compact td {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    padding: 0;
    border: 0;
    white-space: normal;
    line-height: 1.25;
    font-size: 0.78rem;
}

#fullAuditResult .spec-table-compact td::before {
    content: attr(data-label);
    color: var(--def-text-muted);
    font-size: 0.62rem;
    font-weight: 750;
    text-transform: uppercase;
}

#fullAuditResult .spec-table-compact .spec-period { grid-column: 1; grid-row: 1; }
#fullAuditResult .spec-table-compact .spec-date { grid-column: 2; grid-row: 1; }
#fullAuditResult .spec-table-compact .spec-agreement { grid-column: 3; grid-row: 1; }
#fullAuditResult .spec-table-compact .spec-step { grid-column: 4; grid-row: 1; }
#fullAuditResult .spec-table-compact .spec-hours { grid-column: 5; grid-row: 1; }
#fullAuditResult .spec-table-compact .spec-gross { grid-column: 6; grid-row: 1; }
#fullAuditResult .spec-table-compact .spec-fritvalg { grid-column: 7; grid-row: 1; }
#fullAuditResult .spec-table-compact .spec-feriefridage { grid-column: 8; grid-row: 1; }
#fullAuditResult .spec-table-compact .spec-pension-ag { grid-column: 1 / span 2; grid-row: 2; }
#fullAuditResult .spec-table-compact .spec-pension-lm { grid-column: 3; grid-row: 2; }
#fullAuditResult .spec-table-compact .spec-holiday { grid-column: 4; grid-row: 2; }
#fullAuditResult .spec-table-compact .spec-vacation { grid-column: 5; grid-row: 2; }
#fullAuditResult .spec-table-compact .spec-pension-base { grid-column: 6; grid-row: 2; }
#fullAuditResult .spec-table-compact .spec-atp { grid-column: 7; grid-row: 2; }
#fullAuditResult .spec-table-compact .spec-actions { grid-column: 8; grid-row: 2; }

#fullAuditResult .spec-table-compact .case-action-primary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
}

#fullAuditResult .spec-table-compact .case-action-primary .btn {
    min-height: 34px;
    padding: 0.35rem 0.45rem;
    font-size: 0.72rem;
}

@media (max-width: 1100px) {
    #fullAuditResult .spec-table-compact tr {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-rows: auto;
        gap: 0.45rem 0.7rem;
    }
    #fullAuditResult .spec-table-compact td {
        grid-column: auto !important;
        grid-row: auto !important;
    }
    #fullAuditResult .spec-table-compact .spec-actions {
        grid-column: 3 / -1 !important;
    }
}

@media (max-width: 700px) {
    #fullAuditResult .spec-table-compact tbody {
        gap: 0.45rem;
    }
    #fullAuditResult .spec-table-compact tr {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem 0.6rem;
        padding: 0.65rem;
    }
    #fullAuditResult .spec-table-compact td {
        font-size: 0.75rem;
    }
    #fullAuditResult .spec-table-compact .spec-actions {
        grid-column: 1 / -1 !important;
    }
    #fullAuditResult .spec-table-compact .case-action-primary .btn {
        min-height: 36px;
    }
}

.spec-badge-ok {
    color: var(--def-green-text);
    background: var(--def-green-subtle);
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-pill);
    font-weight: 750;
    font-size: 0.75rem;
    display: inline-block;
}

.spec-badge-diff {
    color: var(--def-alert-text);
    background: var(--def-alert-subtle);
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-pill);
    font-weight: 750;
    font-size: 0.75rem;
    display: inline-block;
}

/* ==========================================================================
   Admin Takster Design System - Rent, Kompakt & Tabellayout uden Horisontal Scroll
   ========================================================================== */

.takst-overview-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85rem;
}

.takst-overview-table th {
    background: var(--def-navy);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.75rem 0.85rem;
    border: none;
    white-space: nowrap;
    text-align: left;
    vertical-align: middle;
}

.takst-overview-table th:first-child {
    border-top-left-radius: var(--radius-sm);
    text-align: left;
}

.takst-overview-table th:last-child {
    border-top-right-radius: var(--radius-sm);
    text-align: center;
}

.takst-overview-table th.th-center,
.takst-overview-table td.td-center {
    text-align: center;
}

.takst-overview-table th.th-right,
.takst-overview-table td.td-right {
    text-align: right;
}

/* Tydelig differentiering mellem Gældende og Historiske grupper */
.takst-group-header-row td {
    font-size: 0.85rem;
    font-weight: 800;
    padding: 0.65rem 0.95rem !important;
    letter-spacing: 0.02em;
    vertical-align: middle;
}

.takst-group-header-row.is-current-agreement td {
    background: #e6f7f0 !important;
    color: #065f46 !important;
    border-top: 3px solid var(--def-green) !important;
    border-bottom: 2px solid #a7f3d0 !important;
}

.takst-group-header-row.is-historical-agreement td {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border-top: 2px solid #94a3b8 !important;
    border-bottom: 1.5px solid var(--def-border) !important;
}

.takst-group-badge-current {
    background: var(--def-green);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 850;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 1px 3px rgba(5, 150, 105, 0.3);
}

.takst-group-badge-history {
    background: #64748b;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 850;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.takst-row-main:hover td {
    background: #f1f5fb !important;
}

.takst-row-main td {
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid var(--def-border);
    vertical-align: middle;
    background: #ffffff;
    text-align: left;
}

.takst-row-main.is-expanded td {
    background: #f8fafc;
    border-bottom: none;
}

.takst-row-detail {
    display: none !important;
}

.takst-row-detail.is-open {
    display: table-row !important;
}

.takst-row-detail td {
    padding: 0 0.85rem 1rem 0.85rem;
    background: #f8fafc;
    border-bottom: 2px solid var(--def-border);
}

.takst-period-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 800;
    color: var(--def-navy);
}

.takst-chevron {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 0.7rem;
    color: var(--def-text-muted);
}

.takst-row-main.is-expanded .takst-chevron {
    transform: rotate(90deg);
    color: var(--def-navy);
}

.takst-detail-panel {
    background: #ffffff;
    border: 1px solid var(--def-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 820px) {
    .takst-detail-panel {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.takst-detail-col-title {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--def-navy);
    border-bottom: 1.5px solid var(--def-navy-soft);
    padding-bottom: 0.35rem;
    margin-bottom: 0.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.takst-detail-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.82rem;
}

.takst-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.2rem 0;
    border-bottom: 1px dashed #f1f5f9;
}

.takst-detail-item:last-child {
    border-bottom: none;
}

.takst-detail-item span {
    color: var(--def-text-muted);
}

.takst-detail-item strong {
    color: var(--def-navy-dark);
}

.apprentice-micro-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.4rem;
    margin-top: 0.4rem;
}

@media (max-width: 600px) {
    .apprentice-micro-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.apprentice-micro-cell {
    background: #f8fafc;
    border: 1px solid var(--def-border);
    border-radius: 4px;
    padding: 0.35rem;
    text-align: center;
}

.apprentice-micro-cell.voksen {
    background: #fff8f5;
    border-color: var(--def-coral-border);
}

.apprentice-micro-cell .lbl {
    display: block;
    font-size: 0.65rem;
    font-weight: 750;
    color: var(--def-text-muted);
    text-transform: uppercase;
}

.apprentice-micro-cell.voksen .lbl {
    color: var(--def-coral);
}

.apprentice-micro-cell .val {
    font-size: 0.88rem;
    font-weight: 850;
    color: var(--def-navy);
}

.apprentice-micro-cell.voksen .val {
    color: var(--def-coral);
}

/* Redigeringsformular Grid Layout */
.takst-edit-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 900px) {
    .takst-edit-sections {
        grid-template-columns: 1fr;
    }
}

.takst-form-card {
    background: #ffffff;
    border: 1px solid var(--def-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.takst-form-card-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--def-navy);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.5rem;
    margin-bottom: 0.85rem;
}

.takst-input-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.takst-input-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.takst-input-row-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

@media (max-width: 650px) {
    .takst-input-row-2,
    .takst-input-row-3 {
        grid-template-columns: 1fr;
    }
    .takst-input-row-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Fase 2: OCR & Lønseddel Scanning UI (Drag & Drop, Split-screen Preview)
   ========================================================================== */

.ocr-dropzone {
    border: 2px dashed #94a3b8;
    background-color: #f8fafc;
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.ocr-dropzone-compact {
    padding: 1rem 0.75rem;
}


.ocr-dropzone:hover {
    border-color: var(--def-coral);
    background-color: var(--def-coral-light);
}

.ocr-dropzone.ocr-dropzone-active {
    border-color: var(--def-navy);
    background-color: var(--def-navy-soft);
    box-shadow: 0 0 0 3px rgba(8, 12, 82, 0.15);
}

.ocr-dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    pointer-events: none;
}

.ocr-dropzone-icon {
    font-size: 2.2rem;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.ocr-dropzone-text {
    font-size: 0.92rem;
    color: var(--def-navy);
}

.ocr-browse-link {
    color: var(--def-coral);
    text-decoration: underline;
    font-weight: 700;
}

.ocr-modal-card {
    box-sizing: border-box;
    width: 98vw;
    max-width: 1500px;
    max-height: 96vh;
    overflow: hidden;
    padding: 0;
    border-top: 4px solid var(--def-coral);
}

.ocr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #dbe4ee;
    background: #f8fafc;
}

.ocr-review-intro {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.85rem;
    padding: 0.65rem 0.75rem;
    border-left: 3px solid var(--def-coral);
    background: #fff7ed;
    color: var(--def-navy);
    font-size: 0.78rem;
}

.ocr-review-intro span {
    color: #64748b;
}

.ocr-modal-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
    padding: 1rem 1.25rem 0;
    gap: 1.25rem;
    align-items: start;
    max-height: 78vh;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 0.35rem;
}

.ocr-modal-grid > *,
.ocr-modal-preview,
.ocr-modal-form,
.ocr-verify-table-wrap {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 760px) {
    .ocr-modal-card {
        width: calc(100vw - 1rem);
        max-height: 98vh;
        overflow-y: auto;
        padding: 1rem;
    }
    .ocr-modal-grid {
        grid-template-columns: minmax(0, 1fr);
        max-height: none;
        overflow: visible;
    }
}

.ocr-modal-card > .modal-btn-row {
    margin: 1rem 1.25rem 1.25rem !important;
}

.ocr-modal-preview {
    background: #eef2f7;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.ocr-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--def-navy);
}

.ocr-preview-container {
    width: 100%;
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.ocr-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    text-align: center;
}

.ocr-verify-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.ocr-verify-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.ocr-verify-table th:first-child,
.ocr-verify-table td:first-child {
    width: 34%;
}

.ocr-verify-table th:nth-child(2),
.ocr-verify-table td:nth-child(2) {
    width: 51%;
}

.ocr-verify-table th:nth-child(3),
.ocr-verify-table td:nth-child(3) {
    width: 15%;
}

.ocr-verify-table td {
    padding: 0.45rem 0.6rem !important;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.ocr-verify-table input,
.ocr-verify-table select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 1150px) {
    .ocr-verify-table thead th:first-child,
    .ocr-verify-table tbody td:first-child {
        width: 38%;
    }
    .ocr-verify-table thead th:nth-child(2),
    .ocr-verify-table tbody td:nth-child(2) {
        width: 62%;
    }
    .ocr-verify-table thead th:nth-child(3) {
        display: none;
    }
    .ocr-verify-table tbody td:nth-child(3) {
        display: none;
    }
}

.ocr-hour-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
    align-items: stretch;
}

.ocr-hour-control input,
.ocr-hour-control select {
    width: 100%;
    min-width: 0;
    font-size: 0.78rem;
}

.ocr-field-with-source {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
}

.ocr-field-with-source .ocr-source-select {
    width: 100%;
    min-width: 0;
    color: #475569;
    font-size: 0.72rem;
    border-style: dashed;
    background-color: #f8fafc;
}

@media (max-width: 520px) {
    .ocr-verify-table th,
    .ocr-verify-table td {
        padding: 0.35rem !important;
        font-size: 0.7rem;
    }
    .ocr-verify-table thead th:first-child,
    .ocr-verify-table tbody td:first-child {
        width: 34%;
    }
    .ocr-verify-table thead th:nth-child(2),
    .ocr-verify-table tbody td:nth-child(2) {
        width: 66%;
    }
}

.ocr-conf-badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-pill);
    font-size: 0.68rem;
    font-weight: 750;
    white-space: nowrap;
}

.input-highlight-pulse {
    animation: pulseBorder 1.2s ease-in-out;
}

@keyframes pulseBorder {
    0% { background-color: #ffedd5; border-color: var(--def-coral); }
    50% { background-color: #fef08a; border-color: #ca8a04; }
    100% { background-color: #ffffff; border-color: var(--def-border); }
}


