/* ------------------------------------------------------------
   Dyrebase 2026 - komponenter
   Knapper, badges, alerts, navigation, venstremenu og genbrugelige UI-elementer.
   ------------------------------------------------------------ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

/* Topnavigation */
.header-inner {
    width: min(1440px, calc(100% - 56px));
    margin: 0 auto;
    padding: 14px 0;
    display: grid;
    grid-template-columns: 300px minmax(690px, 1fr) 230px;
    gap: 22px;
    align-items: center;
}

.brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand strong {
    display: block;
    font-size: 21px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.brand span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.2;
}

.main-nav {
    min-width: 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
    white-space: nowrap;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 10px 12px;
    border-radius: var(--radius-pill);
    color: #26343a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    background: var(--red);
    color: #ffffff;
}

/* Brugerområde / User menu */
.userbox {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    text-align: right;
}

.user-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-height: 48px;
    padding: 6px 8px 6px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.user-menu-toggle:hover,
.user-menu-toggle:focus-visible,
.user-menu-toggle[aria-expanded="true"] {
    background: #ffffff;
    border-color: var(--line-soft);
    box-shadow: 0 8px 18px rgba(24, 45, 54, 0.05);
    outline: none;
}

.user-menu-text {
    min-width: 0;
    display: block;
}

.user-menu-text strong,
.user-menu-text span {
    display: block;
}

.user-menu-text strong {
    font-size: 14px;
    line-height: 1.2;
    font-weight: 900;
}

.user-menu-text span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
}

.user-menu-chevron {
    color: var(--muted);
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    transform: translateY(-1px);
}

.user-menu-toggle[aria-expanded="true"] .user-menu-chevron {
    color: var(--red-dark);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--red);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 850;
    flex: 0 0 auto;
}

.user-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 80;
    width: 210px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(24, 45, 54, 0.14);
    text-align: left;
}

.user-menu-panel[hidden] {
    display: none;
}

.user-menu-panel a {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 9px 11px;
    border-radius: 12px;
    color: #35454c;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.user-menu-panel a:hover,
.user-menu-panel a:focus-visible {
    background: var(--blue-soft);
    color: var(--ink);
    outline: none;
}

.user-menu-panel a.is-logout {
    margin-top: 6px;
    border-top: 1px solid var(--line-soft);
    border-radius: 0 0 12px 12px;
    color: var(--red-dark);
}

.user-menu-panel a.is-logout:hover,
.user-menu-panel a.is-logout:focus-visible {
    background: var(--red-soft);
    color: var(--red-dark);
}

.subbar {
    background: linear-gradient(90deg, var(--blue), #eef7f9);
    border-bottom: 1px solid var(--line);
}

.subbar-inner {
    width: min(1440px, calc(100% - 56px));
    margin: 0 auto;
    padding: 12px 0;
    display: grid;
    grid-template-columns: 420px minmax(320px, 1fr);
    align-items: center;
    gap: 20px;
}

.quicklinks {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    min-width: 420px;
}

.quicklinks a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 13px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.82);
    color: #26343a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.quicklinks a:hover {
    background: #ffffff;
}

.btn,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--radius-pill);
    padding: 12px 17px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.btn.primary,
button.btn.primary,
a.btn.primary,
.button.primary {
    background: var(--red);
    color: #ffffff;
    border: 1px solid var(--red);
}

.btn.secondary,
button.btn.secondary,
a.btn.secondary,
.button.secondary {
    background: #ffffff;
    color: var(--ink);
    border: 1px solid var(--line);
}

.pill,
.panel-link {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    background: var(--red-soft);
    border: 1px solid rgba(227, 6, 19, 0.12);
    color: var(--red-dark);
    text-decoration: none;
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.badge.green {
    background: var(--green-soft);
    color: #12784d;
}

.badge.amber {
    background: var(--amber-soft);
    color: #8a5a00;
}

.badge.red {
    background: var(--danger-soft);
    color: var(--danger);
}

.badge.blue {
    background: var(--blue-soft);
    color: #47636d;
}

.footer-note {
    margin: 18px 0 0;
    color: #74838a;
    font-size: 13px;
}

.footer,
.site-footer {
    width: min(1280px, calc(100% - 56px));
    margin: 28px auto 0;
    padding: 24px 0 36px;
    color: var(--muted);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    border-top: 1px solid var(--line);
}

.footer strong,
.site-footer strong {
    color: var(--ink);
    font-weight: 900;
}

.footer div,
.site-footer div {
    line-height: 1.45;
}

/* Lokale handlingsmenuer under sideoverskrift */
.module-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: -8px 0 22px;
    padding: 6px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 26px rgba(18, 38, 49, 0.06);
    width: fit-content;
    max-width: 100%;
}

.module-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.module-action-link:hover,
.module-action-link:focus-visible {
    background: #ffffff;
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--line);
    outline: none;
}

.module-action-link.is-active {
    background: var(--red);
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(227, 6, 19, 0.18);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.dyb-logo-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #ffffff;
    font-size: 18px;
    font-weight: 950;
    letter-spacing: -0.04em;
    flex: 0 0 auto;
}

.dyb-context-menu {
    position: sticky;
    top: 92px;
    min-height: calc(100vh - 126px);
    padding: 10px 4px 10px 0;
    border-right: 1px solid var(--line);
}

.dyb-context-title {
    margin: 0 0 14px;
    padding: 4px 12px 12px 2px;
    border-bottom: 1px solid var(--line-soft);
}

.dyb-context-title strong,
.dyb-context-title small {
    display: block;
}

.dyb-context-title strong {
    font-size: 17px;
    letter-spacing: -0.03em;
}

.dyb-context-title small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
}

.dyb-back-link {
    display: inline-flex;
    align-items: center;
    margin: 0 0 14px 2px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 850;
}

.dyb-back-link:hover,
.dyb-back-link:focus-visible {
    color: var(--red-dark);
    outline: none;
}

.dyb-local-nav {
    display: grid;
    gap: 4px;
}

.dyb-local-nav a {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 7px 12px 7px 8px;
    border-radius: 13px;
    color: #35454c;
    text-decoration: none;
    font-size: 14px;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.dyb-local-nav a span {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    color: #6a7b83;
    font-size: 13px;
    font-weight: 900;
}

.dyb-local-nav a strong {
    font-weight: 820;
}

.dyb-local-nav a:hover,
.dyb-local-nav a:focus-visible {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px var(--line-soft);
    outline: none;
}

.dyb-local-nav a.is-active {
    background: #ffffff;
    color: var(--red-dark);
    box-shadow: inset 4px 0 0 var(--red), 0 8px 18px rgba(24, 45, 54, 0.04);
}

.dyb-local-nav a.is-active span {
    color: var(--red-dark);
}

.dyb-page-head,
.dyb-case-header {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--blue), #f8fcfd 58%, #ffffff);
    box-shadow: var(--shadow-soft);
}

.dyb-page-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-end;
    padding: 22px 24px;
}

.dyb-page-head h1,
.dyb-case-header h1 {
    margin-bottom: 6px;
}

.dyb-page-head .lead,
.dyb-case-header .lead {
    font-size: 0.96rem;
}

.dyb-head-actions,
.dyb-action-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.dyb-action-bar {
    justify-content: flex-start;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    width: fit-content;
    max-width: 100%;
}

.dyb-action-bar .btn {
    min-height: 34px;
    padding: 9px 13px;
}

.dyb-text-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--red-dark);
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.dyb-text-toggle:hover,
.dyb-text-toggle:focus-visible {
    color: var(--red);
    text-decoration: underline;
    outline: none;
}

.dyb-card-link {
    display: inline-flex;
    margin-top: 10px;
    color: var(--red-dark);
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}

.dyb-card-link:hover,
.dyb-card-link:focus-visible {
    text-decoration: underline;
    outline: none;
}

.dyb-four-column .panel-link {
    padding: 7px 10px;
    font-size: 12px;
}

.dyb-text-toggle {
    margin-top: 8px;
}

.dyb-text-toggle[hidden] {
    display: none !important;
}

.dyb-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background: #ffffff;
    color: var(--ink);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
}

.dyb-status-badge.is-created {
    border-color: rgba(104, 121, 130, 0.20);
    background: #f7fafb;
    color: #44555d;
}

.dyb-status-badge.is-followup {
    border-color: rgba(44, 126, 189, 0.22);
    background: rgba(44, 126, 189, 0.08);
    color: #205f8f;
}

.dyb-status-badge.is-police {
    border-color: rgba(133, 100, 200, 0.24);
    background: rgba(133, 100, 200, 0.09);
    color: #5d4692;
}

.dyb-status-badge.is-fvst {
    border-color: rgba(242, 169, 0, 0.26);
    background: rgba(242, 169, 0, 0.11);
    color: #7a5400;
}

.dyb-status-badge.is-help,
.dyb-status-badge.is-reopened {
    border-color: rgba(31, 142, 96, 0.22);
    background: rgba(31, 142, 96, 0.08);
    color: #1f7050;
}

.dyb-status-badge.is-closed {
    border-color: rgba(227, 6, 19, 0.20);
    background: rgba(227, 6, 19, 0.065);
    color: var(--red-dark);
}

.dyb-detail-status {
    display: block;
    max-width: 180px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.25;
    text-align: right;
}

/* ------------------------------------------------------------
   Dyrebase 2026 - login
   ------------------------------------------------------------ */

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background:
        radial-gradient(circle at 0 0, rgba(227, 6, 19, 0.05), transparent 30%),
        radial-gradient(circle at 100% 100%, rgba(208, 231, 238, 0.78), transparent 28%),
        linear-gradient(135deg, #fbf7f7 0%, #f5fbfd 48%, #ffffff 100%);
    color: var(--ink, #12212a);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.auth-page * {
    box-sizing: border-box;
}

.auth-shell {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px 18px;
}

.auth-card {
    width: min(100%, 535px);
    padding: 38px 38px 34px;
    border: 1px solid var(--line, #dbe6ea);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 22px 54px rgba(24, 45, 54, 0.10);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 31px;
}

.auth-brand img {
    width: 66px;
    height: 66px;
    display: block;
    object-fit: contain;
    flex: 0 0 auto;
}

.auth-brand strong,
.auth-brand span {
    display: block;
}

.auth-brand strong {
    color: var(--ink, #12212a);
    font-size: 28px;
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.045em;
}

.auth-brand span {
    margin-top: 6px;
    color: var(--muted, #687982);
    font-size: 14px;
    line-height: 1.35;
    font-weight: 650;
}

.auth-heading {
    margin-bottom: 23px;
}

.auth-heading .eyebrow {
    margin: 0 0 9px;
    color: var(--red-dark, #b9000f);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.auth-heading h1 {
    margin: 0 0 7px;
    color: var(--ink, #12212a);
    font-size: 34px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.auth-heading p {
    margin: 0;
    color: var(--muted, #687982);
    font-size: 15px;
    line-height: 1.45;
    font-weight: 650;
}

.auth-form {
    display: grid;
    gap: 19px;
}

.auth-form .field {
    display: grid;
    gap: 8px;
}

.auth-form .field span {
    color: var(--ink, #12212a);
    font-size: 13px;
    font-weight: 850;
}

.auth-form .field-required span::after {
    content: " *";
    color: var(--red, #e30613);
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
    width: 100%;
    min-height: 48px;
    padding: 10px 15px;
    border: 1px solid var(--line, #dbe6ea);
    border-radius: 15px;
    background: #ffffff;
    color: var(--ink, #12212a);
    font: inherit;
    font-size: 16px;
    font-weight: 650;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="password"]:focus {
    border-color: rgba(227, 6, 19, 0.42);
    box-shadow: 0 0 0 4px rgba(227, 6, 19, 0.08);
}

.auth-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 136px;
    gap: 13px;
    align-items: stretch;
    margin-top: 3px;
}

.auth-actions .btn-primary,
.auth-actions .btn-secondary {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.auth-actions .btn-primary {
    border: 0;
    background: linear-gradient(135deg, var(--red, #e30613), var(--red-dark, #b9000f));
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(227, 6, 19, 0.18);
}

.auth-actions .btn-primary:hover,
.auth-actions .btn-primary:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.auth-actions .btn-secondary {
    border: 1px solid var(--line, #dbe6ea);
    background: #ffffff;
    color: var(--ink, #12212a);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.auth-actions .btn-secondary:hover,
.auth-actions .btn-secondary:focus-visible {
    border-color: rgba(227, 6, 19, 0.22);
    color: var(--red-dark, #b9000f);
    outline: none;
}

.auth-help {
    margin: 1px 0 0;
    color: var(--muted, #687982);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 650;
}

.auth-card .alert {
    margin: -4px 0 18px;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.4;
}

.auth-card .alert strong {
    display: block;
    margin-bottom: 6px;
}

.auth-card .alert ul {
    margin: 0;
    padding-left: 18px;
}

.auth-card .alert-error {
    border: 1px solid rgba(227, 6, 19, 0.28);
    background: rgba(227, 6, 19, 0.065);
    color: #6f141a;
}

.auth-footer {
    position: fixed;
    left: 18px;
    right: 18px;
    bottom: 36px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
    color: var(--muted, #687982);
    font-size: 13px;
    font-weight: 650;
    pointer-events: none;
}

.auth-footer span + span {
    color: var(--red-dark, #b9000f);
    font-weight: 800;
}

.dyb-case-row:hover .dyb-case-summary,
.dyb-case-row:focus-within .dyb-case-summary {
    background: rgba(208, 231, 238, 0.22);
}

/* ------------------------------------------------------------
   AP012 - Fælles handlingsmenu til sagskort
   ------------------------------------------------------------ */

.dyb-case-actions {
    position: relative;
    display: inline-flex;
    justify-content: flex-end;
}

.dyb-case-actions-toggle {
    gap: 7px;
    min-height: 40px;
    padding: 10px 14px;
    white-space: nowrap;
}

.dyb-case-actions-toggle {
    font-size: 14px;
    font-weight: 700;
}
.dyb-case-actions-chevron {
    color: var(--muted);
    font-size: 15px;
    font-weight: 950;
    line-height: 1;
    transform: translateY(-1px);
}

.dyb-case-actions-toggle[aria-expanded="true"] {
    border-color: rgba(227, 6, 19, 0.24);
    color: var(--red-dark);
    box-shadow: 0 8px 18px rgba(24, 45, 54, 0.06);
}

.dyb-case-actions-toggle[aria-expanded="true"] .dyb-case-actions-chevron {
    color: var(--red-dark);
}

.dyb-case-actions-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    width: 230px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(24, 45, 54, 0.14);
}

.dyb-case-actions-menu[hidden] {
    display: none;
}

.dyb-case-actions-menu a {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 9px 11px;
    border-radius: 12px;
    color: #35454c;
    text-decoration: none;
    font-size: 13px;
    font-weight: 820;
    line-height: 1.2;
}

.dyb-case-actions-menu a:hover,
.dyb-case-actions-menu a:focus-visible {
    background: var(--blue-soft);
    color: var(--ink);
    outline: none;
}

.dyb-case-actions-menu a.is-danger {
    color: var(--red-dark);
}

.dyb-case-actions-menu a.is-danger:hover,
.dyb-case-actions-menu a.is-danger:focus-visible {
    background: var(--red-soft);
    color: var(--red-dark);
}

.dyb-case-actions-icon {
    width: 18px;
    min-width: 18px;
    display: inline-flex;
    justify-content: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.dyb-case-actions-divider {
    display: block;
    height: 1px;
    margin: 6px 4px;
    background: var(--line-soft);
}

/* ------------------------------------------------------------
   AP012 - sikrer at handlingsmenu vises over sagskort
   ------------------------------------------------------------ */

.dyb-case-row {
    position: relative;
    overflow: visible;
}

.dyb-case-row[open] {
    z-index: 20;
}

.dyb-case-expanded,
.dyb-case-expanded-actions {
    overflow: visible;
}

.dyb-case-actions {
    z-index: 40;
}

.dyb-case-actions-menu {
    z-index: 90;
}

/* AP012 - roligere knapper */

.dyb-case-expanded-actions .btn,
.dyb-case-actions-toggle {
    font-size: 14px;
    font-weight: 700;
}

/* ------------------------------------------------------------
   Administration - lokal venstremenu
   ------------------------------------------------------------ */

.dyb-local-nav span.is-disabled {
    align-items: center;
    border-radius: 999px;
    color: var(--color-muted, #6b7a86);
    display: flex;
    gap: 12px;
    opacity: .55;
    padding: 12px 14px;
    text-decoration: none;
}

.dyb-local-nav span.is-disabled strong {
    font-weight: 700;
}

/* ------------------------------------------------------------
   Dyrebase switch-komponent
   Bruges til til/fra-indstillinger i formularer.
   ------------------------------------------------------------ */

.dyb-switch {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    gap: 10px;
    margin-top: 10px;
    min-height: 42px;
    user-select: none;
}

.dyb-switch input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.dyb-switch-track {
    background: #d9e4ea;
    border: 1px solid #c8d7df;
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    height: 22px;
    position: relative;
    transition: background .16s ease, border-color .16s ease;
    width: 40px;
}

.dyb-switch-track::after {
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(15, 34, 49, .25);
    content: "";
    height: 18px;
    left: 2px;
    position: absolute;
    top: 1px;
    transition: transform .16s ease;
    width: 18px;
}

.dyb-switch input:checked + .dyb-switch-track {
    background: #e30613;
    border-color: #e30613;
}

.dyb-switch input:checked + .dyb-switch-track::after {
    transform: translateX(17px);
}

.dyb-switch input:focus-visible + .dyb-switch-track {
    outline: 3px solid rgba(227, 6, 19, .22);
    outline-offset: 3px;
}

.dyb-switch input:disabled + .dyb-switch-track {
    cursor: not-allowed;
    opacity: .55;
}

.dyb-switch input:disabled ~ strong {
    color: var(--color-muted, #6b7a86);
}

.dyb-switch strong {
    color: var(--color-text, #17232d);
    font-size: 14px;
    font-weight: 700;
}

/* ------------------------------------------------------------
   SP5-008 - Authentication UI v2
   Login, glemt kodeord og reset password.
   ------------------------------------------------------------ */

.auth-card {
    position: relative;
}

.auth-help a {
    color: var(--red-dark, #b9000f);
    font-weight: 850;
    text-decoration: none;
}

.auth-help a:hover,
.auth-help a:focus-visible {
    color: var(--red, #e30613);
    text-decoration: underline;
    outline: none;
}

.auth-card .alert-success {
    border: 1px solid rgba(31, 142, 96, 0.22);
    background: rgba(31, 142, 96, 0.08);
    color: #1f7050;
}

.auth-actions {
    grid-template-columns: 1fr;
}

.auth-actions .btn-primary {
    width: 100%;
}

.auth-brand {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line-soft, #edf2f3);
}

.auth-heading {
    padding-top: 2px;
}

.auth-card::before {
    content: "🔐";
    position: absolute;
    top: 22px;
    right: 24px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--red-soft, #fff0f2);
    color: var(--red-dark, #b9000f);
    font-size: 18px;
}

/* ------------------------------------------------------------
   SP5-011 - Mobilnavigation
   ------------------------------------------------------------ */

.mobile-menu-toggle,
.mobile-menu-panel {
    display: none;
}

.mobile-menu-toggle {
    min-height: 44px;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: #ffffff;
    color: var(--ink);
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 850;
}

.mobile-menu-toggle[aria-expanded="true"] {
    border-color: rgba(227, 6, 19, .24);
    color: var(--red-dark);
    box-shadow: 0 8px 18px rgba(24, 45, 54, .06);
}

.mobile-menu-icon {
    position: relative;
    width: 19px;
    height: 14px;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
}

.mobile-menu-icon::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 0;
    width: 19px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.mobile-menu-panel {
    border-top: 1px solid var(--line-soft);
    background: #ffffff;
    box-shadow: 0 18px 32px rgba(24, 45, 54, .10);
}

.mobile-main-nav,
.mobile-user-links {
    width: min(100%, calc(100% - 32px));
    margin: 0 auto;
}

.mobile-main-nav {
    display: grid;
    gap: 7px;
    padding: 16px 0 12px;
}

.mobile-main-nav a {
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    color: var(--ink);
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 15px;
    font-weight: 850;
}

.mobile-main-nav a.is-active {
    border-color: rgba(227, 6, 19, .20);
    background: var(--red-soft);
    color: var(--red-dark);
}

.mobile-user-links {
    display: grid;
    gap: 7px;
    padding: 0 0 16px;
}

.mobile-user-summary {
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--blue-soft);
    display: grid;
    gap: 3px;
}

.mobile-user-summary strong {
    font-size: 14px;
}

.mobile-user-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.mobile-user-links a {
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 14px;
    color: #35454c;
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 820;
}

.mobile-user-links a:focus-visible,
.mobile-user-links a:hover {
    background: var(--blue-soft);
    outline: none;
}

.mobile-user-links a.is-logout {
    color: var(--red-dark);
}

/* ------------------------------------------------------------
   SP6-002 - Rapport KPI'er og diagrammer
   ------------------------------------------------------------ */

.report-kpi-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-kpi-largest .report-kpi-text {
    font-size: 20px !important;
    line-height: 1.18 !important;
    overflow-wrap: anywhere;
}

.report-chart-panel {
    min-width: 0;
}

.report-chart-header {
    align-items: center;
}

.report-chart-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    background: #f7fafb;
}

.report-chart-tab {
    min-height: 38px;
    padding: 8px 13px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.report-chart-tab:hover,
.report-chart-tab:focus-visible {
    color: var(--ink);
    outline: none;
}

.report-chart-tab.is-active {
    background: #ffffff;
    color: var(--red-dark);
    box-shadow: 0 6px 16px rgba(24, 45, 54, .08);
}

.report-chart-view {
    min-width: 0;
}

.report-chart-view[hidden] {
    display: none;
}

.report-bar-chart {
    display: grid;
    gap: 13px;
    padding-top: 4px;
}

.report-bar-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.report-bar-label {
    min-width: 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #44555d;
    font-size: 13px;
    font-weight: 800;
}

.report-bar-label span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.report-bar-label strong {
    color: var(--ink);
    white-space: nowrap;
}

.report-bar-track {
    position: relative;
    min-width: 0;
    height: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef3f4;
}

.report-bar-fill {
    width: var(--report-bar-size, 0%);
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--red), var(--red-dark));
    transform-origin: left center;
    animation: reportBarGrow .55s ease both;
}

@keyframes reportBarGrow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.report-year-chart {
    min-height: 290px;
    display: flex;
    align-items: stretch;
    gap: 10px;
    padding: 20px 4px 4px;
    overflow-x: auto;
    overflow-y: hidden;
}

.report-year-column {
    min-width: 58px;
    flex: 1 0 58px;
    display: grid;
    grid-template-rows: 22px minmax(180px, 1fr) 24px;
    gap: 7px;
    align-items: end;
    text-align: center;
}

.report-year-column > strong {
    color: var(--ink);
    font-size: 12px;
}

.report-year-column > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.report-year-bar {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 180px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(to top, transparent 24%, var(--line-soft) 25%, transparent 26%),
        linear-gradient(to top, transparent 49%, var(--line-soft) 50%, transparent 51%),
        linear-gradient(to top, transparent 74%, var(--line-soft) 75%, transparent 76%);
}

.report-year-bar span {
    width: min(36px, 74%);
    height: var(--report-year-size, 0%);
    min-height: 4px;
    display: block;
    border-radius: 10px 10px 3px 3px;
    background: linear-gradient(180deg, #2c7ebd, #205f8f);
    transform-origin: bottom center;
    animation: reportYearGrow .55s ease both;
}

@keyframes reportYearGrow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

/* ------------------------------------------------------------
   SP6-003 - Interaktive rapporter
   KPI-kort er informationskort. Diagrammet styrer filtrering.
   ------------------------------------------------------------ */

.report-bar-button {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    border-radius: 12px;
    transition: background .16s ease, box-shadow .16s ease;
}

.report-bar-button:hover,
.report-bar-button:focus-visible {
    background: rgba(208, 231, 238, .28);
    box-shadow: 0 0 0 6px rgba(208, 231, 238, .28);
    outline: none;
}

.report-bar-button.is-filtered {
    background: rgba(227, 6, 19, .055);
    box-shadow: 0 0 0 6px rgba(227, 6, 19, .055);
}

.report-bar-button:not(.is-filtered)[aria-pressed="false"] .report-bar-fill {
    opacity: .84;
}

.report-active-filter {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(227, 6, 19, .18);
    border-radius: 16px;
    background: var(--red-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.report-active-filter[hidden] {
    display: none;
}

.report-active-filter span,
.report-active-filter strong {
    display: block;
}

.report-active-filter span {
    color: var(--red-dark);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.report-active-filter strong {
    margin-top: 3px;
    color: var(--ink);
    font-size: 15px;
}

.report-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
}

.report-sort-button:hover,
.report-sort-button:focus-visible,
.report-sort-button.is-active {
    color: var(--red-dark);
    outline: none;
}

.report-sort-count {
    justify-content: flex-end;
}

.report-status-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.report-status-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--red);
    box-shadow: 0 0 0 3px rgba(227, 6, 19, .09);
}

.report-row[hidden] {
    display: none;
}

