﻿:root {
    --bg: #edf1f6;
    --bg-soft: #f7f9fc;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --surface-muted: rgba(247, 250, 253, 0.94);
    --text: #17202d;
    --text-soft: #596678;
    --line: rgba(96, 112, 133, 0.2);
    --line-strong: rgba(72, 88, 108, 0.34);
    --accent: #0b57d0;
    --accent-dark: #003ea8;
    --accent-soft: rgba(11, 87, 208, 0.12);
    --success: #1f8a54;
    --error: #b54747;
    --shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
    --radius-xl: 18px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 8px;
    --layout-gutter: clamp(18px, 1.8vw, 32px);
    --content-max-width: 100vw;
    --auth-max-width: 1720px;
    --app-max-width: 1880px;
    --app-sidebar-width: clamp(236px, 15vw, 292px);
    --font-sans: "Segoe UI Variable Display", "Aptos", "Trebuchet MS", sans-serif;
    --font-body: "Segoe UI Variable Text", "Aptos", "Trebuchet MS", sans-serif;
}

body.page-help .app-shell {
    gap: 12px;
}

body.page-help .card {
    border-radius: 14px;
}

.help-console,
.help-topic-stack,
.help-topic-content {
    display: grid;
    gap: 12px;
}

.help-search-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
    align-items: end;
    gap: 18px;
    padding: 18px;
}

.help-search-card h1 {
    margin: 4px 0 6px;
    font-size: clamp(1.45rem, 2vw, 2rem);
}

.help-search-card p,
.help-topic p,
.help-module-list span,
.help-role-card span,
.help-error-grid span,
.help-error-grid small,
.help-mini-panel p {
    color: var(--text-soft);
    line-height: 1.5;
}

.help-search-panel {
    display: grid;
    gap: 10px;
}

.help-search-field {
    position: relative;
    display: grid;
    gap: 7px;
}

.help-search-field span {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
}

.help-search-field i {
    position: absolute;
    left: 14px;
    bottom: 14px;
    color: var(--text-soft);
    pointer-events: none;
}

.help-search-field input {
    width: 100%;
    min-height: 50px;
    padding-left: 42px;
    font-size: 1rem;
}

.help-search-status {
    min-height: 1.4em;
    margin: -2px 0 0;
    font-size: 0.86rem;
    line-height: 1.45;
}

.help-search-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.help-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.help-shortcut {
    min-height: 88px;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    text-decoration: none;
    background: var(--surface);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.help-shortcut:hover {
    transform: translateY(-1px);
    border-color: rgba(11, 87, 208, 0.24);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
}

.help-shortcut i {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--accent-dark);
    background: var(--accent-soft);
}

.help-shortcut strong,
.help-shortcut small {
    display: block;
}

.help-shortcut small {
    margin-top: 3px;
    color: var(--text-soft);
    line-height: 1.3;
}

.help-workbench {
    display: grid;
    grid-template-columns: minmax(210px, 0.24fr) minmax(0, 1fr);
    align-items: start;
    gap: 12px;
}

.help-index-card {
    position: sticky;
    top: 12px;
}

.help-index {
    display: grid;
    gap: 4px;
}

.help-index a {
    min-height: 34px;
    display: flex;
    align-items: center;
    padding: 7px 9px;
    border-radius: 9px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 800;
}

.help-index a:hover {
    color: var(--accent-dark);
    background: var(--accent-soft);
}

.help-index a[hidden] {
    display: none;
}

.help-topic {
    scroll-margin-top: 24px;
}

.help-topic[data-help-search-match="true"] {
    border-color: rgba(11, 87, 208, 0.3);
    box-shadow: 0 16px 34px rgba(11, 87, 208, 0.08);
}

.help-topic [data-help-search-focus="true"] {
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.1);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.help-search-hit {
    padding: 0 0.16em;
    border-radius: 5px;
    color: inherit;
    background: linear-gradient(180deg, rgba(254, 240, 138, 0.9), rgba(253, 224, 71, 0.72));
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    font-weight: 850;
}

.help-topic summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--text);
    cursor: pointer;
    font-weight: 850;
    list-style: none;
}

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

.help-topic summary span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.help-match-badge {
    margin-left: auto;
    max-width: min(100%, 260px);
    padding: 4px 8px;
    border: 1px solid rgba(11, 87, 208, 0.18);
    border-radius: 999px;
    color: var(--accent-dark);
    background: var(--accent-soft);
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.help-topic summary i:first-child,
.help-empty-state .card-header i {
    color: var(--accent-dark);
}

.help-topic summary > i:last-child {
    color: var(--text-soft);
    transition: transform 160ms ease;
}

.help-topic[open] summary {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.help-topic[open] summary > i:last-child {
    transform: rotate(180deg);
}

.help-topic-content--split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.help-topic-content--split .help-callout {
    grid-column: 1 / -1;
}

.help-topic-content h2 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.help-step-list,
.help-rule-list {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 8px;
    line-height: 1.55;
}

.help-callout,
.help-mini-panel,
.help-module-list div,
.help-role-card,
.help-error-grid article {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-muted);
}

.help-callout {
    border-left: 4px solid var(--accent);
}

.help-callout--warning {
    border-left-color: #d97706;
}

.help-callout strong,
.help-mini-panel strong,
.help-module-list strong,
.help-role-card strong,
.help-error-grid strong {
    display: block;
    margin-bottom: 4px;
}

.help-callout p,
.help-topic-note,
.help-mini-panel p {
    margin: 0;
}

.help-mini-panel {
    align-self: start;
    display: grid;
    gap: 8px;
}

.help-module-list,
.help-role-grid,
.help-error-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.help-error-grid article {
    display: grid;
    gap: 5px;
}

.help-error-grid small {
    font-weight: 800;
}

.help-topic-note {
    margin-top: 12px;
}

.help-empty-state {
    border-style: dashed;
}

@media (max-width: 1180px) {
    .help-search-card,
    .help-workbench {
        grid-template-columns: 1fr;
    }

    .help-index-card {
        position: static;
    }

    .help-index {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .help-shortcut-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .help-search-card {
        padding: 14px;
    }

    .help-search-actions {
        justify-content: stretch;
    }

    .help-search-actions .secondary-button {
        flex: 1 1 auto;
    }

    .help-match-badge {
        margin-left: 0;
        white-space: normal;
    }

    .help-shortcut-grid,
    .help-index,
    .help-topic-content--split,
    .help-module-list,
    .help-role-grid,
    .help-error-grid {
        grid-template-columns: 1fr;
    }
}

[data-theme="dark"] {
    --bg: #0f1724;
    --bg-soft: #172131;
    --surface: rgba(24, 33, 48, 0.9);
    --surface-strong: #1d2838;
    --surface-muted: rgba(30, 40, 57, 0.9);
    --text: #eef4ff;
    --text-soft: #afbed6;
    --line: rgba(195, 208, 227, 0.16);
    --line-strong: rgba(195, 208, 227, 0.28);
    --accent: #5b9dff;
    --accent-dark: #3078eb;
    --accent-soft: rgba(91, 157, 255, 0.16);
    --success: #42bb7b;
    --error: #df6a6a;
    --shadow: 0 24px 72px rgba(0, 0, 0, 0.32);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    color-scheme: light;
    font-size: 14px;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.75)),
        linear-gradient(180deg, #f4f7fb 0%, #e7edf5 100%);
}

.app-body {
    padding: 14px;
    overflow-x: hidden;
}

body[data-theme="dark"] {
    color-scheme: dark;
    background:
        linear-gradient(180deg, rgba(10, 16, 26, 0.8), rgba(10, 16, 26, 0.8)),
        linear-gradient(180deg, #111b2a 0%, #0b1220 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(120, 135, 156, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 135, 156, 0.06) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.2), transparent 72%);
    pointer-events: none;
}

.auth-body,
.setup-body,
.dashboard-body,
.profile-body {
    padding: clamp(18px, 2vw, 32px);
}

.auth-body--minimal {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
}

.auth-shell,
.setup-shell,
.dashboard-shell {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 380ms ease, transform 380ms ease;
}

.auth-shell.is-ready,
.setup-shell.is-ready,
.dashboard-shell.is-ready {
    opacity: 1;
    transform: translateY(0);
}

.auth-shell {
    width: min(var(--auth-max-width), 100%);
    min-height: calc(100vh - (clamp(18px, 2vw, 32px) * 2));
    min-height: calc(100dvh - (clamp(18px, 2vw, 32px) * 2));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) clamp(400px, 31vw, 560px);
    gap: clamp(20px, 2.4vw, 36px);
    align-items: center;
}

.auth-shell--compact {
    width: min(560px, calc(100vw - (clamp(18px, 2vw, 32px) * 2)));
    min-height: auto;
    margin: 0 auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    justify-items: center;
}

.auth-panel,
.card,
.stat-card {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        var(--shadow);
}

.auth-panel--brand {
    padding: clamp(34px, 3.2vw, 56px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(22px, 2vw, 32px);
    min-height: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.72)),
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.08), transparent 34%);
}

.auth-panel--form {
    display: flex;
    align-items: stretch;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.auth-panel--solo {
    width: 100%;
    justify-content: center;
}

.auth-panel--form .card {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

.card--login {
    padding: clamp(24px, 2.6vw, 34px);
    width: min(560px, 100%);
    max-width: 100%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.82)),
        radial-gradient(circle at top, rgba(15, 118, 110, 0.08), transparent 48%);
    transition: opacity 220ms ease, transform 220ms ease, filter 220ms ease;
}

.auth-is-transitioning .card--login {
    opacity: 0.08;
    transform: scale(0.985);
    filter: blur(4px);
}

.auth-transition {
    position: fixed;
    inset: 0;
    z-index: 80;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.auth-transition[hidden] {
    display: none;
}

.auth-transition__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(248, 244, 236, 0.42);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 420ms ease;
}

.auth-transition.is-visible {
    opacity: 1;
}

.auth-transition.is-visible .auth-transition__backdrop {
    opacity: 1;
}

.auth-transition__panel {
    position: fixed;
    left: var(--auth-transition-left, 50%);
    top: var(--auth-transition-top, 50%);
    width: var(--auth-transition-width, 560px);
    height: var(--auth-transition-height, 420px);
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: var(--auth-transition-radius, 28px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88)),
        radial-gradient(circle at top, rgba(15, 118, 110, 0.08), transparent 48%);
    box-shadow: 0 28px 68px rgba(15, 118, 110, 0.14);
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
    transition:
        left 760ms cubic-bezier(0.65, 0, 0.35, 1),
        top 760ms cubic-bezier(0.65, 0, 0.35, 1),
        width 760ms cubic-bezier(0.65, 0, 0.35, 1),
        height 760ms cubic-bezier(0.65, 0, 0.35, 1),
        border-radius 760ms cubic-bezier(0.65, 0, 0.35, 1),
        box-shadow 760ms ease,
        opacity 220ms ease,
        transform 760ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth-transition.is-animating .auth-transition__panel {
    left: 50%;
    top: 50%;
    width: 132px;
    height: 132px;
    border-radius: 999px;
    box-shadow: 0 24px 54px rgba(15, 118, 110, 0.22);
    transform: translate(-50%, -50%) scale(1);
}

.auth-transition.is-success .auth-transition__panel {
    box-shadow: 0 26px 66px rgba(31, 138, 84, 0.24);
    transform: translate(-50%, -50%) scale(1.05);
}

.setup-shell,
.dashboard-shell {
    width: min(var(--content-max-width, 100%), calc(100vw - (var(--layout-gutter) * 2)));
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

.setup-intro {
    max-width: 760px;
}

.card,
.card--wide {
    padding: clamp(18px, 1.5vw, 24px);
    position: relative;
    overflow: hidden;
}

.card--wide {
    background: var(--surface);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 251, 0.96));
    border: 1px solid rgba(123, 138, 159, 0.34);
    color: var(--accent-dark);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-card-intro {
    display: grid;
    gap: 8px;
    margin-bottom: 8px;
}

.auth-card-intro h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.6rem);
}

h1,
h2,
h3,
strong {
    font-family: var(--font-sans);
}

h1 {
    margin: 20px 0 16px;
    font-size: clamp(1.7rem, 2.7vw, 2.5rem);
    line-height: 1.02;
    letter-spacing: 0;
}

.auth-panel h1 {
    margin: 8px 0 10px;
    font-size: clamp(2.15rem, 2.7vw, 3.3rem);
}

h2 {
    margin: 18px 0 10px;
    font-size: clamp(1.12rem, 1.45vw, 1.35rem);
    line-height: 1.1;
    letter-spacing: 0;
}

h3 {
    margin: 0 0 10px;
    font-size: 0.9rem;
}

.lead {
    max-width: 56ch;
    margin: 0;
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.45;
}

.auth-panel .lead {
    max-width: 48ch;
    font-size: 1rem;
}

.muted {
    color: var(--text-soft);
    font-size: 0.96rem;
    line-height: 1.6;
}

.auth-error.is-hidden {
    display: none;
}

.auth-transition__content {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 14px;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    transition: opacity 180ms ease 180ms, transform 180ms ease 180ms;
}

.auth-transition.is-animating .auth-transition__content,
.auth-transition.is-success .auth-transition__content {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.auth-transition__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(15, 118, 110, 0.14);
    border-top-color: var(--accent);
    border-right-color: rgba(15, 118, 110, 0.58);
    border-radius: 999px;
    animation: login-spinner 720ms linear infinite;
}

.auth-transition.is-success .auth-transition__spinner {
    border-top-color: var(--success);
    border-right-color: rgba(31, 138, 84, 0.62);
}

.auth-transition__label {
    color: var(--accent-dark);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* Login-siden får egen visuel scene, mens selve login-kortet bevares til transition-animationen. */
body.auth-body--login {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    overflow-x: hidden;
    background:
        linear-gradient(135deg, rgba(232, 246, 242, 0.92) 0%, rgba(247, 250, 253, 0.98) 44%, rgba(235, 240, 255, 0.96) 100%),
        linear-gradient(180deg, #f8fbff 0%, #edf3f8 100%);
}

body.auth-body--login::before {
    z-index: 0;
    background-image:
        linear-gradient(rgba(34, 63, 95, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 63, 95, 0.06) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.28), transparent 68%);
}

body.auth-body--login::after {
    content: "";
    position: fixed;
    inset: -18% -12%;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(118deg, transparent 0 22%, rgba(11, 87, 208, 0.08) 22% 22.7%, transparent 22.7% 47%, rgba(15, 118, 110, 0.1) 47% 47.7%, transparent 47.7% 100%),
        linear-gradient(63deg, transparent 0 55%, rgba(248, 181, 72, 0.12) 55% 55.8%, transparent 55.8% 100%);
}

.auth-shell.auth-shell--login {
    position: relative;
    z-index: 1;
    width: min(1180px, 100%);
    min-height: calc(100vh - (clamp(18px, 2vw, 32px) * 2));
    min-height: calc(100dvh - (clamp(18px, 2vw, 32px) * 2));
    grid-template-columns: minmax(0, 1fr) minmax(380px, 470px);
    gap: clamp(18px, 2.4vw, 32px);
}

.auth-panel--login-form {
    align-items: center;
}

/* Centrerer login-kortet, når brandpanelet ikke renderes på siden. */
.auth-shell.auth-shell--login > .auth-panel--login-form:first-child {
    grid-column: 1 / -1;
    justify-content: center;
}

.card.card--login {
    position: relative;
    padding: clamp(28px, 3vw, 40px);
    border-color: rgba(78, 96, 119, 0.2);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.9)),
        linear-gradient(135deg, rgba(15, 118, 110, 0.07), rgba(11, 87, 208, 0.05));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.84),
        0 30px 76px rgba(17, 31, 51, 0.14);
}

.card.card--login::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(90deg, #0f766e 0%, #0b57d0 52%, #f8b548 100%);
}

.card-header--login {
    justify-content: flex-start;
    margin-bottom: clamp(22px, 2vw, 30px);
}

.auth-login-logo {
    display: block;
    width: min(220px, 78%);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 12px 18px rgba(11, 87, 208, 0.16));
}

.card--login .auth-card-intro {
    gap: 10px;
    margin-bottom: 22px;
}

.card--login .auth-card-intro h1 {
    font-size: 3rem;
    line-height: 0.98;
}

.card--login .auth-card-intro p {
    margin: 0;
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.5;
}

.card--login .auth-form {
    gap: 18px;
}

.card--login .field span {
    color: #33445a;
}

.card--login input {
    min-height: 54px;
    border-radius: var(--radius-md);
    border-color: rgba(101, 118, 141, 0.38);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 253, 0.96));
}

.card--login input:focus {
    box-shadow:
        0 0 0 1px var(--accent),
        0 0 0 5px rgba(11, 87, 208, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.card--login .password-field {
    grid-template-columns: minmax(0, 1fr) minmax(70px, auto);
}

.card--login .ghost-button {
    border-radius: var(--radius-md);
}

.primary-button--login {
    width: 100%;
    min-height: 58px;
    margin-top: 2px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #0f766e 0%, #0b57d0 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        0 16px 28px rgba(11, 87, 208, 0.22);
}

.card--login .setup-box {
    margin-top: 22px;
}

@media (max-width: 1120px) {
    .auth-shell.auth-shell--login {
        width: min(760px, 100%);
        grid-template-columns: 1fr;
        align-items: stretch;
    }

}

@media (max-width: 760px) {
    body.auth-body--login {
        padding: 14px;
    }

    .auth-shell.auth-shell--login {
        min-height: calc(100dvh - 28px);
        gap: 14px;
    }

    .card.card--login {
        padding: 24px;
        border-radius: var(--radius-xl);
    }

    .card--login .auth-card-intro h1 {
        font-size: 2.35rem;
    }

    .card--login input,
    .primary-button--login {
        min-height: 50px;
    }
}

@media (max-width: 520px) {
    body.auth-body--login {
        place-items: stretch;
    }

    .auth-shell.auth-shell--login {
        width: 100%;
        min-height: calc(100dvh - 28px);
        align-items: center;
    }

    .card.card--login {
        padding: 22px;
    }

    .card--login .password-field {
        grid-template-columns: 1fr;
    }

    .card--login .ghost-button {
        min-height: 44px;
    }
}

.task-transition {
    position: fixed;
    inset: 0;
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.task-transition[hidden] {
    display: none;
}

.task-transition.is-visible {
    opacity: 1;
}

.task-transition__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(243, 239, 231, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.task-transition__panel {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(560px, calc(100vw - 32px));
    padding: clamp(24px, 2.6vw, 34px);
    display: grid;
    gap: 16px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(15, 118, 110, 0.16);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
        radial-gradient(circle at top, rgba(15, 118, 110, 0.08), transparent 48%);
    box-shadow: 0 30px 70px rgba(15, 118, 110, 0.16);
    transform: translate(-50%, -50%) scale(0.96);
    transition: transform 280ms ease, opacity 280ms ease;
}

.task-transition.is-create-flow .task-transition__panel {
    border-color: rgba(11, 87, 208, 0.2);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
        radial-gradient(circle at top, rgba(11, 87, 208, 0.09), transparent 48%);
    box-shadow: 0 30px 70px rgba(11, 87, 208, 0.14);
}

.task-transition.is-visible .task-transition__panel {
    transform: translate(-50%, -50%) scale(1);
}

.task-transition__eyebrow {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-dark);
}

.task-transition.is-completion-flow .task-transition__eyebrow {
    color: #0f766e;
}

.task-transition__title {
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    line-height: 1.15;
}

.task-transition__label {
    margin: 0;
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.6;
}

.task-transition__progress {
    position: relative;
    width: 100%;
    height: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.08);
    border: 1px solid rgba(15, 118, 110, 0.12);
}

.task-transition.is-create-flow .task-transition__progress {
    background: rgba(11, 87, 208, 0.08);
    border-color: rgba(11, 87, 208, 0.14);
}

.task-transition__progress-bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    border-radius: inherit;
    background:
        linear-gradient(90deg, rgba(15, 118, 110, 0.96), rgba(31, 138, 84, 0.82));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    transition: width 160ms linear;
}

.task-transition.is-create-flow .task-transition__progress-bar {
    background:
        linear-gradient(90deg, rgba(11, 87, 208, 0.96), rgba(38, 121, 255, 0.82));
}

.task-transition__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.session-timeout {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: grid;
    place-items: center;
    padding: 18px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.session-timeout[hidden] {
    display: none;
}

.session-timeout.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.session-timeout__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.session-timeout__panel {
    position: relative;
    width: min(520px, 100%);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    padding: 22px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(217, 119, 6, 0.26);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 251, 235, 0.96));
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
    transform: translateY(8px) scale(0.98);
    transition: transform 180ms ease;
}

.session-timeout.is-visible .session-timeout__panel {
    transform: translateY(0) scale(1);
}

.session-timeout__icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #9a3412;
    background: rgba(251, 191, 36, 0.2);
}

.session-timeout__copy {
    display: grid;
    gap: 4px;
}

.session-timeout__eyebrow {
    color: #9a3412;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.session-timeout__copy strong {
    color: var(--text);
    font-size: 1.16rem;
    line-height: 1.2;
}

.session-timeout__copy p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.5;
}

.session-timeout__actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.task-draft-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.task-draft-notice__copy {
    display: grid;
    gap: 2px;
}

.task-draft-notice__copy strong,
.task-draft-notice__copy span {
    line-height: 1.35;
}

.task-draft-notice__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.feature-grid,
.stat-grid,
.content-grid {
    display: grid;
    gap: 12px;
}

.auth-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(10px, 1vw, 16px);
    margin-top: 4px;
}

.feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 48px;
}

.feature-card,
.assignment-card,
.roadmap-item,
.summary-item,
.read-only-box,
.theme-option-card,
.department-choice {
    padding: 14px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface-muted);
}

.feature-card h2,
.roadmap-item strong {
    margin: 0 0 10px;
    font-size: 1rem;
}

.feature-card p,
.roadmap-item p,
.assignment-card small {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.assignment-card .assignment-card__warning {
    color: #9a3412;
    font-weight: 800;
}

.feature-card__label {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--accent-dark);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.feature-card--auth {
    padding: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.18)),
        var(--surface-muted);
}

.feature-card--auth h2 {
    margin-bottom: 6px;
    font-size: 0.96rem;
}

.feature-card--auth p {
    font-size: 0.84rem;
    line-height: 1.45;
}

.card-header,
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.header-actions form {
    margin: 0;
}

.card-header {
    color: var(--text-soft);
    font-size: 1.02rem;
    margin-bottom: 10px;
}

.card-header span:last-child {
    font-weight: 700;
    color: var(--text);
}

.card-header i,
.admin-section-heading i {
    color: var(--accent-dark);
    font-size: 0.98rem;
}

.status-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.12);
}

.form-stack,
.grid-form {
    display: grid;
    gap: 16px;
}

.grid-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
}

.field {
    display: grid;
    gap: 8px;
}

.field--full {
    grid-column: 1 / -1;
}

.field.is-optional-empty select {
    border-style: dashed;
}

.field span,
.form-section-title,
.stat-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #415165;
}

.form-section-title {
    grid-column: 1 / -1;
    padding-top: 8px;
}

input {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    font: inherit;
    color: var(--text);
    caret-color: var(--accent-dark);
    cursor: text;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
    border: 1px solid #bcc6d2;
    border-radius: var(--radius-md);
    outline: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.94),
        inset 0 0 0 1px rgba(255, 255, 255, 0.38);
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

input:focus {
    border-color: var(--accent);
    box-shadow:
        0 0 0 1px var(--accent),
        0 0 0 4px rgba(11, 87, 208, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.password-field {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.primary-button,
.secondary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 10px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-button {
    border: 1px solid rgba(0, 59, 163, 0.24);
    color: #ffffff;
    background: linear-gradient(180deg, #1673ff 0%, #0b57d0 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        0 8px 18px rgba(11, 87, 208, 0.18);
}

.primary-button--login[disabled] {
    cursor: wait;
    opacity: 0.88;
}

.primary-button:disabled:not(.primary-button--login),
.secondary-button:disabled,
.ghost-button:disabled {
    cursor: not-allowed;
    opacity: 0.52;
    transform: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

@keyframes login-spinner {
    to {
        transform: rotate(360deg);
    }
}

.secondary-button,
.ghost-button {
    border: 1px solid #b7c3d2;
    color: var(--text);
    background: linear-gradient(180deg, #ffffff 0%, #eef3f8 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.text-link {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent-dark);
    justify-content: flex-start;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.text-link:hover {
    transform: translateY(-1px);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        0 10px 18px rgba(15, 23, 42, 0.08);
}

.primary-button:disabled:not(.primary-button--login):hover,
.secondary-button:disabled:hover,
.ghost-button:disabled:hover {
    transform: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(169, 182, 198, 0.52);
    line-height: 1.6;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.alert--success {
    color: #0d5b35;
    background: linear-gradient(180deg, rgba(239, 250, 244, 0.98), rgba(230, 246, 238, 0.96));
    border-color: rgba(31, 138, 84, 0.22);
}

.alert--warning {
    color: #8a4f08;
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(254, 243, 199, 0.94));
    border-color: rgba(217, 119, 6, 0.24);
}

.alert--info {
    color: var(--accent-dark);
    background: linear-gradient(180deg, rgba(238, 245, 255, 0.98), rgba(226, 238, 255, 0.94));
    border-color: rgba(11, 87, 208, 0.22);
}

.task-kpi-filter-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.task-kpi-filter-alert span {
    color: var(--text-soft);
    font-weight: 700;
}

.task-recurrence-notice {
    margin-bottom: 18px;
    display: grid;
    gap: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.84)),
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.1), transparent 42%);
}

.task-recurrence-notice__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.task-recurrence-notice__copy {
    display: grid;
    gap: 8px;
}

.task-recurrence-notice__copy strong {
    font-size: 1.1rem;
}

.task-recurrence-notice__copy .muted {
    margin: 0;
}

.task-recurrence-notice__dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 860px) {
    .task-recurrence-notice__grid,
    .task-recurrence-notice__dates {
        grid-template-columns: minmax(0, 1fr);
    }
}

.alert--error {
    color: #8e2a2a;
    background: linear-gradient(180deg, rgba(253, 242, 242, 0.98), rgba(249, 231, 231, 0.96));
    border-color: rgba(181, 71, 71, 0.24);
}

.setup-box {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.dashboard-header {
    align-items: flex-start;
}

.stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
    padding: 16px;
}

.stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: clamp(1.28rem, 1.35vw, 1.6rem);
    letter-spacing: 0;
}

.content-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
}

.assignment-list,
.roadmap-list {
    display: grid;
    gap: 10px;
}

.profile-grid {
    align-items: start;
}

.profile-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.summary-item strong {
    display: block;
    margin-top: 8px;
    font-size: 1.05rem;
}

body.page-profile .app-shell {
    gap: 8px;
    align-content: start;
    padding-top: 0;
}

body.page-profile .page-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 0;
}

body.page-profile .page-hero__content {
    gap: 4px;
    max-width: 64ch;
}

body.page-profile .page-hero h1 {
    font-size: clamp(1.45rem, 1.8vw, 2rem);
}

body.page-profile .page-hero .lead {
    line-height: 1.45;
}

body.page-equipment {
    font-size: 12px;
}

.profile-form {
    margin-top: 8px;
}

.profile-overview,
.profile-workspace,
.profile-main-column,
.profile-side-column,
.profile-fact-grid,
.profile-stat-grid,
.profile-task-list {
    display: grid;
    gap: 12px;
}

.profile-overview {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
    align-items: start;
}

.profile-workspace {
    grid-template-columns: minmax(0, 1.38fr) minmax(320px, 0.82fr);
    align-items: start;
}

.profile-main-column,
.profile-side-column {
    align-content: start;
}

.profile-section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.profile-section-grid--narrow {
    max-width: none;
}

.profile-panel {
    display: grid;
    gap: 18px;
}

.profile-hero-card {
    display: grid;
    gap: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.18)),
        radial-gradient(circle at right top, rgba(15, 118, 110, 0.12), transparent 34%),
        var(--surface);
}

.profile-hero-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.profile-hero-card__identity {
    display: grid;
    gap: 10px;
    max-width: 64ch;
}

.profile-hero-card__identity h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 2.2rem);
}

.profile-hero-card__actions,
.profile-side-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--accent-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-fact-grid,
.profile-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-fact-card {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05)),
        var(--surface-muted);
}

.profile-fact-card strong,
.profile-signal-card__title {
    font-size: 1.12rem;
    line-height: 1.2;
}

.profile-fact-card small,
.profile-task-item small {
    color: var(--text-soft);
    line-height: 1.5;
}

.profile-signal-card {
    display: grid;
    gap: 16px;
}

.profile-signal-card--warning {
    background:
        linear-gradient(180deg, rgba(181, 71, 71, 0.08), rgba(255, 255, 255, 0.78)),
        var(--surface);
}

.profile-signal-card .stat-card {
    box-shadow: none;
}

body.page-profile .stat-card .text-link {
    display: inline-flex;
    width: fit-content;
    margin-top: 10px;
}

.profile-task-group {
    display: grid;
    gap: 12px;
}

.profile-task-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-task-group__header h3 {
    margin: 0;
    font-size: 0.98rem;
}

.profile-task-item {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface-muted);
    color: var(--text);
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.profile-task-item:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 118, 110, 0.28);
    box-shadow: 0 16px 28px rgba(15, 118, 110, 0.08);
}

.profile-task-item__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.profile-side-actions {
    margin-top: 4px;
}

.profile-shortcut-grid,
.profile-task-dashboard,
.profile-work-actions {
    display: grid;
    gap: 12px;
}

.profile-shortcut-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-shortcut-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 104px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.profile-shortcut-card:hover {
    transform: translateY(-1px);
    border-color: rgba(11, 87, 208, 0.22);
    background: linear-gradient(180deg, rgba(238, 245, 255, 0.96), rgba(255, 255, 255, 0.96));
    box-shadow: 0 16px 30px rgba(11, 87, 208, 0.1);
}

.profile-shortcut-card__icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--accent-dark);
    background: var(--accent-soft);
}

.profile-shortcut-card strong,
.profile-shortcut-card small {
    display: block;
}

.profile-shortcut-card small {
    margin-top: 4px;
    color: var(--text-soft);
    line-height: 1.45;
}

.profile-stat-grid--wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-task-dashboard {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

.profile-task-dashboard .profile-task-group {
    width: 100%;
}

.profile-work-actions {
    grid-template-columns: repeat(2, max-content);
    align-items: center;
}

body.page-profile .profile-task-table {
    table-layout: fixed;
    min-width: 820px;
    border-collapse: separate;
    border-spacing: 0;
}

body.page-profile .dashboard-task-card-header__title > span:last-child {
    color: var(--text);
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1.2;
}

body.page-profile .profile-task-table th:nth-child(1),
body.page-profile .profile-task-table td:nth-child(1) {
    width: 36%;
}

body.page-profile .profile-task-table th:nth-child(2),
body.page-profile .profile-task-table td:nth-child(2) {
    width: 22%;
}

body.page-profile .profile-task-table th:nth-child(3),
body.page-profile .profile-task-table td:nth-child(3) {
    width: 16%;
}

body.page-profile .profile-task-table th:nth-child(4),
body.page-profile .profile-task-table td:nth-child(4) {
    width: 16%;
}

body.page-profile .profile-task-table th:nth-child(5),
body.page-profile .profile-task-table td:nth-child(5) {
    width: 10%;
}

body.page-profile .profile-task-table tbody td {
    border-bottom: 0;
}

body.page-profile .profile-task-table tbody tr:not(:last-child) td {
    box-shadow: inset 0 -1px 0 var(--line);
}

body.page-profile .profile-task-table th:last-child,
body.page-profile .profile-task-table__action-cell {
    text-align: right;
}

body.page-profile .profile-task-table .badge {
    white-space: nowrap;
}

body.page-profile .profile-task-table .text-link {
    white-space: nowrap;
}

.theme-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.theme-option {
    display: block;
    cursor: pointer;
}

.theme-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme-option-card {
    display: grid;
    gap: 8px;
    min-height: 132px;
    align-content: space-between;
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.theme-option-card strong {
    font-size: 1rem;
}

.theme-option-card small,
.department-choice small {
    color: var(--text-soft);
    line-height: 1.5;
}

.theme-option input:checked + .theme-option-card {
    border-color: rgba(15, 118, 110, 0.46);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
    transform: translateY(-1px);
    background: var(--accent-soft);
}

.dashboard-order-form,
.dashboard-order-list {
    display: grid;
    gap: 12px;
}

.dashboard-order-locks {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dashboard-order-locks span {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text-soft);
    background: var(--surface-muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.dashboard-order-list {
    grid-template-columns: minmax(0, 1fr);
}

.dashboard-order-row {
    display: grid;
    grid-template-columns: 34px 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
    cursor: default;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.dashboard-order-row--selectable {
    grid-template-columns: 34px minmax(68px, auto) 34px minmax(0, 1fr) auto;
}

.dashboard-order-row:hover,
.dashboard-order-row:focus-within {
    border-color: rgba(11, 87, 208, 0.28);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 24px rgba(11, 87, 208, 0.08);
}

.dashboard-order-row.is-dragging {
    opacity: 0.64;
    cursor: grabbing;
    transform: scale(0.992);
    border-color: rgba(11, 87, 208, 0.42);
    box-shadow: 0 16px 30px rgba(11, 87, 208, 0.12);
}

.dashboard-order-row__handle,
.dashboard-order-row__position,
.dashboard-order-row__move {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dashboard-order-row__handle {
    width: 34px;
    height: 46px;
    color: var(--text-soft);
    font-size: 1.05rem;
    cursor: grab;
    touch-action: none;
}

.dashboard-order-row.is-dragging .dashboard-order-row__handle {
    cursor: grabbing;
}

.dashboard-order-row__position {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(11, 87, 208, 0.08);
    color: var(--accent-dark);
    font-size: 0.82rem;
    font-weight: 900;
}

.dashboard-order-row__copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.dashboard-order-row__copy strong {
    color: var(--text);
    font-size: 0.98rem;
}

.dashboard-order-row__copy small {
    color: var(--text-soft);
    line-height: 1.45;
}

.dashboard-order-row__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
}

.dashboard-order-row__toggle input {
    width: 18px;
    height: 18px;
    min-height: 0;
    margin: 0;
    padding: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.dashboard-order-row__actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dashboard-order-row__move {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(123, 138, 159, 0.32);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    cursor: pointer;
}

.dashboard-order-row__move:hover:not(:disabled) {
    border-color: rgba(11, 87, 208, 0.36);
    color: var(--accent-dark);
}

.dashboard-order-row__move:disabled {
    opacity: 0.36;
    cursor: not-allowed;
}

.department-choice-list {
    display: grid;
    gap: 12px;
}

.department-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.department-choice-main {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    flex: 1;
}

.department-choice-main input,
.primary-choice input {
    width: 20px;
    min-height: 20px;
    margin: 0;
    accent-color: var(--accent);
}

.department-choice-main div {
    display: grid;
    gap: 4px;
}

.primary-choice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-weight: 700;
    white-space: nowrap;
}

.assignment-card {
    display: grid;
    gap: 4px;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 8px;
}

.form-actions--end {
    justify-content: flex-end;
}

@media (max-width: 1120px) {
    .auth-shell {
        min-height: auto;
        grid-template-columns: 1fr;
        align-items: start;
    }

    .auth-panel--brand {
        justify-content: flex-start;
    }

    .auth-highlights {
        grid-template-columns: 1fr;
        margin-top: 24px;
    }

    .auth-panel--form .card {
        max-width: 720px;
        margin: 0 auto;
    }
}

@media (max-width: 980px) {
    .overview-screen-admin-form,
    .overview-screen-admin-row,
    .overview-screen-scope-tools,
    .overview-screen-scope-layout,
    .overview-screen-metric-layout,
    .overview-screen-metric-options {
        grid-template-columns: 1fr;
    }

    .auth-shell,
    .content-grid,
    .stat-grid,
    .feature-grid,
    .profile-overview,
    .profile-section-grid,
    .profile-task-dashboard {
        grid-template-columns: 1fr;
    }

    .auth-panel--brand {
        min-height: auto;
        padding: 32px;
    }

    .auth-panel--form .card {
        margin: 0 auto;
    }

    .dashboard-header {
        flex-direction: column;
    }

    .profile-summary,
    .theme-option-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .auth-body,
    .setup-body,
    .dashboard-body {
        padding: 18px;
    }

    .grid-form {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .card,
    .card--wide {
        padding: 22px;
    }

    .department-choice {
        flex-direction: column;
        align-items: stretch;
    }

    .primary-choice {
        justify-content: flex-start;
    }

    h1 {
        font-size: 2.4rem;
    }
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="tel"],
input[type="url"],
select,
textarea {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    font: inherit;
    color: var(--text);
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
    border: 1px solid #bcc6d2;
    border-radius: var(--radius-md);
    outline: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.94),
        inset 0 0 0 1px rgba(255, 255, 255, 0.38);
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

textarea {
    min-height: 132px;
    resize: vertical;
    caret-color: var(--accent-dark);
    cursor: text;
}

select,
input[type="date"],
input[type="checkbox"],
input[type="radio"] {
    cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

.help-search-field input[type="search"] {
    padding-left: 42px;
}

input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
}

body.page-equipment input,
body.page-equipment select,
body.page-equipment textarea {
    min-height: 40px;
    padding: 10px 12px;
}

body.page-equipment textarea {
    min-height: 88px;
}

body.page-equipment .equipment-log-form textarea,
body.page-equipment textarea[name="status_note"] {
    min-height: 72px;
}

select[multiple] {
    min-height: 168px;
}

input[type="text"]:focus,
input[type="search"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow:
        0 0 0 1px var(--accent),
        0 0 0 4px rgba(11, 87, 208, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea,
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: rgba(220, 38, 38, 0.78);
    background: linear-gradient(180deg, #fffafa 0%, #fff1f2 100%);
    box-shadow:
        0 0 0 1px rgba(220, 38, 38, 0.16),
        0 0 0 4px rgba(220, 38, 38, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.field.is-invalid > span {
    color: #991b1b;
}

.app-frame {
    width: min(var(--app-max-width), calc(100vw - (var(--layout-gutter) * 2)));
    min-height: calc(100vh - 36px);
    min-height: calc(100dvh - 36px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: var(--app-sidebar-width) minmax(0, 1fr);
    gap: clamp(12px, 1vw, 18px);
}

.app-sidebar {
    position: sticky;
    top: 18px;
    width: 100%;
    align-self: start;
    font-size: 1rem;
    max-height: calc(100vh - 36px);
    max-height: calc(100dvh - 36px);
}

.app-sidebar__panel,
.app-topbar {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(177, 188, 203, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 14px 32px rgba(15, 23, 42, 0.08);
}

body[data-theme="dark"] .app-sidebar__panel,
body[data-theme="dark"] .app-topbar {
    background: rgba(24, 33, 48, 0.92);
}

.app-sidebar__panel {
    width: 100%;
    min-height: calc(100vh - 36px);
    min-height: calc(100dvh - 36px);
    height: calc(100vh - 36px);
    height: calc(100dvh - 36px);
    padding: 14px;
    border-radius: 16px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 16px;
    overflow: hidden;
}

.app-sidebar__section {
    display: grid;
    gap: 10px;
    min-height: 0;
    align-content: start;
}

.app-sidebar__section--meta {
    align-self: end;
}

.app-sidebar__label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.sidebar-meta-card {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(184, 194, 208, 0.72);
    background: linear-gradient(180deg, #ffffff 0%, #f2f6fb 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.sidebar-meta-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.00rem;
}

.sidebar-meta-card p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.45;
    font-size: 0.82rem;
}

.app-brand {
    display: grid;
    gap: 6px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    color: var(--text);
    text-decoration: none;
}

.app-brand__logo-frame {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: min(172px, 100%);
    height: 68px;
    overflow: visible;
}

.app-brand__logo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 172px;
    max-height: 68px;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 10px 18px rgba(11, 87, 208, 0.16));
}

.app-brand__text {
    display: grid;
    min-width: 0;
    padding-left: 3px;
}

.app-brand__text small,
.app-user__meta small {
    color: var(--text-soft);
    line-height: 1.35;
    font-size: 0.9rem;
}

.app-nav {
    display: grid;
    gap: 6px;
    align-content: start;
    grid-auto-rows: max-content;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.app-nav__link {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(189, 198, 210, 0.4);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(245, 248, 252, 0.56));
    transition: background 180ms ease, color 180ms ease, transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.app-nav__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    font-size: 0.96rem;
}

.app-nav__copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.app-nav__title,
.app-nav__link small {
    display: block;
}

.app-nav__title {
    font-size: 0.94rem;
}

.app-nav__link small {
    color: var(--text-soft);
    font-weight: 500;
    line-height: 1.35;
    font-size: 0.8rem;
}

.app-nav__link.is-active,
.app-nav__link:hover {
    color: var(--text);
    border-color: rgba(11, 87, 208, 0.28);
    background: linear-gradient(180deg, rgba(238, 245, 255, 0.98), rgba(227, 238, 255, 0.98));
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 8px 18px rgba(11, 87, 208, 0.08);
}

.app-nav__link.is-active .app-nav__icon,
.app-nav__link:hover .app-nav__icon {
    color: var(--accent-dark);
}

.app-nav__submenu {
    display: grid;
    gap: 3px;
    margin: -2px 0 6px 18px;
    padding: 2px 0 2px 13px;
    border-left: 1px solid rgba(96, 112, 133, 0.2);
}

.app-nav__sublink {
    display: grid;
    grid-template-columns: 15px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.app-nav__sublink i {
    width: 15px;
    color: inherit;
    font-size: 0.76rem;
    text-align: center;
}

.app-nav__sublink span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-nav__sublink.is-active,
.app-nav__sublink:hover {
    color: var(--accent-dark);
    border-color: rgba(11, 87, 208, 0.16);
    background: rgba(238, 245, 255, 0.76);
}

.app-workspace {
    min-width: 0;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 12px;
}

.app-topbar {
    position: relative;
    z-index: 20;
    padding: 10px 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 1rem;
}

.app-topbar__left {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    gap: 12px;
    min-width: 0;
}

.app-topbar__summary {
    display: grid;
    gap: 1px;
    min-width: 0;
    max-width: min(76ch, 100%);
}

.app-topbar__title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.12rem;
    line-height: 1.2;
}

.app-topbar__context {
    display: block;
    color: var(--text-soft);
    line-height: 1.4;
    font-size: 0.86rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-nav-toggle {
    display: none;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid #b7c3d2;
    background: linear-gradient(180deg, #ffffff 0%, #eef3f8 100%);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.app-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.app-header__context-actions,
.app-header__quick-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px 0 2px;
    margin-right: 2px;
    border-right: 1px solid rgba(184, 194, 208, 0.58);
}

.app-header__context-actions .primary-button,
.app-header__context-actions .secondary-button,
.app-header__context-actions .ghost-button,
.app-header__quick-actions .primary-button,
.app-header__quick-actions .secondary-button,
.app-header__quick-actions .ghost-button {
    min-height: 40px;
    padding: 0 16px;
    white-space: nowrap;
}

.app-help-button {
    min-width: 42px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    border-radius: 12px;
    color: var(--accent-dark);
    text-decoration: none;
    font-weight: 800;
    white-space: nowrap;
    background: var(--accent-soft);
    border: 1px solid rgba(11, 87, 208, 0.14);
}

.app-help-button i {
    font-size: 1rem;
}

.app-help-button:hover,
.app-help-button.is-active {
    color: #ffffff;
    background: linear-gradient(180deg, #1673ff 0%, #0b57d0 100%);
    border-color: transparent;
}

.app-header__cluster {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 6px;
    border-radius: 16px;
    border: 1px solid rgba(184, 194, 208, 0.72);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(242, 246, 251, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 10px 24px rgba(15, 23, 42, 0.04);
}

.app-presence {
    display: grid;
    gap: 3px;
    min-width: 140px;
    padding: 8px 14px;
}

.app-presence__label {
    color: var(--text-soft);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-presence__value {
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.25;
}

.app-presence__value small {
    margin-left: 6px;
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 600;
}

.app-user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 12px;
    border-left: 1px solid rgba(184, 194, 208, 0.58);
    border-right: 1px solid rgba(184, 194, 208, 0.58);
    border-top: 0;
    border-bottom: 0;
    color: var(--text);
    text-decoration: none;
    background: transparent;
    box-shadow: none;
    font-size: 0.9rem;
}

.app-user__avatar {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(180deg, #1673ff 0%, #0b57d0 100%);
}

.app-user__meta {
    display: grid;
    gap: 2px;
}

.app-user__meta strong {
    line-height: 1.15;
}

.app-logout-form {
    margin: 0;
}

.app-logout-form .secondary-button {
    min-height: 40px;
    padding: 0 16px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.app-shell {
    width: 100%;
    margin: 0;
    padding: 2px 0 18px;
    display: grid;
    gap: 14px;
    align-content: start;
    /*
     * Indholdet skal være stabilt fra første frame. En transform/opacity-baseret
     * opstartsanimation på hele appen kan få Chromium til midlertidigt at miste
     * cursoren over inputs og draggable områder, mens siden initialiserer.
     */
    opacity: 1;
    transform: none;
}

.app-shell.is-ready {
    opacity: 1;
    transform: none;
}

.page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 18px;
    padding: 0 2px 2px;
}

.page-hero__content {
    display: grid;
    gap: 6px;
}

.page-kicker {
    color: var(--accent-dark);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-hero h1 {
    margin: 0;
}

.page-hero .lead {
    max-width: 60ch;
    margin: 0;
}

.page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    align-self: center;
    padding: 6px;
    border-radius: 16px;
    border: 1px solid rgba(184, 194, 208, 0.72);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(242, 246, 251, 0.92));
}

body.page-equipment .app-shell {
    gap: 10px;
    align-content: start;
    padding-bottom: 12px;
}

body.page-equipment .page-hero {
    grid-template-columns: minmax(0, 1.8fr) auto;
    gap: 10px;
    padding: 0;
}

body.page-equipment .page-hero h1 {
    margin: 4px 0 6px;
    font-size: clamp(1.2rem, 1.45vw, 1.6rem);
}

body.page-equipment .page-hero .lead,
body.page-equipment .muted,
body.page-equipment .read-only-box p,
body.page-equipment .equipment-hero__summary,
body.page-equipment .assignment-card small,
body.page-equipment .data-table td,
body.page-equipment .data-table td small,
body.page-equipment .equipment-qr-box__meta small,
body.page-equipment .text-link {
    font-size: 0.90rem;
    line-height: 1.35;
}

body.page-equipment .page-actions {
    gap: 6px;
}

body.page-equipment .content-grid,
body.page-equipment .content-grid--wide {
    gap: 10px;
    align-items: start;
}

body.page-equipment .content-grid--wide {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
}

body.page-equipment .equipment-detail-layout > .equipment-detail-card:first-child {
    grid-column: 1;
    grid-row: 1;
}

body.page-equipment .equipment-detail-layout > aside.equipment-detail-card {
    grid-column: 2;
    grid-row: 1;
}

body.page-equipment .equipment-detail-layout > .equipment-detail-secondary {
    grid-column: 1;
    grid-row: 2;
    margin-top: 0;
}

body.page-equipment .equipment-detail-layout > .equipment-photo-section {
    grid-column: 1;
    grid-row: 3;
    margin-top: 0;
}

body.page-equipment .equipment-dashboard-stack {
    gap: 14px;
    align-content: start;
}

body.page-equipment .equipment-dashboard-card {
    width: 100%;
    max-width: none;
}

body.page-equipment .equipment-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

body.page-equipment .equipment-section-head--align-end {
    align-items: end;
}

body.page-equipment .equipment-section-copy {
    display: grid;
    gap: 4px;
}

body.page-equipment .equipment-section-copy .card-header {
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 0;
}

body.page-equipment .equipment-section-copy .status-dot {
    flex: 0 0 auto;
}

body.page-equipment .equipment-section-intro {
    margin: 0;
    max-width: 72ch;
}

body.page-equipment .equipment-priority-card {
    display: grid;
    gap: 8px;
}

body.page-equipment .equipment-priority-summary {
    display: grid;
    gap: 2px;
    min-width: 112px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.7);
    text-align: right;
}

body.page-equipment .equipment-priority-summary strong {
    font-size: 1.3rem;
    line-height: 1;
    color: var(--text);
}

body.page-equipment .equipment-priority-summary span {
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

body.page-equipment .equipment-priority-summary--danger {
    border-color: rgba(220, 38, 38, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(254, 242, 242, 0.96));
}

body.page-equipment .equipment-priority-summary--danger strong,
body.page-equipment .equipment-priority-summary--danger span {
    color: #991b1b;
}

body.page-equipment .card,
body.page-equipment .card--wide,
body.page-equipment .stat-card {
    padding: 10px;
    border-radius: 14px;
}

body.page-equipment .card-header,
body.page-equipment .data-table th,
body.page-equipment .stat-label,
body.page-equipment .field span {
    font-size: 0.90rem;
}

body.page-equipment .card-header {
    margin-bottom: 8px;
}

body.page-equipment .status-dot {
    width: 9px;
    height: 9px;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

body.page-equipment .summary-item,
body.page-equipment .read-only-box,
body.page-equipment .assignment-card {
    padding: 10px 12px;
}

body.page-equipment .meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

body.page-equipment .summary-item strong {
    margin-top: 5px;
    font-size: 0.92rem;
    line-height: 1.25;
}

body.page-equipment .badge {
    min-height: 24px;
    padding: 0 8px;
    font-size: 0.68rem;
}

body.page-equipment .button-cluster {
    gap: 8px;
}

body.page-equipment .primary-button,
body.page-equipment .secondary-button,
body.page-equipment .ghost-button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 1.00rem;
}

/* Giver udstyrsformularen en tydeligere, dialoglignende kontrast uden at påvirke resten af systemet. */
body.page-equipment .equipment-form-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 251, 0.94)),
        linear-gradient(180deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0));
    border: 1px solid rgba(191, 198, 210, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 18px 36px rgba(15, 23, 42, 0.06);
}

body.page-equipment .equipment-form-card__header {
    margin-bottom: 12px;
    padding: 4px 4px 12px;
    border-bottom: 1px solid rgba(191, 198, 210, 0.72);
}

body.page-equipment .equipment-form {
    gap: 14px 16px;
    align-items: start;
}

body.page-equipment .equipment-form__section-heading {
    display: grid;
}

body.page-equipment .equipment-form__section-heading strong {
    color: #1f2937;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0;
}

body.page-equipment .equipment-form__section-heading {
    gap: 0;
    padding-top: 8px;
    border-top: 1px solid rgba(191, 198, 210, 0.72);
}

body.page-equipment .equipment-form .field {
    gap: 6px;
}

body.page-equipment .equipment-form .field span {
    color: #334155;
    font-size: 0.84rem;
    letter-spacing: 0.01em;
}

body.page-equipment .equipment-form .field .muted,
body.page-equipment .equipment-form__actions .muted {
    color: #5b6776;
}

body.page-equipment .equipment-form .field:focus-within span {
    color: #0b57d0;
}

body.page-equipment .equipment-form input,
body.page-equipment .equipment-form select,
body.page-equipment .equipment-form textarea {
    min-height: 46px;
    padding: 11px 13px;
    color: #111827;
    border: 1px solid #bcc6d2;
    border-radius: 11px;
    background: linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

body.page-equipment .equipment-form textarea {
    min-height: 120px;
}

body.page-equipment .equipment-form input::placeholder,
body.page-equipment .equipment-form textarea::placeholder {
    color: #7b8794;
    opacity: 1;
}

body.page-equipment .equipment-form input:hover,
body.page-equipment .equipment-form select:hover,
body.page-equipment .equipment-form textarea:hover {
    border-color: #98a6b8;
}

body.page-equipment .equipment-form input:focus,
body.page-equipment .equipment-form select:focus,
body.page-equipment .equipment-form textarea:focus {
    border-color: #0b57d0;
    box-shadow:
        0 0 0 1px #0b57d0,
        0 0 0 4px rgba(11, 87, 208, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.96);
    transform: none;
}

body.page-equipment .equipment-form__actions {
    margin-top: 4px;
    padding: 14px 16px;
    border: 1px solid #cfd5de;
    border-radius: 12px;
    background: linear-gradient(180deg, #fafbfd 0%, #eef2f7 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.page-equipment .equipment-form__actions .muted {
    max-width: 68ch;
    line-height: 1.45;
}

body.page-equipment .equipment-form__submit {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    background: linear-gradient(180deg, #1673ff 0%, #0b57d0 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 8px 16px rgba(11, 87, 208, 0.18);
}

body.page-equipment .equipment-dashboard-card--warning {
    border-color: rgba(220, 38, 38, 0.26);
    background:
        linear-gradient(180deg, rgba(255, 245, 245, 0.98), rgba(255, 255, 255, 0.94)),
        linear-gradient(90deg, rgba(220, 38, 38, 0.06), rgba(255, 255, 255, 0));
    box-shadow:
        inset 0 0 0 1px rgba(220, 38, 38, 0.08),
        0 16px 32px rgba(220, 38, 38, 0.08);
}

body.page-equipment .equipment-priority-card--focused {
    gap: 12px;
    padding: 14px;
    border-color: rgba(220, 38, 38, 0.28);
    background:
        linear-gradient(180deg, rgba(255, 250, 250, 0.98), rgba(255, 255, 255, 0.96)),
        linear-gradient(90deg, rgba(220, 38, 38, 0.08), rgba(255, 255, 255, 0));
}

body.page-equipment .equipment-warning-list {
    gap: 10px;
}

body.page-equipment .equipment-warning-list--focused {
    gap: 12px;
}

body.page-equipment .equipment-warning-list--focused .equipment-warning-item {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-color: rgba(220, 38, 38, 0.24);
    background: rgba(255, 255, 255, 0.84);
}

body.page-equipment .equipment-warning-list--focused .list-row {
    align-items: flex-start;
}

body.page-equipment .equipment-warning-list--focused .badge {
    align-self: start;
    white-space: nowrap;
}

body.page-equipment .equipment-warning-list--focused .equipment-warning-item__footer {
    justify-content: flex-start;
    padding-top: 6px;
    border-top: 1px solid rgba(220, 38, 38, 0.12);
}

body.page-equipment .equipment-warning-banner {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-width: 1px;
    border-left: 5px solid #dc2626;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 245, 245, 0.98), rgba(254, 226, 226, 0.92));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.84),
        0 10px 22px rgba(220, 38, 38, 0.08);
}

body.page-equipment .equipment-warning-banner strong {
    color: #991b1b;
}

body.page-equipment .equipment-warning-item {
    border-color: rgba(220, 38, 38, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 247, 0.96));
    box-shadow: inset 4px 0 0 rgba(220, 38, 38, 0.88);
}

body.page-equipment .equipment-warning-item strong {
    color: #7f1d1d;
}

body.page-equipment .equipment-warning-item__copy {
    display: grid;
    gap: 3px;
}

body.page-equipment .equipment-warning-item__copy span {
    color: var(--text-soft);
    font-size: 0.9rem;
    line-height: 1.35;
}

body.page-equipment .equipment-warning-item__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 2px;
}

body.page-equipment .equipment-warning-item__stock-action,
body.page-equipment .equipment-stock-link {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.86rem;
    white-space: nowrap;
}

body.page-equipment .equipment-filter-toolbar {
    min-width: min(100%, 520px);
}

body.page-equipment .equipment-table-card .table-wrap {
    margin-top: 2px;
}

body.page-equipment .table-alert-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin-top: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: linear-gradient(180deg, #fff5f5 0%, #fee2e2 100%);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #991b1b;
    font-weight: 800;
}

body.page-equipment .table-alert-copy::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.14);
    flex: 0 0 auto;
}

@media (max-width: 860px) {
    body.page-equipment .equipment-section-head,
    body.page-equipment .equipment-section-head--align-end {
        flex-direction: column;
        align-items: stretch;
    }

    body.page-equipment .equipment-priority-summary {
        min-width: 0;
        text-align: left;
    }

    body.page-equipment .equipment-filter-toolbar {
        min-width: 0;
        width: 100%;
    }

    body.page-equipment .equipment-warning-list--focused .list-row {
        flex-direction: column;
        align-items: stretch;
    }

    body.page-equipment .equipment-warning-list--focused .badge {
        width: fit-content;
    }

    body.page-equipment .equipment-form__actions {
        flex-direction: column;
        align-items: stretch;
    }

    body.page-equipment .equipment-form__submit {
        width: 100%;
    }

    body.page-equipment .equipment-stock-card,
    body.page-equipment .equipment-stock-form {
        grid-template-columns: 1fr;
    }

    body.page-equipment .equipment-stock-form__actions,
    body.page-equipment .equipment-stock-form__actions .primary-button {
        width: 100%;
    }
}

.page-actions--compact {
    justify-content: flex-start;
}

.content-grid--wide {
    grid-template-columns: minmax(0, 1.6fr) minmax(360px, 0.9fr);
}

.task-create-layout {
    grid-template-columns: minmax(0, 1fr);
}

.stat-grid--operations,
.stat-grid--profile {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.insight-grid,
.task-cluster,
.quick-action-grid,
.meta-grid {
    display: grid;
    gap: 12px;
}

.insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.task-cluster {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-action-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.equipment-form {
    align-items: start;
}

.equipment-detail-card,
.equipment-qr-box,
.equipment-hero,
.equipment-log-form {
    display: grid;
}

.equipment-detail-card,
.equipment-log-form {
    gap: 12px;
}

.equipment-hero {
    gap: 10px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
        radial-gradient(circle at right center, rgba(15, 118, 110, 0.08), transparent 34%),
        var(--surface-muted);
}

.equipment-hero__main {
    display: grid;
    gap: 8px;
}

.equipment-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.equipment-hero__title {
    font-size: clamp(1.42rem, 1.8vw, 2rem);
    line-height: 1.04;
    letter-spacing: 0;
}

.equipment-hero__summary {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.35;
}

.equipment-qr-box {
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface-muted);
}

.equipment-qr-box__canvas {
    display: flex;
    align-items: center;
    justify-content: center;
}

.equipment-qr-box__canvas canvas,
.equipment-qr-box__canvas img {
    width: min(100%, 220px);
    height: auto;
}

body.page-equipment .equipment-qr-box {
    gap: 10px;
    padding: 10px;
}

body.page-equipment .equipment-qr-box__canvas canvas,
body.page-equipment .equipment-qr-box__canvas img {
    width: min(100%, 150px);
}

body.page-equipment .equipment-stock-card {
    display: grid;
    grid-template-columns: minmax(220px, 0.75fr) minmax(220px, 0.75fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(240, 253, 250, 0.9)),
        var(--surface-muted);
}

body.page-equipment .equipment-stock-card__copy,
body.page-equipment .equipment-stock-current {
    display: grid;
    gap: 4px;
}

body.page-equipment .equipment-stock-card__copy .muted {
    margin: 0;
}

body.page-equipment .equipment-stock-current {
    padding: 10px 12px;
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.68);
}

body.page-equipment .equipment-stock-current span {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

body.page-equipment .equipment-stock-current small {
    color: var(--text-soft);
}

body.page-equipment .equipment-stock-form {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.65fr) minmax(200px, 1fr) minmax(200px, 1fr) auto;
    gap: 10px;
    align-items: end;
    min-width: 0;
}

body.page-equipment .equipment-stock-form .field {
    gap: 5px;
}

body.page-equipment .equipment-stock-form input,
body.page-equipment .equipment-stock-form select {
    min-height: 38px;
}

body.page-equipment .equipment-stock-form__actions {
    display: flex;
    justify-content: flex-end;
}

body.page-equipment .equipment-stock-form__actions .primary-button {
    white-space: nowrap;
}

body.page-equipment .equipment-overview-shortcuts {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

body.page-equipment .equipment-overview-shortcut {
    min-width: 0;
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

body.page-equipment .equipment-overview-shortcut:hover,
body.page-equipment .equipment-overview-shortcut:focus-visible {
    border-color: rgba(11, 87, 208, 0.26);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

body.page-equipment .equipment-overview-shortcut span {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

body.page-equipment .equipment-overview-shortcut strong {
    color: var(--text);
    font-size: 1.45rem;
    line-height: 1;
}

body.page-equipment .equipment-overview-shortcut small {
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.25;
}

body.page-equipment .equipment-tab-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

body.page-equipment .equipment-tab-panel__head .card-header {
    margin-bottom: 0;
}

body.page-equipment .equipment-task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

body.page-equipment .equipment-detail-secondary,
body.page-equipment .equipment-history-stack,
body.page-equipment .equipment-photo-section,
body.page-equipment .equipment-tab-panel {
    margin-top: 10px;
}

body.page-equipment .equipment-list-overview-card {
    gap: 12px;
}

body.page-equipment .equipment-list-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

body.page-equipment .equipment-list-summary {
    min-width: 0;
    display: grid;
    gap: 10px;
    align-content: start;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

body.page-equipment .equipment-list-summary__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

body.page-equipment .equipment-list-summary__head > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

body.page-equipment .equipment-list-summary__head strong {
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.2;
}

body.page-equipment .equipment-list-summary__head small {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
}

body.page-equipment .equipment-disclosure {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.64);
}

body.page-equipment .equipment-disclosure > summary {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 12px;
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
    list-style: none;
}

body.page-equipment .equipment-disclosure > summary::-webkit-details-marker {
    display: none;
}

body.page-equipment .equipment-disclosure > summary i {
    color: var(--text-soft);
    font-size: 0.82rem;
    transition: transform 160ms ease;
}

body.page-equipment .equipment-disclosure[open] > summary {
    border-bottom: 1px solid var(--line);
}

body.page-equipment .equipment-disclosure[open] > summary i {
    transform: rotate(180deg);
}

body.page-equipment .equipment-disclosure > .table-wrap,
body.page-equipment .equipment-disclosure > .equipment-stock-card,
body.page-equipment .equipment-disclosure > .equipment-log-form {
    margin: 10px;
}

body.page-equipment .equipment-stock-disclosure .equipment-stock-card {
    grid-template-columns: 1fr;
    margin-bottom: 0;
}

body.page-equipment .equipment-stock-disclosure .equipment-stock-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.page-equipment .equipment-stock-disclosure .equipment-stock-form__actions {
    grid-column: 1 / -1;
}

body.page-equipment .equipment-photo-card,
body.page-equipment .equipment-photo-form,
body.page-equipment .equipment-photo-item__body {
    display: grid;
    gap: 12px;
}

body.page-equipment .equipment-photo-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    padding: 12px;
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

body.page-equipment .equipment-photo-form .field--full,
body.page-equipment .equipment-photo-form__actions {
    grid-column: 1 / -1;
}

body.page-equipment .equipment-photo-form__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

body.page-equipment .equipment-photo-form__actions small {
    color: var(--text-soft);
    font-weight: 800;
}

body.page-equipment .equipment-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

body.page-equipment .equipment-photo-item {
    min-width: 0;
    display: grid;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

body.page-equipment .equipment-photo-item__image {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(123, 138, 159, 0.18);
    background: rgba(255, 255, 255, 0.68);
}

body.page-equipment .equipment-photo-item__image img,
.equipment-mobile-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

body.page-equipment .equipment-photo-item__body {
    gap: 6px;
}

body.page-equipment .equipment-photo-item__body small,
body.page-equipment .equipment-photo-item__body p {
    color: var(--text-soft);
    line-height: 1.35;
}

body.page-equipment .equipment-photo-item__body p {
    margin: 0;
}

body.page-equipment .equipment-photo-item__delete {
    justify-self: start;
}

body.page-equipment .equipment-log-disclosure {
    margin-bottom: 10px;
}

body.page-equipment .equipment-history-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

body.page-equipment .equipment-history-toolbar > div {
    display: grid;
    gap: 3px;
}

body.page-equipment .equipment-history-toolbar strong {
    font-size: 0.92rem;
}

body.page-equipment .equipment-history-toolbar span {
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 800;
}

body.page-equipment .equipment-history-pager {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

body.page-equipment .equipment-history-pager .secondary-button {
    min-height: 36px;
    padding: 0 12px;
}

body.page-equipment .equipment-history-pager__status {
    min-width: 82px;
    text-align: center;
}

body.page-equipment .equipment-history-table-wrap .data-table thead th {
    white-space: nowrap;
}

@media (max-width: 860px) {
    body.page-equipment .equipment-overview-shortcuts,
    body.page-equipment .equipment-task-grid,
    body.page-equipment .equipment-list-summary-grid,
    body.page-equipment .equipment-stock-disclosure .equipment-stock-form {
        grid-template-columns: 1fr;
    }

    body.page-equipment .equipment-tab-panel__head {
        flex-direction: column;
        align-items: stretch;
    }

    body.page-equipment .equipment-list-summary__head {
        flex-direction: column;
        align-items: stretch;
    }

    body.page-equipment .equipment-tab-panel__head .secondary-button,
    body.page-equipment .equipment-list-summary__head .secondary-button,
    body.page-equipment .equipment-disclosure > summary {
        width: 100%;
    }

    body.page-equipment .equipment-history-toolbar,
    body.page-equipment .equipment-history-pager {
        align-items: stretch;
    }

    body.page-equipment .equipment-history-pager,
    body.page-equipment .equipment-history-pager .secondary-button {
        width: 100%;
    }

    body.page-equipment .equipment-history-pager__status {
        order: -1;
        min-width: 0;
        text-align: left;
    }
}

.equipment-mobile-page {
    min-height: 100dvh;
    background:
        linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
}

.equipment-mobile-page.app-body {
    padding: 0;
}

.equipment-mobile-shell {
    width: min(100%, 680px);
    min-height: 100dvh;
    margin: 0 auto;
    padding: max(14px, env(safe-area-inset-top)) 14px max(24px, env(safe-area-inset-bottom));
    display: grid;
    align-content: start;
    gap: 12px;
}

.equipment-mobile-topbar,
.equipment-mobile-hero,
.equipment-mobile-section,
.equipment-mobile-alert,
.equipment-mobile-metrics article,
.equipment-mobile-footer {
    border: 1px solid rgba(123, 138, 159, 0.24);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.07);
}

.equipment-mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.equipment-mobile-topbar div,
.equipment-mobile-hero,
.equipment-mobile-section,
.equipment-mobile-facts article,
.equipment-mobile-row > span:first-child,
.equipment-mobile-footer {
    display: grid;
}

.equipment-mobile-topbar span,
.equipment-mobile-hero__title span,
.equipment-mobile-section__head span,
.equipment-mobile-facts span,
.equipment-mobile-metrics span,
.equipment-mobile-footer span {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.equipment-mobile-topbar .secondary-button {
    min-height: 38px;
    padding: 0 12px;
    white-space: nowrap;
}

.equipment-mobile-hero {
    gap: 12px;
    padding: 18px;
    border-radius: var(--radius-lg);
}

.equipment-mobile-hero__badges,
.equipment-mobile-actions,
.equipment-mobile-alerts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.equipment-mobile-hero__title {
    display: grid;
    gap: 5px;
}

.equipment-mobile-hero h1 {
    margin: 0;
    font-size: 1.8rem;
    line-height: 1.08;
}

.equipment-mobile-hero p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.45;
}

.equipment-mobile-alert {
    flex: 1 1 240px;
    display: flex;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-md);
}

.equipment-mobile-alert i {
    margin-top: 2px;
    color: var(--accent-dark);
}

.equipment-mobile-alert div {
    display: grid;
    gap: 3px;
}

.equipment-mobile-alert span {
    color: var(--text-soft);
    line-height: 1.35;
}

.equipment-mobile-alert--danger {
    border-color: rgba(220, 38, 38, 0.24);
    background: rgba(255, 241, 242, 0.94);
}

.equipment-mobile-alert--warning {
    border-color: rgba(217, 119, 6, 0.24);
    background: rgba(255, 251, 235, 0.94);
}

.equipment-mobile-actions {
    position: sticky;
    top: 72px;
    z-index: 4;
    padding: 8px;
    border: 1px solid rgba(123, 138, 159, 0.18);
    border-radius: var(--radius-lg);
    background: rgba(248, 250, 252, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.equipment-mobile-actions .primary-button,
.equipment-mobile-actions .secondary-button,
.equipment-mobile-actions .ghost-button,
.equipment-mobile-full-button {
    min-height: 42px;
    padding: 0 12px;
    flex: 1 1 145px;
}

.equipment-mobile-action-hub {
    position: static;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.equipment-mobile-action-hub__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.equipment-mobile-action-hub__head > div {
    display: grid;
    gap: 3px;
}

.equipment-mobile-action-hub__head span:first-child {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.equipment-mobile-action-hub__head strong {
    color: var(--text);
    font-size: 1.06rem;
}

.equipment-mobile-action-hub__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
    gap: 8px;
}

.equipment-mobile-action-card {
    min-width: 0;
    min-height: 78px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 12px;
    color: var(--text);
    text-decoration: none;
    border: 1px solid rgba(123, 138, 159, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.equipment-mobile-action-card i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-dark);
    border-radius: 8px;
    background: rgba(219, 234, 254, 0.86);
}

.equipment-mobile-action-card span {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.equipment-mobile-action-card strong,
.equipment-mobile-action-card small {
    overflow: hidden;
    text-overflow: ellipsis;
}

.equipment-mobile-action-card small {
    color: var(--text-soft);
    line-height: 1.3;
}

.equipment-mobile-action-card--primary {
    border-color: rgba(11, 87, 208, 0.3);
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(219, 234, 254, 0.9));
}

.equipment-mobile-action-card--primary i {
    color: #ffffff;
    background: var(--accent);
}

.equipment-mobile-action-card--warning {
    border-color: rgba(217, 119, 6, 0.3);
    background: rgba(255, 251, 235, 0.94);
}

.equipment-mobile-action-card--warning i {
    color: #92400e;
    background: rgba(254, 243, 199, 0.96);
}

.equipment-mobile-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 8px;
}

.equipment-mobile-metrics article {
    display: grid;
    gap: 6px;
    padding: 12px;
    border-radius: var(--radius-md);
}

.equipment-mobile-metrics strong {
    font-size: 1.35rem;
}

.equipment-mobile-metrics article.is-warning {
    border-color: rgba(220, 38, 38, 0.24);
    background: rgba(255, 241, 242, 0.94);
}

.equipment-mobile-section {
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-lg);
}

.equipment-mobile-production-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.equipment-mobile-production-summary article {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid rgba(123, 138, 159, 0.18);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

.equipment-mobile-production-summary span {
    color: var(--text-soft);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.equipment-mobile-production-summary strong {
    font-size: 1.05rem;
    line-height: 1.15;
}

.equipment-mobile-production-curve-shell {
    overflow-x: visible;
}

.equipment-mobile-production .equipment-production-curve {
    min-width: 0;
}

.equipment-mobile-production-legend {
    gap: 9px;
    font-size: 0.76rem;
}

.equipment-mobile-section__head,
.equipment-mobile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.equipment-mobile-section__head strong {
    font-size: 1rem;
}

.equipment-mobile-facts,
.equipment-mobile-list {
    display: grid;
    gap: 8px;
}

.equipment-mobile-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.equipment-mobile-facts article,
.equipment-mobile-row {
    padding: 11px 12px;
    border: 1px solid rgba(123, 138, 159, 0.18);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

.equipment-mobile-facts article {
    gap: 4px;
}

.equipment-mobile-facts small,
.equipment-mobile-row small {
    color: var(--text-soft);
    line-height: 1.35;
}

.equipment-mobile-row {
    color: var(--text);
    text-decoration: none;
}

.equipment-mobile-row > span:first-child {
    gap: 4px;
    min-width: 0;
}

.equipment-mobile-row > span:first-child strong,
.equipment-mobile-row > span:first-child small {
    overflow: hidden;
    text-overflow: ellipsis;
}

.equipment-mobile-row--warning {
    border-color: rgba(217, 119, 6, 0.3);
    background: rgba(255, 251, 235, 0.9);
}

.equipment-mobile-photo-form,
.equipment-mobile-photo-grid,
.equipment-mobile-photo > div {
    display: grid;
    gap: 10px;
}

.equipment-mobile-photo {
    display: grid;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(123, 138, 159, 0.18);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

.equipment-mobile-photo a {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(123, 138, 159, 0.18);
    background: rgba(255, 255, 255, 0.68);
}

.equipment-mobile-photo small,
.equipment-mobile-photo p {
    color: var(--text-soft);
    line-height: 1.35;
}

.equipment-mobile-photo p {
    margin: 0;
}

.equipment-mobile-full-button {
    margin-top: 4px;
    width: 100%;
}

.equipment-mobile-footer {
    gap: 4px;
    padding: 12px;
    border-radius: var(--radius-md);
}

.equipment-mobile-footer a {
    color: var(--accent-dark);
    font-size: 0.86rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

body[data-theme="dark"].equipment-mobile-page {
    background:
        linear-gradient(180deg, #101827 0%, #0d1420 100%);
}

body[data-theme="dark"] .equipment-mobile-topbar,
body[data-theme="dark"] .equipment-mobile-hero,
body[data-theme="dark"] .equipment-mobile-section,
body[data-theme="dark"] .equipment-mobile-alert,
body[data-theme="dark"] .equipment-mobile-metrics article,
body[data-theme="dark"] .equipment-mobile-footer {
    background: rgba(20, 29, 43, 0.94);
    border-color: rgba(148, 163, 184, 0.2);
}

body[data-theme="dark"] .equipment-mobile-action-hub {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(148, 163, 184, 0.22);
}

body[data-theme="dark"] .equipment-mobile-action-card {
    color: var(--text);
    background: rgba(30, 41, 59, 0.78);
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body[data-theme="dark"] .equipment-mobile-action-card i {
    color: var(--accent-dark);
    background: rgba(96, 165, 250, 0.16);
}

body[data-theme="dark"] .equipment-mobile-action-card--primary {
    background: rgba(30, 64, 175, 0.32);
    border-color: rgba(147, 197, 253, 0.34);
}

body[data-theme="dark"] .equipment-mobile-action-card--primary i {
    color: #ffffff;
    background: #3b82f6;
}

body[data-theme="dark"] .equipment-mobile-action-card--warning {
    background: rgba(120, 53, 15, 0.34);
    border-color: rgba(251, 191, 36, 0.34);
}

body[data-theme="dark"] .equipment-mobile-action-card--warning i {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.22);
}

body[data-theme="dark"] .equipment-mobile-photo {
    background: rgba(30, 41, 59, 0.78);
    border-color: rgba(148, 163, 184, 0.22);
}

body[data-theme="dark"] .equipment-mobile-photo a {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(148, 163, 184, 0.2);
}

.task-part-consumption-form,
.task-part-consumption-history,
.equipment-fault-resolve-form {
    display: grid;
    gap: 10px;
}

.task-part-consumption-form {
    grid-template-columns: minmax(220px, 1.3fr) minmax(120px, 0.45fr) minmax(220px, 1fr) auto;
    align-items: end;
}

.task-part-consumption-form .field--full {
    grid-column: auto;
}

.task-part-consumption-card {
    display: grid;
    gap: 14px;
}

.task-part-consumption-card__intro {
    margin: 0;
}

.task-part-consumption-card .task-part-consumption-form {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
}

.task-part-consumption-card .task-part-consumption-form .secondary-button {
    width: 100%;
}

.task-part-consumption-card .task-part-consumption-history {
    max-height: 360px;
    overflow: auto;
}

.task-completion-part-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

.task-completion-part-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.task-completion-part-panel__title {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.task-completion-part-panel__title small {
    color: var(--muted);
    font-weight: 650;
}

.task-completion-part-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(120px, 0.55fr);
    gap: 10px;
    align-items: start;
}

.task-completion-part-grid .field--full {
    grid-column: 1 / -1;
}

.task-completion-part-panel .task-part-consumption-history {
    max-height: 260px;
    overflow: auto;
}

.equipment-fault-resolve-form {
    grid-template-columns: minmax(120px, 0.35fr) minmax(220px, 1fr) auto auto;
    align-items: end;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.checkbox-card {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    color: var(--text);
    font-weight: 750;
}

.checkbox-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.production-fault-page .alert {
    margin: 0;
}

.production-fault-workspace {
    display: grid;
    gap: 12px;
}

.production-fault-shell {
    width: min(100%, 1060px);
    min-height: 100dvh;
    margin: 0 auto;
    padding: max(14px, env(safe-area-inset-top)) 14px max(24px, env(safe-area-inset-bottom));
    display: grid;
    align-content: start;
    gap: 12px;
}

.production-fault-topbar,
.production-fault-hero,
.production-fault-panel,
.production-fault-card {
    border: 1px solid rgba(123, 138, 159, 0.24);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.07);
}

.production-fault-topbar {
    position: sticky;
    top: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.production-fault-topbar div,
.production-fault-panel,
.production-fault-card__body {
    display: grid;
    gap: 4px;
}

.production-fault-topbar span,
.production-fault-panel__head span,
.production-fault-kpis span,
.production-fault-card small,
.production-fault-card__meta {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
}

.production-fault-topbar nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.production-fault-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-radius: var(--radius-lg);
}

.production-fault-hero h1 {
    margin: 5px 0 8px;
}

.production-fault-kpis,
.production-fault-filter,
.production-fault-form,
.production-fault-resolve-form {
    display: grid;
    gap: 10px;
}

.production-fault-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.production-fault-kpis article {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid rgba(123, 138, 159, 0.18);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

.production-fault-kpis strong {
    font-size: 1.25rem;
}

.production-fault-panel {
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-lg);
}

.production-fault-panel--accent {
    border-color: rgba(11, 87, 208, 0.2);
}

.production-fault-panel__head,
.production-fault-card header,
.production-fault-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.production-fault-panel__head strong {
    font-size: 1rem;
}

.production-fault-filter {
    grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1fr) auto;
    align-items: end;
}

.production-fault-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
}

.production-fault-form .field--full,
.production-fault-form__actions {
    grid-column: 1 / -1;
}

.production-fault-task-toggle {
    align-self: end;
}

.production-fault-form__actions {
    display: flex;
    justify-content: flex-end;
}

.production-fault-list {
    display: grid;
    gap: 10px;
}

.production-fault-card {
    display: grid;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
}

.production-fault-card header > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.production-fault-card__body span,
.production-fault-card__body p {
    color: var(--text-soft);
    line-height: 1.45;
}

.production-fault-card__body p {
    margin: 4px 0 0;
}

.production-fault-card__meta {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.production-fault-resolve-form {
    grid-template-columns: minmax(140px, 0.35fr) minmax(260px, 1fr) auto auto;
    align-items: end;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.production-admin-form {
    display: grid;
    grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 14px;
}

.production-admin-form .field {
    min-width: 0;
}

.production-admin-form--links {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.production-admin-form--reasons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.production-admin-form__actions {
    display: flex;
    justify-content: flex-end;
}

.production-admin-form--reasons .production-admin-form__actions {
    grid-column: 1 / -1;
    align-self: end;
    justify-content: flex-end;
}

.production-admin-form--reasons .production-admin-form__actions .primary-button {
    width: auto;
    min-width: 140px;
    justify-content: center;
}

.production-admin-advanced {
    grid-column: 1 / -1;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.production-admin-advanced summary {
    cursor: pointer;
    color: var(--text-soft);
    font-weight: 800;
}

.production-admin-advanced__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.production-admin-url {
    width: min(100%, 360px);
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.overview-screen-admin-card {
    display: grid;
    gap: 16px;
}

.overview-screen-admin-form,
.overview-screen-admin-row {
    display: grid;
    gap: 12px;
    align-items: end;
}

.overview-screen-admin-form {
    grid-template-columns: minmax(260px, 1fr) minmax(170px, 0.34fr) minmax(210px, 0.42fr) auto;
}

.overview-screen-admin-form__actions {
    display: flex;
    justify-content: flex-end;
    grid-column: 1 / -1;
}

.overview-screen-admin-list {
    display: grid;
    gap: 12px;
}

.overview-screen-admin-row {
    grid-template-columns: 116px minmax(240px, 1fr) minmax(160px, 0.32fr) minmax(210px, 0.42fr) minmax(260px, 0.9fr);
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.overview-screen-admin-row__status {
    display: grid;
    gap: 6px;
    align-content: center;
}

.overview-screen-admin-row__status small,
.overview-screen-admin-row__meta,
.overview-screen-scope-help,
.overview-screen-scope-option small,
.overview-screen-admin-row__scope-summary small {
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.overview-screen-admin-url {
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.overview-screen-admin-row__meta,
.overview-screen-admin-row__actions,
.overview-screen-metric-picker,
.overview-screen-scope-picker {
    grid-column: 1 / -1;
}

.overview-screen-admin-row__meta,
.overview-screen-admin-row__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.overview-screen-admin-row__actions {
    justify-content: flex-end;
}

.overview-screen-admin-row__scope-summary {
    display: grid;
    gap: 5px;
    align-content: center;
    min-width: 0;
}

.overview-screen-admin-row__scope-summary strong,
.overview-screen-scope-option strong {
    color: var(--text);
}

.overview-screen-admin-row__scope-summary small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-screen-scope-picker {
    display: grid;
    gap: 10px;
}

.overview-screen-scope-picker__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.overview-screen-scope-picker__head > span {
    color: #415165;
    font-size: 0.92rem;
    font-weight: 700;
}

.overview-screen-scope-picker__head strong {
    color: var(--accent-dark);
    font-size: 0.86rem;
}

.overview-screen-scope-tools {
    display: grid;
    grid-template-columns: minmax(260px, 0.44fr) minmax(280px, 1fr);
    align-items: end;
    gap: 10px;
}

.overview-screen-scope-tools .field {
    margin: 0;
}

.overview-screen-scope-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.32fr);
    gap: 12px;
    align-items: stretch;
}

.overview-screen-scope-browser,
.overview-screen-scope-selected {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
}

.overview-screen-scope-browser {
    max-height: 330px;
    overflow: auto;
}

.overview-screen-scope-group {
    border-bottom: 1px solid rgba(123, 138, 159, 0.18);
}

.overview-screen-scope-group:last-child {
    border-bottom: 0;
}

.overview-screen-scope-group[hidden] {
    display: none;
}

.overview-screen-scope-group summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
}

.overview-screen-scope-group summary::-webkit-details-marker {
    display: none;
}

.overview-screen-scope-group summary span,
.overview-screen-scope-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.overview-screen-scope-group summary span,
.overview-screen-scope-option span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.overview-screen-scope-group summary strong,
.overview-screen-scope-group summary small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-screen-scope-group summary i {
    color: var(--text-soft);
    transition: transform 160ms ease;
}

.overview-screen-scope-group[open] summary i {
    transform: rotate(180deg);
}

.overview-screen-scope-option {
    min-height: 42px;
    margin: 0 10px 8px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--text);
    font-weight: 750;
}

.overview-screen-scope-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent);
}

.overview-screen-scope-option--department {
    border-color: rgba(11, 87, 208, 0.24);
    background: rgba(239, 246, 255, 0.92);
}

.overview-screen-scope-option--team {
    min-height: 38px;
    padding: 8px 10px;
}

.overview-screen-scope-option input:disabled + span {
    opacity: 0.52;
}

.overview-screen-scope-team-list {
    display: grid;
    gap: 6px;
    margin: 0 0 10px 22px;
    padding-left: 10px;
    border-left: 2px solid rgba(123, 138, 159, 0.22);
}

.overview-screen-scope-selected {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    align-content: start;
    padding: 12px;
}

.overview-screen-scope-selected > span {
    color: #415165;
    font-size: 0.82rem;
    font-weight: 900;
}

.overview-screen-scope-selected [data-scope-selected-list] {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-content: flex-start;
    max-height: 260px;
    overflow: auto;
}

.overview-screen-scope-selected [data-scope-selected-list] small {
    color: var(--text-soft);
    font-weight: 700;
}

.overview-screen-scope-chip {
    display: inline-flex;
    max-width: 100%;
    padding: 6px 8px;
    border-radius: 8px;
    color: #0f3d5e;
    background: #dbeafe;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.2;
}

.overview-screen-metric-picker {
    display: grid;
    gap: 10px;
}

.overview-screen-metric-picker__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.overview-screen-metric-picker__head > span {
    color: #415165;
    font-size: 0.92rem;
    font-weight: 700;
}

.overview-screen-metric-picker__head strong {
    color: #8a5a00;
    font-size: 0.86rem;
}

.overview-screen-metric-picker__head strong.is-complete {
    color: #0f766e;
}

.overview-screen-metric-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.28fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.overview-screen-metric-selected,
.overview-screen-metric-groups {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
}

.overview-screen-metric-selected {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.overview-screen-metric-selected > span,
.overview-screen-metric-group > span {
    color: #415165;
    font-size: 0.82rem;
    font-weight: 900;
}

.overview-screen-metric-selected [data-metric-selected-list] {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-content: flex-start;
}

.overview-screen-metric-selected [data-metric-selected-list] small,
.overview-screen-metric-selected [data-metric-error] {
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.overview-screen-metric-picker--error [data-metric-error] {
    color: #b91c1c;
}

.overview-screen-metric-chip {
    display: inline-flex;
    max-width: 100%;
    padding: 6px 8px;
    border-radius: 8px;
    color: #0f3d5e;
    background: #dbeafe;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.2;
}

.overview-screen-metric-groups {
    display: grid;
    gap: 0;
    overflow: hidden;
}

.overview-screen-metric-group {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid rgba(123, 138, 159, 0.18);
}

.overview-screen-metric-group:last-child {
    border-bottom: 0;
}

.overview-screen-metric-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.overview-screen-metric-option {
    min-height: 72px;
    display: grid;
    grid-template-columns: 18px 34px minmax(0, 1fr);
    align-items: start;
    gap: 9px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--text);
    cursor: pointer;
}

.overview-screen-metric-option.is-selected {
    border-color: rgba(11, 87, 208, 0.36);
    background: #eff6ff;
}

.overview-screen-metric-option.is-disabled {
    opacity: 0.54;
    cursor: not-allowed;
}

.overview-screen-metric-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 7px;
    accent-color: var(--accent);
}

.overview-screen-metric-option__icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--accent-dark);
    background: #dbeafe;
}

.overview-screen-metric-option > span:last-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.overview-screen-metric-option strong {
    color: var(--text);
    font-size: 0.86rem;
}

.overview-screen-metric-option small {
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.35;
}

.production-analytics-card {
    display: grid;
    gap: 16px;
}

.production-analytics-head,
.production-analytics-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.production-analytics-head .card-header {
    margin-bottom: 6px;
}

.production-analytics-head p {
    max-width: 760px;
    margin: 0;
}

.production-analytics-filter {
    margin: 0;
}

.production-analytics-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.production-analytics-kpis article {
    min-height: 96px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.production-analytics-kpis span,
.production-analytics-panel__head small,
.production-analytics-details__summary small,
.production-reason-chart__row small {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
}

.production-analytics-kpis strong {
    color: var(--text);
    font-size: 1.35rem;
    line-height: 1.1;
}

.production-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
    gap: 16px;
    align-items: stretch;
}

.production-analytics-panel,
.production-analytics-table {
    min-width: 0;
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.production-analytics-panel__head strong,
.production-analytics-details__summary strong {
    color: var(--text);
    font-weight: 900;
}

.equipment-production-curve-shell {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.equipment-production-curve {
    width: 100%;
    min-width: 620px;
    height: auto;
    display: block;
    border: 1px solid rgba(96, 112, 133, 0.16);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(248, 250, 252, 0.84)),
        var(--surface);
}

.equipment-production-curve__grid-line {
    stroke: rgba(96, 112, 133, 0.18);
    stroke-width: 1;
}

.equipment-production-curve__line {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.equipment-production-curve__line--time {
    stroke: #2563eb;
}

.equipment-production-curve__line--reason {
    stroke: #f59e0b;
}

.equipment-production-curve__bar--runtime {
    fill: rgba(148, 163, 184, 0.5);
}

.equipment-production-curve__bar--effective {
    fill: #2563eb;
}

.equipment-production-curve__point {
    fill: #fff;
    stroke-width: 2.5;
}

.equipment-production-curve__point--time {
    stroke: #2563eb;
}

.equipment-production-curve__point--reason {
    stroke: #d97706;
}

.equipment-production-curve__date-label {
    fill: var(--text-soft);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 800;
}

.production-analytics-legend {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 800;
}

.production-analytics-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.production-analytics-legend small {
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 800;
}

.production-analytics-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.production-analytics-legend__dot--time {
    background: #2563eb;
}

.production-analytics-legend__dot--runtime {
    background: #94a3b8;
}

.production-analytics-legend__dot--reason {
    background: #f59e0b;
}

.production-reason-chart {
    display: grid;
    gap: 12px;
}

.production-reason-chart__row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(130px, 0.9fr) minmax(36px, auto) minmax(38px, auto);
    gap: 10px;
    align-items: center;
}

.production-reason-chart__row > div:first-child {
    min-width: 0;
}

.production-reason-chart__row strong {
    color: var(--text);
    font-weight: 900;
}

.production-reason-chart__row > div:first-child strong {
    display: block;
    overflow-wrap: anywhere;
}

.production-reason-chart__track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.22);
}

.production-reason-chart__track span {
    width: var(--bar-width);
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f766e 0%, #14b8a6 100%);
}

.production-analytics-table {
    margin-top: 2px;
}

.production-analytics-details__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    border-radius: 8px;
    cursor: pointer;
    list-style: none;
}

.production-analytics-details__summary::marker {
    content: "";
}

.production-analytics-details__summary::-webkit-details-marker {
    display: none;
}

.production-analytics-details__summary:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.22);
    outline-offset: 4px;
}

.production-analytics-details__title {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.production-analytics-details__title small {
    display: block;
}

.production-analytics-details__toggle {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--accent-dark);
    background: var(--surface);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.production-analytics-details__toggle i {
    transition: transform 160ms ease;
}

.production-analytics-details[open] .production-analytics-details__toggle i {
    transform: rotate(180deg);
}

.production-analytics-details__summary:hover .production-analytics-details__toggle,
.production-analytics-details__summary:focus-visible .production-analytics-details__toggle {
    border-color: rgba(37, 99, 235, 0.36);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.production-analytics-details__content {
    margin-top: 12px;
}

@media (max-width: 1100px) {
    .production-analytics-grid {
        grid-template-columns: 1fr;
    }

    .production-analytics-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .production-analytics-kpis,
    .production-reason-chart__row {
        grid-template-columns: 1fr;
    }
}

.production-tablet-admin-layout {
    grid-template-columns: minmax(0, 1fr);
}

.production-reason-assignment {
    display: grid;
    gap: 12px;
    margin: 2px 0 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.production-reason-assignment__head,
.production-reason-assignment__selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.production-reason-assignment__head > div,
.production-reason-assignment__selected {
    min-width: 0;
}

.production-reason-assignment__head strong,
.production-reason-assignment__selected strong {
    color: var(--text);
    font-weight: 900;
}

.production-reason-assignment__head small,
.production-reason-assignment__selected small {
    display: block;
    margin-top: 2px;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
}

.production-reason-workbench {
    display: grid;
    grid-template-columns: minmax(240px, 0.34fr) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.production-reason-equipment-pane,
.production-reason-assignment__form {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.production-reason-pane-title {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.production-reason-pane-title strong {
    color: var(--text);
    font-weight: 900;
}

.production-reason-pane-title small {
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 800;
}

.production-equipment-picker {
    display: grid;
    gap: 6px;
    max-height: 430px;
    overflow: auto;
    padding-right: 2px;
}

.production-equipment-picker__item {
    display: grid;
    gap: 3px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    background: var(--surface-muted);
}

.production-equipment-picker__item:hover,
.production-equipment-picker__item:focus-visible,
.production-equipment-picker__item.is-active {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    outline: none;
}

.production-equipment-picker__item strong,
.production-equipment-picker__item small {
    display: block;
}

.production-equipment-picker__item small {
    color: var(--text-soft);
    font-size: 0.74rem;
    font-weight: 800;
}

.production-reason-assignment__form {
    display: grid;
    gap: 12px;
}

.production-reason-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    max-height: 430px;
    overflow: auto;
    padding-right: 2px;
}

.production-reason-check {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-height: 70px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.production-reason-check input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.production-reason-check span {
    min-width: 0;
}

.production-reason-check strong,
.production-reason-check small {
    display: block;
}

.production-reason-check small {
    margin-top: 3px;
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 800;
}

.production-library-details {
    margin-top: 16px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.production-library-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: var(--surface-muted);
    cursor: pointer;
    font-weight: 900;
    list-style: none;
}

.production-library-details > summary::marker {
    content: "";
}

.production-library-details > summary::-webkit-details-marker {
    display: none;
}

.production-library-details > summary small {
    display: block;
    margin-top: 2px;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
}

.production-library-details[open] > summary {
    margin-bottom: 12px;
}

.production-library-table-wrap {
    max-height: 460px;
    overflow: auto;
}

.production-reason-table td:first-child {
    min-width: 220px;
}

.production-reason-table td:last-child {
    width: 1%;
    white-space: nowrap;
}

.production-tablet-page {
    min-height: 100dvh;
    margin: 0;
    color: #111827;
    background: #f4f7fb;
    font-family: var(--font-sans);
}

.production-tablet-shell {
    width: min(100%, 1180px);
    min-height: 100dvh;
    margin: 0 auto;
    padding: max(12px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
    display: grid;
    align-content: start;
    gap: 10px;
}

.production-tablet-header,
.production-tablet-block,
.production-tablet-open-card,
.production-tablet-choice,
.production-tablet-mode-card,
.production-tablet-home-link,
.production-tablet-refresh,
.production-tablet-back {
    border: 1px solid #cdd6e3;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.production-tablet-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 8px;
}

.production-tablet-header div,
.production-tablet-section-head div,
.production-tablet-open-card > div,
.production-tablet-step {
    display: grid;
    gap: 4px;
}

.production-tablet-header span,
.production-tablet-section-head span,
.production-tablet-step span,
.production-tablet-open-card small,
.production-tablet-choice small,
.production-tablet-mode-card small,
.production-tablet-kicker {
    color: #5b6776;
    font-size: 1rem;
    font-weight: 800;
}

.production-tablet-header h1,
.production-tablet-block h1 {
    margin: 0;
    font-size: 1.42rem;
    line-height: 1.1;
}

.production-tablet-area {
    color: #0f766e;
    font-size: 1rem;
    font-weight: 950;
}

.production-tablet-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.production-tablet-refresh,
.production-tablet-home-link,
.production-tablet-back {
    min-height: 46px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 8px;
    color: #102033;
    font-weight: 900;
    text-decoration: none;
}

.production-tablet-home-link,
.production-tablet-refresh {
    width: 52px;
    padding: 0;
    font-size: 1.2rem;
}

.production-tablet-alert {
    min-height: 38px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    border: 2px solid #dc2626;
    border-radius: 8px;
    color: #7f1d1d;
    background: #fef2f2;
    font-size: 1.05rem;
    font-weight: 900;
}

.production-tablet-alert--success {
    color: #065f46;
    border-color: #10b981;
    background: #ecfdf5;
}

.production-tablet-block {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
}

.production-tablet-block--center {
    min-height: 100dvh;
    place-content: center;
    text-align: center;
}

.production-tablet-block--center p {
    max-width: 44rem;
    margin: 0 auto;
    color: #4b5563;
    font-size: 1.1rem;
}

.production-tablet-section-head,
.production-tablet-section-head--split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.production-tablet-section-head strong {
    font-size: 1.18rem;
    line-height: 1.15;
}

.production-tablet-step strong {
    font-size: 1.36rem;
    line-height: 1.1;
}

.production-tablet-empty {
    min-height: 92px;
    display: grid;
    place-items: center;
    padding: 16px;
    border: 2px dashed #b8c3d2;
    border-radius: 8px;
    color: #3f4a5a;
    background: #f8fafc;
    font-size: 1.25rem;
    font-weight: 900;
    text-align: center;
}

.production-tablet-production-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
    gap: 8px;
}

.production-tablet-production-summary article,
.production-tablet-running-panel {
    border: 1px solid #cdd6e3;
    border-radius: 8px;
    background: #f8fafc;
}

.production-tablet-production-summary article {
    min-height: 72px;
    padding: 10px 12px;
    display: grid;
    align-content: center;
    gap: 6px;
}

.production-tablet-production-summary article.is-running {
    border-color: rgba(16, 185, 129, 0.5);
    background: #ecfdf5;
}

.production-tablet-production-summary span,
.production-tablet-running-panel span {
    color: #5b6776;
    font-size: 0.82rem;
    font-weight: 900;
}

.production-tablet-production-summary strong,
.production-tablet-running-panel strong {
    color: #102033;
    font-size: 1.24rem;
    line-height: 1.05;
}

.production-tablet-live-time {
    font-variant-numeric: tabular-nums;
}

.production-tablet-start-form {
    display: grid;
}

.production-tablet-mode-card--button {
    width: 100%;
    border-width: 1px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.production-tablet-running-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    gap: 10px;
    align-items: stretch;
    padding: 10px;
    border-left: 6px solid #059669;
}

.production-tablet-running-panel--paused {
    border-left-color: #f59e0b;
}

.production-tablet-running-panel > div {
    display: grid;
    align-content: center;
    gap: 5px;
}

.production-tablet-running-panel__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.production-tablet-running-panel__actions form {
    display: flex;
    min-width: 0;
}

.production-tablet-reason-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid #cdd6e3;
    border-radius: 8px;
    background: #f8fafc;
}

.production-tablet-reason-head--stop {
    border-color: rgba(245, 158, 11, 0.42);
    background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
}

.production-tablet-reason-head div {
    display: grid;
    gap: 2px;
}

.production-tablet-reason-head span {
    color: #5b6776;
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
}

.production-tablet-reason-head strong {
    color: #102033;
    font-size: 1.08rem;
    line-height: 1.1;
}

.production-tablet-home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.production-tablet-mode-card {
    min-height: 220px;
    padding: 24px;
    display: grid;
    align-content: center;
    gap: 12px;
    border-radius: 8px;
    color: #102033;
    text-decoration: none;
}

.production-tablet-mode-card i {
    width: 62px;
    height: 62px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 1.65rem;
}

.production-tablet-mode-card span {
    font-size: 2rem;
    font-weight: 950;
    line-height: 1.05;
}

.production-tablet-mode-card--start {
    border-color: rgba(16, 185, 129, 0.44);
    background: linear-gradient(180deg, #ffffff 0%, #ecfdf5 100%);
}

.production-tablet-mode-card--start i {
    background: #059669;
}

.production-tablet-mode-card--stop {
    border-color: rgba(220, 38, 38, 0.42);
    background: linear-gradient(180deg, #ffffff 0%, #fef2f2 100%);
}

.production-tablet-mode-card--stop i {
    background: #dc2626;
}

.production-tablet-choice-grid,
.production-tablet-open-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.production-tablet-choice-grid--reasons form {
    min-width: 0;
}

.production-tablet-choice-grid--reasons {
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 8px;
}

.production-tablet-choice-grid--stop-reasons .production-tablet-choice--button {
    border-color: rgba(245, 158, 11, 0.38);
    background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
}

.production-tablet-choice,
.production-tablet-choice--button {
    width: 100%;
    min-height: 92px;
    padding: 12px 14px;
    display: grid;
    align-content: center;
    gap: 8px;
    border-radius: 8px;
    color: #102033;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.production-tablet-choice:hover,
.production-tablet-choice:focus-visible,
.production-tablet-mode-card:hover,
.production-tablet-mode-card:focus-visible,
.production-tablet-home-link:hover,
.production-tablet-home-link:focus-visible,
.production-tablet-refresh:hover,
.production-tablet-refresh:focus-visible,
.production-tablet-back:hover,
.production-tablet-back:focus-visible {
    border-color: #0b57d0;
    box-shadow: 0 0 0 4px rgba(11, 87, 208, 0.16), 0 12px 28px rgba(15, 23, 42, 0.08);
    outline: none;
}

.production-tablet-choice span {
    font-size: 1.1rem;
    font-weight: 950;
    line-height: 1.1;
}

.production-tablet-choice .production-tablet-choice__status,
.production-tablet-choice .production-tablet-choice__pending {
    width: fit-content;
    max-width: 100%;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.94rem;
    font-weight: 950;
    line-height: 1.1;
}

.production-tablet-choice__status {
    color: #065f46;
    background: #d1fae5;
}

.production-tablet-choice__pending {
    color: #1d4ed8;
    background: #dbeafe;
}

.production-tablet-choice--button.is-registered {
    border-color: #10b981;
    background: linear-gradient(180deg, #ffffff 0%, #ecfdf5 100%);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16), 0 12px 28px rgba(15, 23, 42, 0.08);
    animation: production-tablet-registered-pulse 620ms ease-out;
}

.production-tablet-choice--button.is-registered .production-tablet-choice__status,
.production-tablet-choice--button.is-submitting .production-tablet-choice__pending {
    display: inline-flex;
}

.production-tablet-choice--button.is-submitting .production-tablet-choice__status {
    display: none;
}

.production-tablet-choice--button.is-submitting {
    border-color: #0b57d0;
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
    box-shadow: 0 0 0 4px rgba(11, 87, 208, 0.16), 0 12px 28px rgba(15, 23, 42, 0.08);
    cursor: progress;
}

.production-tablet-choice--button:disabled {
    opacity: 1;
}

@keyframes production-tablet-registered-pulse {
    0% {
        transform: scale(0.985);
    }

    60% {
        transform: scale(1.01);
    }

    100% {
        transform: scale(1);
    }
}

.production-tablet-open-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 148px;
    gap: 12px;
    align-items: stretch;
    padding: 14px;
    border-radius: 8px;
    border-left: 8px solid #dc2626;
}

.production-tablet-open-card span {
    color: #5b6776;
    font-size: 1rem;
    font-weight: 900;
}

.production-tablet-open-card strong {
    color: #7f1d1d;
    font-size: 1.22rem;
    line-height: 1.15;
}

.production-tablet-open-card form {
    display: flex;
}

.production-tablet-stop-button,
.production-tablet-resume-button,
.production-tablet-finish-button {
    width: 100%;
    min-height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1.06rem;
    font-weight: 950;
    line-height: 1.15;
    text-align: center;
    cursor: pointer;
}

.production-tablet-stop-button {
    background: #c81e1e;
}

.production-tablet-resume-button {
    background: #047857;
}

.production-tablet-finish-button {
    background: #102033;
}

.production-tablet-stop-button:hover,
.production-tablet-stop-button:focus-visible {
    background: #991b1b;
    outline: 4px solid rgba(220, 38, 38, 0.22);
}

.production-tablet-resume-button:hover,
.production-tablet-resume-button:focus-visible {
    background: #065f46;
    outline: 4px solid rgba(16, 185, 129, 0.22);
}

.production-tablet-finish-button:hover,
.production-tablet-finish-button:focus-visible {
    background: #0f172a;
    outline: 4px solid rgba(15, 23, 42, 0.18);
}

body.overview-screen-body {
    --overview-screen-scale: 1.3;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    color: #111827;
    background: #e8edf3;
    font-family: var(--font-base);
}

.overview-screen-shell {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-rows: calc(88px * var(--overview-screen-scale)) calc(138px * var(--overview-screen-scale)) minmax(0, 1fr);
    gap: calc(14px * var(--overview-screen-scale));
    padding: calc(18px * var(--overview-screen-scale));
}

.overview-screen-header,
.overview-screen-kpis,
.overview-screen-main,
.overview-screen-empty {
    border: 1px solid rgba(137, 151, 171, 0.5);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 34px rgba(27, 39, 58, 0.08);
}

.overview-screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(24px * var(--overview-screen-scale));
    padding: calc(16px * var(--overview-screen-scale)) calc(20px * var(--overview-screen-scale));
}

.overview-screen-brand {
    display: flex;
    align-items: center;
    gap: calc(16px * var(--overview-screen-scale));
    min-width: 0;
}

.overview-screen-logo {
    width: calc(156px * var(--overview-screen-scale));
    height: calc(60px * var(--overview-screen-scale));
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
}

.overview-screen-logo img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(11, 87, 208, 0.16));
}

.overview-screen-brand div,
.overview-screen-clock {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.overview-screen-brand strong {
    overflow: hidden;
    color: #0f172a;
    font-size: calc(1.72rem * var(--overview-screen-scale));
    line-height: 1.08;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-screen-brand small,
.overview-screen-clock small,
.overview-screen-section-head span,
.overview-screen-table small {
    color: #5d6a7c;
    font-weight: 800;
}

.overview-screen-brand small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-screen-clock {
    text-align: right;
}

.overview-screen-clock strong {
    color: #0f172a;
    font-size: calc(1.2rem * var(--overview-screen-scale));
    font-weight: 950;
}

.overview-screen-kpis {
    display: grid;
    grid-template-columns: minmax(calc(250px * var(--overview-screen-scale)), 0.72fr) minmax(calc(520px * var(--overview-screen-scale)), 2.1fr) minmax(calc(250px * var(--overview-screen-scale)), 0.72fr);
    gap: calc(14px * var(--overview-screen-scale));
    background: transparent;
    border: 0;
    box-shadow: none;
}

.overview-screen-kpi {
    --overview-screen-kpi-accent: #94a3b8;
    display: grid;
    align-content: center;
    gap: calc(10px * var(--overview-screen-scale));
    min-width: 0;
    min-height: 0;
    padding: calc(16px * var(--overview-screen-scale)) calc(18px * var(--overview-screen-scale));
    overflow: hidden;
    border: 1px solid rgba(137, 151, 171, 0.42);
    border-radius: 8px;
    border-left: 6px solid #94a3b8;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.94)),
        #ffffff;
    box-shadow: 0 16px 34px rgba(27, 39, 58, 0.08);
}

.overview-screen-kpi span {
    color: #596677;
    font-size: calc(0.88rem * var(--overview-screen-scale));
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

.overview-screen-kpi > strong {
    color: #111827;
    font-size: calc(2.15rem * var(--overview-screen-scale));
    line-height: 1;
}

.overview-screen-kpi small {
    color: #5d6a7c;
    font-size: calc(0.92rem * var(--overview-screen-scale));
    font-weight: 850;
    line-height: 1.3;
}

.overview-screen-kpi--summary strong {
    font-size: clamp(calc(3rem * var(--overview-screen-scale)), 5.8vw, calc(5rem * var(--overview-screen-scale)));
}

.overview-screen-kpi--summary small,
.overview-screen-kpi--gauge small {
    color: #334155;
}

.overview-screen-kpi--primary {
    --overview-screen-kpi-accent: #2563eb;
    border-left-color: #2563eb;
}

.overview-screen-kpi--danger {
    --overview-screen-kpi-accent: #dc2626;
    border-left-color: #dc2626;
}

.overview-screen-kpi--warning {
    --overview-screen-kpi-accent: #f59e0b;
    border-left-color: #f59e0b;
}

.overview-screen-kpi--certificate {
    --overview-screen-kpi-accent: #f59e0b;
    border-left-color: #f59e0b;
}

.overview-screen-kpi--running {
    --overview-screen-kpi-accent: #059669;
    border-left-color: #059669;
}

.overview-screen-kpi--chart {
    align-content: stretch;
    border-left-color: #0f172a;
}

.overview-screen-kpi__chart-head {
    display: none !important;
}

.overview-screen-kpi-bars {
    display: grid;
    gap: calc(10px * var(--overview-screen-scale));
    align-content: center;
    min-height: 0;
    height: 100%;
}

.overview-screen-kpi-bar {
    --overview-screen-bar-color: #64748b;
    display: grid;
    grid-template-columns: minmax(calc(190px * var(--overview-screen-scale)), 0.38fr) minmax(120px, 1fr) calc(48px * var(--overview-screen-scale));
    align-items: center;
    gap: calc(12px * var(--overview-screen-scale));
}

.overview-screen-kpi-bar span,
.overview-screen-kpi-bar strong {
    color: #111827;
    font-size: calc(0.96rem * var(--overview-screen-scale));
    font-weight: 950;
    line-height: 1.1;
}

.overview-screen-kpi-bar span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-screen-kpi-bar strong {
    text-align: right;
}

.overview-screen-kpi-bar__track {
    height: calc(15px * var(--overview-screen-scale));
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
}

.overview-screen-kpi-bar__track i {
    display: block;
    width: var(--overview-screen-bar);
    min-width: 3px;
    max-width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--overview-screen-bar-color);
}

.overview-screen-kpi-bar--primary {
    --overview-screen-bar-color: #2563eb;
}

.overview-screen-kpi-bar--danger {
    --overview-screen-bar-color: #dc2626;
}

.overview-screen-kpi-bar--critical {
    --overview-screen-bar-color: #7f1d1d;
}

.overview-screen-kpi-bar--warning {
    --overview-screen-bar-color: #f59e0b;
}

.overview-screen-kpi-bar--certificate {
    --overview-screen-bar-color: #f59e0b;
}

.overview-screen-kpi-bar--running {
    --overview-screen-bar-color: #059669;
}

.overview-screen-kpi-bar--blocked {
    --overview-screen-bar-color: #b91c1c;
}

.overview-screen-kpi--gauge {
    place-items: center;
    text-align: center;
}

.overview-screen-kpi-gauge {
    width: calc(112px * var(--overview-screen-scale));
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background:
        radial-gradient(circle, #ffffff 0 56%, transparent 57%),
        conic-gradient(#0f766e 0 var(--overview-screen-gauge), #e2e8f0 var(--overview-screen-gauge) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(15, 23, 42, 0.06),
        0 10px 22px rgba(15, 23, 42, 0.09);
}

.overview-screen-kpi-gauge strong {
    font-size: calc(1.48rem * var(--overview-screen-scale));
}

.overview-screen-main {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.overview-screen-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(18px * var(--overview-screen-scale));
    padding: calc(14px * var(--overview-screen-scale)) calc(18px * var(--overview-screen-scale));
    border-bottom: 1px solid rgba(137, 151, 171, 0.38);
}

.overview-screen-section-head strong {
    color: #111827;
    font-size: calc(1.05rem * var(--overview-screen-scale));
    font-weight: 950;
}

.overview-screen-table-wrap {
    min-height: 0;
    overflow: hidden;
}

.overview-screen-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.overview-screen-table th,
.overview-screen-table td {
    padding: calc(10px * var(--overview-screen-scale)) calc(12px * var(--overview-screen-scale));
    border-bottom: 1px solid rgba(137, 151, 171, 0.26);
    text-align: left;
    vertical-align: middle;
}

.overview-screen-table th {
    color: #596677;
    background: #f4f7fa;
    font-size: calc(0.78rem * var(--overview-screen-scale));
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

.overview-screen-table th:nth-child(1) {
    width: 34%;
}

.overview-screen-table th:nth-child(2) {
    width: 15%;
}

.overview-screen-table th:nth-child(3) {
    width: 17%;
}

.overview-screen-table th:nth-child(4) {
    width: 11%;
}

.overview-screen-table th:nth-child(5) {
    width: 13%;
}

.overview-screen-table th:nth-child(6) {
    width: 10%;
}

.overview-screen-table td {
    color: #182235;
    font-size: calc(0.96rem * var(--overview-screen-scale));
    font-weight: 750;
    overflow-wrap: anywhere;
}

.overview-screen-table td > strong,
.overview-screen-table td > span {
    display: block;
}

.overview-screen-table td strong {
    color: #0f172a;
    font-size: calc(1rem * var(--overview-screen-scale));
    line-height: 1.18;
}

.overview-screen-task-title {
    display: flex;
    align-items: center;
    gap: calc(8px * var(--overview-screen-scale));
}

.overview-screen-task-title > span,
.overview-screen-task-title .task-project-indicator,
.overview-screen-task-title .task-priority-indicator,
.overview-screen-task-title .task-d4-indicator {
    display: inline-flex;
    width: 20px;
    height: 20px;
    margin: 0;
}

.overview-screen-task-title strong {
    display: block;
    min-width: 0;
    line-height: 1.18;
}

.overview-screen-table__row {
    background: #ffffff;
}

.overview-screen-table__row--danger {
    background: #fff1f2;
    box-shadow: inset 6px 0 0 #dc2626;
}

.overview-screen-table__row--critical {
    background: #fef2f2;
    box-shadow: inset 6px 0 0 #7f1d1d;
}

.overview-screen-table__row--warning {
    background: #fffbeb;
    box-shadow: inset 6px 0 0 #f59e0b;
}

.overview-screen-table__row--certificate {
    background: #fffbeb;
    box-shadow: inset 6px 0 0 #f59e0b;
}

.overview-screen-table__row--blocked {
    background: #fef2f2;
    box-shadow: inset 6px 0 0 #b91c1c;
}

.overview-screen-table__row--running {
    background: #ecfdf5;
    box-shadow: inset 6px 0 0 #059669;
}

.overview-screen-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: calc(28px * var(--overview-screen-scale));
    padding: calc(4px * var(--overview-screen-scale)) calc(8px * var(--overview-screen-scale));
    border-radius: 8px;
    color: #111827;
    background: #e5e7eb;
    font-size: calc(0.82rem * var(--overview-screen-scale));
    font-weight: 950;
    line-height: 1.1;
}

.overview-screen-tag--danger,
.overview-screen-tag--critical,
.overview-screen-tag--blocked {
    color: #7f1d1d;
    background: #fecaca;
}

.overview-screen-tag--warning {
    color: #78350f;
    background: #fde68a;
}

.overview-screen-tag--info {
    color: #0f5b7a;
    background: rgba(61, 155, 220, 0.18);
}

.overview-screen-tag--certificate {
    color: #78350f;
    background: #fde68a;
}

.overview-screen-tag--running {
    color: #064e3b;
    background: #a7f3d0;
}

.overview-screen-deadline-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: calc(24px * var(--overview-screen-scale));
    margin-top: calc(6px * var(--overview-screen-scale));
    padding: calc(3px * var(--overview-screen-scale)) calc(8px * var(--overview-screen-scale));
    border-radius: 999px;
    font-size: calc(0.72rem * var(--overview-screen-scale));
    font-weight: 950;
    line-height: 1.15;
}

.overview-screen-deadline-badge--danger,
.overview-screen-deadline-badge--critical {
    color: #7f1d1d;
    background: #fecaca;
}

.overview-screen-deadline-badge--warning {
    color: #78350f;
    background: #fde68a;
}

.overview-screen-no-tasks,
.overview-screen-empty {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    min-height: 100%;
    padding: 28px;
    text-align: center;
}

.overview-screen-no-tasks i {
    color: #059669;
    font-size: 3rem;
}

.overview-screen-no-tasks strong,
.overview-screen-empty strong {
    color: #111827;
    font-size: 1.6rem;
}

.overview-screen-empty {
    width: min(720px, calc(100vw - 48px));
    min-height: 260px;
    margin: 16vh auto 0;
}

.overview-screen-empty span {
    color: #596677;
    font-size: 1rem;
    font-weight: 800;
}

@media (max-height: 820px) {
    .overview-screen-shell {
        grid-template-rows: calc(72px * var(--overview-screen-scale)) calc(122px * var(--overview-screen-scale)) minmax(0, 1fr);
        gap: calc(10px * var(--overview-screen-scale));
        padding: calc(12px * var(--overview-screen-scale));
    }

    .overview-screen-logo {
        width: calc(132px * var(--overview-screen-scale));
        height: calc(52px * var(--overview-screen-scale));
    }

    .overview-screen-brand strong {
        font-size: calc(1.36rem * var(--overview-screen-scale));
    }

    .overview-screen-clock strong {
        font-size: calc(1rem * var(--overview-screen-scale));
    }

    .overview-screen-kpi {
        gap: calc(7px * var(--overview-screen-scale));
        padding: calc(10px * var(--overview-screen-scale)) calc(12px * var(--overview-screen-scale));
    }

    .overview-screen-kpi > strong {
        font-size: calc(1.72rem * var(--overview-screen-scale));
    }

    .overview-screen-kpi--summary strong {
        font-size: calc(2.8rem * var(--overview-screen-scale));
    }

    .overview-screen-kpi small {
        font-size: calc(0.78rem * var(--overview-screen-scale));
    }

    .overview-screen-kpi-bars {
        gap: calc(7px * var(--overview-screen-scale));
    }

    .overview-screen-kpi-bar {
        grid-template-columns: minmax(calc(132px * var(--overview-screen-scale)), 0.36fr) minmax(100px, 1fr) calc(36px * var(--overview-screen-scale));
        gap: calc(8px * var(--overview-screen-scale));
    }

    .overview-screen-kpi-bar span,
    .overview-screen-kpi-bar strong {
        font-size: calc(0.78rem * var(--overview-screen-scale));
    }

    .overview-screen-kpi-bar__track {
        height: calc(10px * var(--overview-screen-scale));
    }

    .overview-screen-kpi-gauge {
        width: calc(78px * var(--overview-screen-scale));
    }

    .overview-screen-kpi-gauge strong {
        font-size: calc(1.18rem * var(--overview-screen-scale));
    }

    .overview-screen-table th,
    .overview-screen-table td {
        padding: calc(7px * var(--overview-screen-scale)) calc(9px * var(--overview-screen-scale));
    }

    .overview-screen-table td {
        font-size: calc(0.88rem * var(--overview-screen-scale));
    }

    .overview-screen-table td strong {
        font-size: calc(0.92rem * var(--overview-screen-scale));
    }
}

@media (max-width: 1100px) {
    body.overview-screen-body {
        overflow: auto;
    }

    .overview-screen-shell {
        width: 100%;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        grid-template-rows: auto auto minmax(420px, 1fr);
    }

    .overview-screen-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .overview-screen-clock {
        text-align: left;
    }

    .overview-screen-kpis {
        grid-template-columns: 1fr;
    }

    .overview-screen-kpi--summary strong {
        font-size: calc(3.2rem * var(--overview-screen-scale));
    }

    .overview-screen-kpi-bar {
        grid-template-columns: minmax(calc(170px * var(--overview-screen-scale)), 0.46fr) minmax(120px, 1fr) calc(38px * var(--overview-screen-scale));
    }
}

@media (max-width: 520px) {
    .overview-screen-kpi__chart-head {
        display: none !important;
    }

    .overview-screen-kpi-bar {
        grid-template-columns: minmax(0, 1fr) 34px;
        gap: 6px 10px;
    }

    .overview-screen-kpi-bar span {
        grid-column: 1 / -1;
        white-space: normal;
    }
}

.overview-screen-shell {
    grid-template-rows: calc(88px * var(--overview-screen-scale)) minmax(0, 1fr) auto;
}

.overview-screen-kpis--simple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: calc(18px * var(--overview-screen-scale));
    min-height: 0;
}

.overview-screen-kpis--simple .overview-screen-kpi {
    align-content: space-between;
    gap: calc(20px * var(--overview-screen-scale));
    padding: calc(24px * var(--overview-screen-scale));
    border-left-width: calc(7px * var(--overview-screen-scale));
}

.overview-screen-kpi__head {
    display: flex;
    align-items: center;
    gap: calc(12px * var(--overview-screen-scale));
    min-width: 0;
}

.overview-screen-kpi__head > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.overview-screen-kpi__icon {
    width: calc(42px * var(--overview-screen-scale));
    height: calc(42px * var(--overview-screen-scale));
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--overview-screen-kpi-accent);
    background: color-mix(in srgb, var(--overview-screen-kpi-accent) 13%, #ffffff);
    font-size: calc(1.1rem * var(--overview-screen-scale));
}

.overview-screen-kpis--simple .overview-screen-kpi > strong {
    font-size: clamp(calc(4rem * var(--overview-screen-scale)), 8vw, calc(7rem * var(--overview-screen-scale)));
    line-height: 0.95;
}

.overview-screen-kpis--simple .overview-screen-kpi small {
    max-width: 22ch;
    font-size: calc(1rem * var(--overview-screen-scale));
}

.overview-screen-kpi--good {
    --overview-screen-kpi-accent: #0f766e;
    border-left-color: #0f766e;
}

.overview-screen-kpi--critical {
    --overview-screen-kpi-accent: #7f1d1d;
    border-left-color: #7f1d1d;
}

.overview-screen-kpi--neutral {
    --overview-screen-kpi-accent: #64748b;
    border-left-color: #64748b;
}

.overview-screen-kpi-status {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: calc(12px * var(--overview-screen-scale));
    padding: calc(14px * var(--overview-screen-scale)) calc(18px * var(--overview-screen-scale));
    border: 1px solid rgba(137, 151, 171, 0.5);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 34px rgba(27, 39, 58, 0.08);
}

.overview-screen-kpi-status div {
    min-width: 0;
}

.overview-screen-kpi-status span {
    display: block;
    color: #5d6a7c;
    font-size: calc(0.78rem * var(--overview-screen-scale));
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

.overview-screen-kpi-status strong {
    display: block;
    margin-top: calc(4px * var(--overview-screen-scale));
    color: #0f172a;
    font-size: calc(1rem * var(--overview-screen-scale));
    line-height: 1.18;
}

@media (max-height: 820px) {
    .overview-screen-kpis--simple {
        gap: calc(12px * var(--overview-screen-scale));
    }

    .overview-screen-kpis--simple .overview-screen-kpi {
        gap: calc(12px * var(--overview-screen-scale));
        padding: calc(16px * var(--overview-screen-scale));
    }

    .overview-screen-kpis--simple .overview-screen-kpi > strong {
        font-size: clamp(calc(3.2rem * var(--overview-screen-scale)), 7vw, calc(5.6rem * var(--overview-screen-scale)));
    }
}

@media (max-width: 1100px) {
    .overview-screen-kpis--simple {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .overview-screen-kpi-status {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .overview-screen-shell {
        grid-template-rows: auto minmax(0, 1fr) auto;
    }

    .overview-screen-kpis--simple {
        grid-template-columns: 1fr;
        overflow: auto;
    }

    .overview-screen-kpis--simple .overview-screen-kpi > strong {
        font-size: calc(3rem * var(--overview-screen-scale));
    }
}

body[data-theme="dark"] .checkbox-card,
body[data-theme="dark"] .production-fault-topbar,
body[data-theme="dark"] .production-fault-hero,
body[data-theme="dark"] .production-fault-panel,
body[data-theme="dark"] .production-fault-card,
body[data-theme="dark"] .production-fault-kpis article {
    background: rgba(20, 29, 43, 0.94);
    border-color: rgba(148, 163, 184, 0.2);
}

@media (max-width: 1180px) {
    body.page-equipment .equipment-stock-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.page-equipment .equipment-stock-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.page-equipment .equipment-stock-form__actions {
        justify-content: stretch;
    }

    body.page-equipment .equipment-stock-form__actions .primary-button {
        width: 100%;
    }

    .production-admin-form,
    .production-admin-form--links,
    .production-admin-form--reasons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .production-admin-form__actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .production-admin-form__actions .primary-button {
        width: 100%;
        justify-content: center;
    }

    .production-tablet-home-grid,
    .production-tablet-choice-grid,
    .production-tablet-open-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .production-tablet-choice-grid--reasons {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 860px) {
    body.page-equipment .equipment-stock-card,
    body.page-equipment .equipment-stock-form,
    body.page-equipment .equipment-photo-form {
        grid-template-columns: 1fr;
    }

    body.page-equipment .equipment-photo-form .field--full,
    body.page-equipment .equipment-photo-form__actions {
        grid-column: 1;
    }

    .equipment-mobile-shell {
        padding-inline: 10px;
    }

    .equipment-mobile-metrics,
    .equipment-mobile-facts {
        grid-template-columns: minmax(0, 1fr);
    }

    .equipment-mobile-actions {
        top: 66px;
    }

    .task-part-consumption-form,
    .task-completion-part-grid,
    .equipment-fault-resolve-form,
    .production-fault-hero,
    .production-fault-filter,
    .production-fault-form,
    .production-fault-resolve-form {
        grid-template-columns: 1fr;
    }

    .production-fault-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .production-fault-form__actions,
    .production-fault-form__actions .primary-button,
    .production-fault-resolve-form .secondary-button {
        width: 100%;
    }

    .production-fault-form__actions .primary-button,
    .production-fault-resolve-form .secondary-button {
        justify-content: center;
    }

    .production-tablet-shell {
        padding-inline: 10px;
    }

    .production-tablet-home-grid,
    .production-tablet-choice-grid,
    .production-tablet-open-grid,
    .production-tablet-production-summary,
    .production-admin-form,
    .production-admin-form--links,
    .production-admin-form--reasons,
    .production-reason-workbench,
    .production-admin-advanced__grid {
        grid-template-columns: 1fr;
    }

    .production-equipment-picker,
    .production-reason-checklist,
    .production-library-table-wrap {
        max-height: 320px;
    }

    .production-tablet-open-card,
    .production-tablet-running-panel {
        grid-template-columns: 1fr;
    }

    .production-tablet-reason-head {
        flex-direction: column;
        align-items: stretch;
    }

    .production-tablet-production-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .production-tablet-running-panel__actions {
        grid-template-columns: 1fr;
    }

    .production-tablet-choice,
    .production-tablet-choice--button {
        min-height: 74px;
    }

    .production-tablet-choice-grid--reasons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .production-tablet-mode-card {
        min-height: 132px;
    }

    .production-tablet-stop-button,
    .production-tablet-resume-button,
    .production-tablet-finish-button {
        min-height: 68px;
    }
}

.equipment-qr-box__meta {
    display: grid;
    gap: 4px;
}

.equipment-qr-box__meta strong {
    font-size: 0.96rem;
}

.equipment-qr-box__meta small {
    color: var(--text-soft);
    line-height: 1.35;
    word-break: break-all;
}

.equipment-editor-section {
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface-muted);
}

.equipment-form--single-list {
    align-items: start;
}

.equipment-list-summary-card {
    max-width: 920px;
}

.equipment-editor-section__header,
.equipment-list-row__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.equipment-editor-section__header strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.equipment-editor-section__header p,
.equipment-list-editor > .muted {
    margin: 0;
}

.equipment-list-editor,
.equipment-list-editor__rows {
    display: grid;
    gap: 8px;
}

.equipment-list-row {
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.58);
}

.equipment-list-row__grid {
    display: grid;
    grid-template-columns: minmax(150px, 1.15fr) minmax(130px, 1fr) minmax(170px, 1.2fr) minmax(82px, 0.55fr) minmax(82px, 0.55fr);
    gap: 8px 10px;
}

body.page-equipment .equipment-form--single-list .field {
    gap: 4px;
}

body.page-equipment .equipment-form--single-list .field span {
    font-size: 0.76rem;
}

body.page-equipment .equipment-form--single-list input,
body.page-equipment .equipment-form--single-list select,
body.page-equipment .equipment-form--single-list textarea {
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 9px;
}

body.page-equipment .equipment-form--single-list textarea {
    min-height: 64px;
}

.quick-action-card {
    padding: 14px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface-muted);
    text-decoration: none;
    color: var(--text);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 118, 110, 0.32);
    box-shadow: 0 20px 32px rgba(15, 118, 110, 0.08);
}

.quick-action-card strong,
.insight-block h2,
.rich-copy h2 {
    margin: 0 0 10px;
    font-size: 0.84rem;
}

.quick-action-card p,
.calendar-day__empty {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.dashboard-focus-grid,
.dashboard-action-list,
.dashboard-department-card__stats {
    display: grid;
    gap: 12px;
}

.dashboard-focus-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-focus-grid--full {
    grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
}

.dashboard-focus-card,
.dashboard-action-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.12)),
        var(--surface-muted);
}

.dashboard-focus-card {
    align-content: start;
    grid-template-rows: auto 1fr auto;
    gap: 8px;
    min-height: 100px;
}

.dashboard-focus-card--danger {
    border-color: rgba(181, 71, 71, 0.2);
    background: rgba(181, 71, 71, 0.08);
}

.dashboard-focus-card--critical {
    border-color: rgba(181, 71, 71, 0.26);
    background:
        linear-gradient(180deg, rgba(181, 71, 71, 0.14), rgba(255, 255, 255, 0.82)),
        var(--surface-muted);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.dashboard-focus-card--warning {
    border-color: rgba(245, 158, 11, 0.24);
    background:
        linear-gradient(180deg, rgba(245, 158, 11, 0.1), rgba(255, 255, 255, 0.82)),
        var(--surface-muted);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.dashboard-focus-card--today,
.dashboard-focus-card--project {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.dashboard-focus-card--certificate {
    border-color: rgba(79, 70, 229, 0.22);
    background:
        linear-gradient(180deg, rgba(79, 70, 229, 0.09), rgba(255, 255, 255, 0.82)),
        var(--surface-muted);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.dashboard-focus-card--assignment {
    border-color: rgba(11, 87, 208, 0.2);
    background:
        linear-gradient(180deg, rgba(11, 87, 208, 0.08), rgba(255, 255, 255, 0.82)),
        var(--surface-muted);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.dashboard-focus-card--assignment-alert {
    border-color: rgba(181, 71, 71, 0.28);
    background:
        linear-gradient(180deg, rgba(181, 71, 71, 0.14), rgba(255, 255, 255, 0.82)),
        var(--surface-muted);
}

.dashboard-focus-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-focus-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--accent-dark);
    font-size: 0.78rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.dashboard-focus-card--critical .dashboard-focus-card__icon {
    background: rgba(181, 71, 71, 0.14);
    color: #8e2a2a;
}

.dashboard-focus-card--warning .dashboard-focus-card__icon {
    background: rgba(245, 158, 11, 0.14);
    color: #8b5a00;
}

.dashboard-focus-card--certificate .dashboard-focus-card__icon {
    background: rgba(79, 70, 229, 0.12);
    color: #4338ca;
}

.dashboard-focus-card--assignment .dashboard-focus-card__icon {
    background: rgba(11, 87, 208, 0.11);
    color: #0b57d0;
}

.dashboard-focus-card--assignment-alert .dashboard-focus-card__icon {
    background: rgba(181, 71, 71, 0.14);
    color: #8e2a2a;
}

.dashboard-focus-card h2,
.dashboard-action-card strong {
    margin: 0;
    font-size: 0.92rem;
}

.dashboard-focus-card__value {
    display: block;
    align-self: start;
    font-size: 1.78rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 0.9;
}

.dashboard-focus-card p,
.dashboard-action-card p,
.dashboard-note {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.28;
    font-size: 0.76rem;
}

.dashboard-focus-card .text-link {
    margin-top: auto;
    align-self: start;
    font-size: 0.82rem;
}

.d4-import-grid {
    margin-top: 4px;
}

.d4-import-grid .dashboard-focus-card {
    min-height: 112px;
}

.d4-import-card__value--date {
    font-size: clamp(1rem, 1.2vw, 1.22rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.dashboard-action-list {
    align-content: start;
}

.dashboard-action-card {
    text-decoration: none;
    color: var(--text);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.dashboard-action-card:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 118, 110, 0.32);
    box-shadow: 0 18px 30px rgba(15, 118, 110, 0.08);
}

.dashboard-focus-panel {
    display: grid;
    gap: 10px;
}

.dashboard-card-stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    width: 100%;
}

.dashboard-card-stack > .card {
    width: 100%;
    max-width: none;
}

/* Dashboard skal altid kunne vises som en lodret prioriteret stak. */
body.page-dashboard .content-grid,
body.page-dashboard .content-grid--wide {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
}

body.page-dashboard .content-grid > .card,
body.page-dashboard .content-grid--wide > .card {
    width: 100%;
    max-width: none;
}

/* Understøtter både ny og gammel dashboard-markup med samme visuelle rækkefølge. */
body.page-dashboard .content-grid > .card:first-child {
    order: 2;
}

body.page-dashboard .content-grid > .card:last-child {
    order: 1;
}

body.page-dashboard .content-grid--wide > .card:first-child {
    order: 3;
}

body.page-dashboard .content-grid--wide > .card:last-child {
    order: 4;
}

/* Dashboardets kompakte typografi holdes inde i indholdsområdet, så den fælles navigation forbliver ens på alle sider. */
body.page-dashboard .app-shell {
    font-size: 12px;
}

body.page-dashboard .page-hero {
    display: none;
}

body.page-dashboard .page-hero h1 {
    font-size: clamp(1.18rem, 1.45vw, 1.55rem);
    margin: 4px 0 6px;
}

body.page-dashboard .page-hero .lead,
body.page-dashboard .muted,
body.page-dashboard .dashboard-focus-card p,
body.page-dashboard .dashboard-action-card p,
body.page-dashboard .dashboard-note,
body.page-dashboard .data-table td,
body.page-dashboard .data-table td small,
body.page-dashboard .text-link {
    font-size: 0.92rem;
    line-height: 1.35;
}

body.page-dashboard .card-header,
body.page-dashboard .data-table th,
body.page-dashboard .dashboard-focus-card h2,
body.page-dashboard .dashboard-action-card strong,
body.page-dashboard .stat-label {
    font-size: 0.90rem;
}

body.page-dashboard .data-table td strong {
    font-size: 0.98rem;
}

body.page-dashboard .badge {
    min-height: 28px;
    font-size: 0.72rem;
    padding: 0 10px;
}

body.page-dashboard .dashboard-task-table {
    table-layout: fixed;
    min-width: 920px;
    border-collapse: separate;
    border-spacing: 0;
}

/* Opgavetabeller på dashboardet tegner rækkelinjen samlet, så kolonneindhold ikke kan forskyde stregerne. */
body.page-dashboard .dashboard-task-table tbody td {
    border-bottom: 0;
}

body.page-dashboard .dashboard-task-table tbody tr:not(:last-child) td {
    box-shadow: inset 0 -1px 0 var(--line);
}

body.page-dashboard col.dashboard-task-table__task {
    width: 38%;
}

body.page-dashboard col.dashboard-task-table__department {
    width: 25%;
}

body.page-dashboard col.dashboard-task-table__deadline {
    width: 15%;
}

body.page-dashboard col.dashboard-task-table__status {
    width: 14%;
}

body.page-dashboard col.dashboard-task-table__action {
    width: 8%;
}

body.page-dashboard .dashboard-task-table__deadline-cell {
    vertical-align: top;
}

body.page-dashboard .dashboard-task-table__deadline-cell > span {
    display: block;
}

body.page-dashboard .dashboard-task-table__deadline-cell > span + span {
    margin-top: 6px;
}

body.page-dashboard .dashboard-task-table__deadline-cell .badge {
    display: inline-flex;
    width: fit-content;
}

body.page-dashboard .dashboard-task-table .badge {
    white-space: nowrap;
}

body.page-dashboard .dashboard-task-table th:last-child,
body.page-dashboard .dashboard-task-table__action-cell {
    text-align: right;
}

body.page-dashboard .task-project-indicator {
    width: 18px;
    height: 18px;
    font-size: 0.78rem;
}

body.page-dashboard .task-priority-indicator {
    width: 18px;
    height: 18px;
    font-size: 0.66rem;
}

body.page-dashboard .task-d4-indicator {
    width: 18px;
    height: 18px;
    font-size: 0.72rem;
}

.dashboard-focus-card--kpi {
    border-color: rgba(15, 118, 110, 0.22);
    background:
        linear-gradient(180deg, rgba(15, 118, 110, 0.09), rgba(255, 255, 255, 0.82)),
        var(--surface-muted);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.dashboard-focus-card--kpi .dashboard-focus-card__icon {
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
}

.kpi-control-panel {
    padding-bottom: 18px;
}

.kpi-filter-row {
    grid-template-columns: minmax(180px, 0.8fr) minmax(170px, 0.72fr) minmax(340px, 1.45fr) auto;
    align-items: end;
}

.kpi-scope-field {
    min-width: 0;
}

.kpi-scope-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.kpi-scope-tab {
    position: relative;
    display: grid;
    gap: 3px;
    min-height: 52px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.kpi-scope-tab:has(input:checked) {
    border-color: rgba(15, 118, 110, 0.36);
    background: rgba(15, 118, 110, 0.08);
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.14);
}

.kpi-scope-tab input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.kpi-scope-tab span {
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 900;
    line-height: 1.2;
}

.kpi-scope-tab small {
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
}

.kpi-context-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 750;
}

.kpi-context-strip strong {
    color: var(--text);
}

.kpi-hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 22px;
    border: 1px solid rgba(15, 118, 110, 0.2);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.13), rgba(79, 70, 229, 0.08)),
        var(--surface);
    box-shadow: var(--shadow-soft);
}

.kpi-hero-panel__summary {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.kpi-hero-panel__summary h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2vw, 2.1rem);
}

.kpi-hero-panel__summary strong {
    color: var(--text);
    font-size: clamp(2.5rem, 5vw, 4.3rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: 0;
}

.kpi-hero-panel__summary p {
    max-width: 720px;
    margin: 0;
    color: var(--text-soft);
    line-height: 1.45;
}

.kpi-gauge {
    position: relative;
    display: grid;
    place-items: center;
    width: clamp(132px, 16vw, 176px);
    aspect-ratio: 1;
}

.kpi-gauge__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        conic-gradient(#0f766e var(--kpi-value), rgba(148, 163, 184, 0.24) 0),
        var(--surface-muted);
}

.kpi-gauge__ring::after {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.kpi-gauge__copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 3px;
    justify-items: center;
    text-align: center;
}

.kpi-gauge__copy span {
    color: var(--text);
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1;
}

.kpi-gauge__copy small {
    color: var(--text-soft);
    font-weight: 800;
    text-transform: uppercase;
}

.kpi-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.kpi-card-grid--priority {
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

.kpi-card-grid--overview {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.kpi-card {
    display: grid;
    gap: 8px;
    min-height: 128px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.16)),
        var(--surface-muted);
}

.kpi-card--clickable {
    color: inherit;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.kpi-card--clickable:hover {
    transform: translateY(-1px);
    border-color: rgba(11, 87, 208, 0.26);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
}

.kpi-card__top,
.kpi-insight__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.kpi-card__top {
    align-items: flex-start;
    justify-content: space-between;
}

.kpi-card__label {
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.kpi-card__open {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent-dark);
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.kpi-link-icon {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: var(--accent-dark);
    text-decoration: none;
    background: rgba(11, 87, 208, 0.08);
    border: 1px solid rgba(11, 87, 208, 0.14);
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.kpi-link-icon:hover {
    background: rgba(11, 87, 208, 0.14);
    border-color: rgba(11, 87, 208, 0.24);
    transform: translateY(-1px);
}

.kpi-card strong {
    color: var(--text);
    font-size: 2rem;
    line-height: 1;
    letter-spacing: 0;
}

.kpi-card small {
    color: var(--text-soft);
    line-height: 1.35;
}

.kpi-delta {
    align-self: end;
    display: inline-flex;
    width: fit-content;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.12);
    color: var(--text-soft);
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1.2;
}

.kpi-delta--good {
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
}

.kpi-delta--danger {
    background: rgba(181, 71, 71, 0.12);
    color: #9f3434;
}

.kpi-card--good {
    border-color: rgba(15, 118, 110, 0.24);
    background:
        linear-gradient(180deg, rgba(15, 118, 110, 0.1), rgba(255, 255, 255, 0.82)),
        var(--surface-muted);
}

.kpi-card--warning {
    border-color: rgba(245, 158, 11, 0.24);
    background:
        linear-gradient(180deg, rgba(245, 158, 11, 0.1), rgba(255, 255, 255, 0.82)),
        var(--surface-muted);
}

.kpi-card--danger {
    border-color: rgba(181, 71, 71, 0.26);
    background:
        linear-gradient(180deg, rgba(181, 71, 71, 0.12), rgba(255, 255, 255, 0.82)),
        var(--surface-muted);
}

.kpi-card--certificate {
    border-color: rgba(79, 70, 229, 0.24);
    background:
        linear-gradient(180deg, rgba(79, 70, 229, 0.1), rgba(255, 255, 255, 0.82)),
        var(--surface-muted);
}

.kpi-card--oos {
    border-color: rgba(124, 58, 237, 0.24);
    background:
        linear-gradient(180deg, rgba(124, 58, 237, 0.09), rgba(255, 255, 255, 0.82)),
        var(--surface-muted);
}

.kpi-performance-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.72)),
        var(--surface-muted);
}

.kpi-performance-panel__copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.kpi-performance-panel__copy strong {
    color: var(--text);
    font-size: clamp(2rem, 3.2vw, 3rem);
    line-height: 1;
    letter-spacing: 0;
}

.kpi-performance-panel__copy p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.45;
}

.kpi-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.kpi-layout--priority {
    grid-template-columns: minmax(0, 1fr);
}

.kpi-empty-state {
    min-height: 120px;
    display: grid;
    align-items: center;
}

.kpi-parameter-panel {
    display: grid;
    gap: 16px;
}

.kpi-parameter-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.kpi-parameter-filter {
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: end;
}

.kpi-parameter-selected {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.72)),
        var(--surface-muted);
}

.kpi-parameter-selected__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.kpi-parameter-selected__header > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.kpi-parameter-selected__header strong {
    color: var(--text);
    font-size: 1.05rem;
}

.kpi-parameter-selected__header small {
    color: var(--text-soft);
    font-weight: 750;
    line-height: 1.4;
}

.kpi-parameter-chart-shell {
    overflow-x: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.64);
}

.kpi-parameter-chart {
    display: block;
    width: 100%;
    min-width: 620px;
    height: auto;
}

.kpi-parameter-chart__grid-line {
    stroke: rgba(148, 163, 184, 0.28);
    stroke-width: 1;
}

.kpi-parameter-chart__axis-label,
.kpi-parameter-chart__date-label,
.kpi-parameter-chart__limit-label {
    fill: var(--text-soft);
    font-size: 13px;
    font-weight: 800;
}

.kpi-parameter-chart__limit {
    stroke-width: 1.6;
    stroke-dasharray: 7 7;
}

.kpi-parameter-chart__limit--min {
    stroke: rgba(14, 165, 233, 0.72);
}

.kpi-parameter-chart__limit--max {
    stroke: rgba(244, 63, 94, 0.72);
}

.kpi-parameter-chart__line {
    fill: none;
    stroke: #0f766e;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.kpi-parameter-chart__point {
    fill: var(--surface);
    stroke: #0f766e;
    stroke-width: 3;
}

.kpi-parameter-chart__point--warning {
    stroke: #f97316;
    stroke-width: 4;
}

.kpi-trend-chart {
    display: grid;
    gap: 12px;
}

.kpi-trend-chart__row {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) 58px;
    gap: 12px;
    align-items: center;
}

.kpi-trend-chart__row > span,
.kpi-trend-chart__row > strong {
    color: var(--text-soft);
    font-size: 0.84rem;
    font-weight: 800;
}

.kpi-trend-chart__row > strong {
    color: var(--text);
    text-align: right;
}

.kpi-trend-chart__track {
    display: flex;
    overflow: hidden;
    height: 13px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
}

.kpi-trend-chart__bar {
    display: block;
    min-width: 0;
    height: 100%;
}

.kpi-trend-chart__bar--on-time {
    width: var(--on-time);
    background: #0f766e;
}

.kpi-trend-chart__bar--late {
    width: var(--late);
    background: #f59e0b;
}

.kpi-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    color: var(--text-soft);
    font-size: 0.84rem;
    font-weight: 800;
}

.kpi-legend span {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.kpi-legend__dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
}

.kpi-legend__dot--good {
    background: #0f766e;
}

.kpi-legend__dot--late {
    background: #f59e0b;
}

.kpi-insight-list,
.kpi-risk-list {
    display: grid;
    gap: 10px;
}

.kpi-insight {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

.kpi-insight strong {
    color: var(--text);
}

.kpi-insight p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.42;
}

.kpi-insight--good {
    border-color: rgba(15, 118, 110, 0.24);
    background: rgba(15, 118, 110, 0.07);
}

.kpi-insight--warning {
    border-color: rgba(245, 158, 11, 0.24);
    background: rgba(245, 158, 11, 0.07);
}

.kpi-insight--danger {
    border-color: rgba(181, 71, 71, 0.24);
    background: rgba(181, 71, 71, 0.07);
}

.kpi-risk-item {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    color: inherit;
    text-decoration: none;
}

.kpi-risk-item:hover {
    border-color: rgba(15, 118, 110, 0.3);
    transform: translateY(-1px);
}

.kpi-risk-item span:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.kpi-risk-item strong {
    color: var(--text);
}

.kpi-risk-item small {
    color: var(--text-soft);
}

.kpi-system-link-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.kpi-system-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 16px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    color: inherit;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.kpi-system-link:hover {
    transform: translateY(-1px);
    border-color: rgba(11, 87, 208, 0.26);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
}

.kpi-system-link strong {
    color: var(--text);
}

.kpi-system-link span {
    color: var(--text-soft);
    font-weight: 750;
    line-height: 1.35;
}

.kpi-system-link i {
    grid-row: 1 / span 2;
    grid-column: 2;
    color: var(--accent-dark);
}

.dashboard-focus-panel--danger {
    border-color: rgba(181, 71, 71, 0.18);
}

.task-detail-layout,
.task-detail-grid {
    display: grid;
    gap: 18px;
    font-size: 0.95rem;
}

.task-detail-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
    align-items: start;
}

.task-detail-layout__main,
.task-detail-layout__side {
    min-width: 0;
}

.task-detail-layout__side {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 112px;
}

.task-detail-grid--primary {
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
}

.task-detail-grid--support {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.task-detail-grid--single {
    grid-template-columns: minmax(0, 1fr);
}

.task-support-card {
    min-width: 0;
    display: grid;
    gap: 14px;
    align-content: start;
}

.task-disclosure {
    min-width: 0;
}

.task-disclosure > summary {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
    list-style: none;
}

.task-disclosure > summary::-webkit-details-marker {
    display: none;
}

.task-disclosure__title {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.task-disclosure__title > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.task-disclosure > summary i {
    flex: 0 0 auto;
    color: var(--text-soft);
    font-size: 0.82rem;
    transition: transform 160ms ease;
}

.task-disclosure[open] > summary {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.task-disclosure[open] > summary i {
    transform: rotate(180deg);
}

.task-disclosure__body {
    min-width: 0;
    display: grid;
    gap: 14px;
}

.task-detail-grid--support-prominent-d4 .task-support-card--d4 {
    order: -1;
    grid-column: 1 / -1;
}

.task-detail-grid--support-prominent-d4 .task-support-card--equipment {
    order: 1;
}

.task-detail-grid--support-prominent-d4 .task-support-card--comments {
    order: 2;
}

.task-detail-grid--support-single-tail .task-support-card--equipment,
.task-detail-grid--support-single-tail .task-support-card--comments {
    grid-column: 1 / -1;
}

.task-d4-results {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.46);
}

.task-d4-results__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.task-d4-results__header strong {
    font-size: 0.92rem;
}

.task-d4-results__list {
    display: grid;
    gap: 8px;
}

.task-d4-result {
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.task-d4-result:hover,
.task-d4-result:focus-visible {
    border-color: rgba(11, 87, 208, 0.32);
    background: rgba(239, 246, 255, 0.86);
    box-shadow: 0 10px 24px rgba(11, 87, 208, 0.1);
    transform: translateY(-1px);
}

.task-d4-result.is-selected {
    border-color: rgba(15, 118, 110, 0.36);
    background: rgba(209, 250, 229, 0.5);
    box-shadow: inset 4px 0 0 rgba(15, 118, 110, 0.48);
}

.task-d4-result__title {
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.task-d4-result__meta {
    color: var(--text-soft);
    font-size: 0.84rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.task-detail-card {
    display: grid;
    gap: 16px;
}

.task-overview-banner {
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05)),
        var(--surface-muted);
}

.task-overview-banner__main {
    display: grid;
    gap: 10px;
}

.task-overview-banner__labels {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.task-overview-banner__title {
    font-size: clamp(1.28rem, 1.7vw, 1.7rem);
    line-height: 1.08;
    letter-spacing: 0;
}

.task-overview-banner__deadline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(15, 118, 110, 0.16);
    background:
        linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(15, 118, 110, 0.03)),
        rgba(255, 255, 255, 0.72);
}

.task-overview-banner__deadline--warning {
    border-color: rgba(245, 158, 11, 0.24);
    background:
        linear-gradient(180deg, rgba(245, 158, 11, 0.14), rgba(245, 158, 11, 0.05)),
        rgba(255, 255, 255, 0.78);
}

.task-overview-banner__deadline--danger {
    border-color: rgba(181, 71, 71, 0.26);
    background:
        linear-gradient(180deg, rgba(181, 71, 71, 0.16), rgba(181, 71, 71, 0.05)),
        rgba(255, 255, 255, 0.8);
}

.task-overview-banner__deadline--scheduled {
    border-color: rgba(31, 138, 84, 0.2);
    background:
        linear-gradient(180deg, rgba(31, 138, 84, 0.12), rgba(31, 138, 84, 0.04)),
        rgba(255, 255, 255, 0.78);
}

.task-overview-banner__deadline-copy,
.task-overview-banner__deadline-status {
    display: grid;
    gap: 6px;
}

.task-overview-banner__deadline-status {
    justify-items: end;
    align-content: start;
}

.task-overview-banner__deadline-label {
    color: var(--text-soft);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.task-overview-banner__deadline-date {
    font-size: clamp(1.5rem, 2.3vw, 2.1rem);
    line-height: 1;
    letter-spacing: 0;
}

.task-overview-banner__deadline-note {
    margin: 0;
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.45;
}

.task-overview-banner__deadline-note--meta {
    color: var(--text-soft);
    font-size: 0.82rem;
}

.task-overview-banner__deadline-metric {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.1;
}

.task-overview-banner__d4 {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-left: 5px solid #d97706;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(245, 158, 11, 0.14), rgba(245, 158, 11, 0.05)),
        rgba(255, 255, 255, 0.82);
}

.task-overview-banner__d4-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: #92400e;
    background: rgba(245, 158, 11, 0.16);
    font-size: 1rem;
}

.task-overview-banner__d4-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.task-overview-banner__d4-copy strong {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.2;
}

.task-overview-banner__d4-copy p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.86rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.task-overview-banner__summary {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.45;
}

.task-service-order-banner {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px 18px;
    border: 1px solid rgba(15, 118, 110, 0.28);
    border-left: 5px solid #0f766e;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(11, 87, 208, 0.06)),
        rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 28px rgba(15, 118, 110, 0.08);
}

.task-service-order-banner__icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #0f766e;
    background: rgba(15, 118, 110, 0.12);
}

.task-service-order-banner__body {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.task-service-order-banner__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.task-service-order-banner__eyebrow {
    color: #0d5b35;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.task-service-order-banner__title {
    font-size: clamp(1.08rem, 1.35vw, 1.34rem);
    line-height: 1.2;
    letter-spacing: 0;
}

.task-service-order-banner__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.task-service-order-banner__meta span {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.7);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.task-service-order-banner__meta i {
    flex: 0 0 auto;
    margin-top: 2px;
    color: #0f766e;
}

@media (max-width: 700px) {
    .task-service-order-banner,
    .task-service-order-banner__meta {
        grid-template-columns: 1fr;
    }

    .task-service-order-banner {
        padding: 14px;
    }
}

.task-fact-grid,
.task-relationship-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.task-fact {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface-muted);
}

.task-fact span {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.task-fact strong {
    font-size: 1rem;
    line-height: 1.25;
}

.task-fact--warning {
    border-color: rgba(245, 158, 11, 0.24);
    background:
        linear-gradient(180deg, rgba(245, 158, 11, 0.1), rgba(255, 255, 255, 0.82)),
        var(--surface-muted);
}

.assignment-card--warning {
    border-color: rgba(245, 158, 11, 0.24);
    background: rgba(245, 158, 11, 0.07);
}

.task-recurrence-history-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.task-detail-recurrence-shell {
    display: grid;
    gap: 18px;
}

.task-detail-card--recurrence {
    gap: 18px;
}

.task-recurrence-history-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.task-recurrence-history-intro > div {
    min-width: 0;
    display: grid;
    gap: 4px;
    align-content: start;
}

.task-recurrence-history-intro strong {
    font-size: 1rem;
    line-height: 1.2;
}

.task-recurrence-history-intro .muted {
    margin: 0;
}

.task-recurrence-history-intro__action {
    flex: 0 0 auto;
    white-space: nowrap;
}

.task-recurrence-tree {
    --recurrence-step: 12px;
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.36);
    list-style: none;
}

.task-recurrence-tree__item,
.task-recurrence-tree__gap {
    position: relative;
    min-width: 0;
    padding-left: calc(64px + (var(--recurrence-depth) * var(--recurrence-step)));
}

.task-recurrence-tree__item--depth-0,
.task-recurrence-tree__gap--depth-0 {
    --recurrence-depth: 0;
}

.task-recurrence-tree__item--depth-1,
.task-recurrence-tree__gap--depth-1 {
    --recurrence-depth: 1;
}

.task-recurrence-tree__item--depth-2,
.task-recurrence-tree__gap--depth-2 {
    --recurrence-depth: 2;
}

.task-recurrence-tree__item--depth-3,
.task-recurrence-tree__gap--depth-3 {
    --recurrence-depth: 3;
}

.task-recurrence-tree__item--depth-4,
.task-recurrence-tree__gap--depth-4 {
    --recurrence-depth: 4;
}

.task-recurrence-tree__item--depth-5,
.task-recurrence-tree__gap--depth-5 {
    --recurrence-depth: 5;
}

.task-recurrence-tree__item--depth-6,
.task-recurrence-tree__gap--depth-6 {
    --recurrence-depth: 6;
}

.task-recurrence-tree__rail {
    position: absolute;
    top: 0;
    bottom: -8px;
    left: calc(5px + (var(--recurrence-depth) * var(--recurrence-step)));
    width: 24px;
    display: grid;
    justify-items: center;
}

.task-recurrence-tree__rail::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(96, 112, 133, 0.28);
}

.task-recurrence-tree__item:last-child .task-recurrence-tree__rail,
.task-recurrence-tree__gap:last-child .task-recurrence-tree__rail {
    bottom: 50%;
}

.task-recurrence-tree__marker {
    position: relative;
    z-index: 1;
    width: max-content;
    min-width: 24px;
    max-width: 54px;
    height: 24px;
    padding: 0 7px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(96, 112, 133, 0.25);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-soft);
    font-size: 0.68rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.task-recurrence-tree__item--root .task-recurrence-tree__marker,
.task-recurrence-tree__item--latest .task-recurrence-tree__marker {
    border-color: rgba(15, 118, 110, 0.24);
    background: rgba(15, 118, 110, 0.1);
    color: var(--accent-dark);
}

.task-recurrence-tree__item--current .task-recurrence-tree__marker {
    border-color: rgba(11, 87, 208, 0.26);
    background: rgba(11, 87, 208, 0.12);
    color: #0b57d0;
}

.task-recurrence-tree__item--has-d4:not(.task-recurrence-tree__item--has-oos) .task-recurrence-tree__marker {
    border-color: rgba(79, 70, 229, 0.28);
    background: rgba(79, 70, 229, 0.1);
    color: #4338ca;
}

.task-recurrence-tree__item--has-oos .task-recurrence-tree__marker {
    border-color: rgba(217, 119, 6, 0.32);
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
}

.task-recurrence-tree__row {
    min-height: 58px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, auto) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.6);
}

.task-recurrence-tree__row:hover {
    border-color: rgba(96, 112, 133, 0.2);
    background: var(--surface-muted);
}

.task-recurrence-tree__item--current .task-recurrence-tree__row {
    border-color: rgba(11, 87, 208, 0.22);
    background:
        linear-gradient(180deg, rgba(232, 240, 255, 0.96), rgba(247, 250, 255, 0.98)),
        var(--surface-muted);
    box-shadow: inset 0 0 0 1px rgba(11, 87, 208, 0.08);
}

.task-recurrence-tree__main {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.task-recurrence-tree__main strong,
.task-recurrence-tree__main small,
.task-recurrence-tree__date,
.task-recurrence-tree__gap-card small {
    overflow-wrap: anywhere;
}

.task-recurrence-tree__main small,
.task-recurrence-tree__date,
.task-recurrence-tree__gap-card small {
    color: var(--text-soft);
    font-size: 0.86rem;
    line-height: 1.35;
}

.task-recurrence-tree__signals {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.task-recurrence-tree__signal {
    min-height: 25px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.task-recurrence-tree__signal i {
    font-size: 0.78rem;
    line-height: 1;
}

.task-recurrence-tree__signal:hover,
.task-recurrence-tree__signal:focus-visible {
    transform: translateY(-1px);
    text-decoration: none;
}

.task-recurrence-tree__signal--oos {
    border-color: rgba(217, 119, 6, 0.28);
    background: rgba(245, 158, 11, 0.13);
    color: #92400e;
}

.task-recurrence-tree__signal--oos:hover,
.task-recurrence-tree__signal--oos:focus-visible {
    border-color: rgba(217, 119, 6, 0.44);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.task-recurrence-tree__signal--d4 {
    border-color: rgba(79, 70, 229, 0.24);
    background: rgba(79, 70, 229, 0.1);
    color: #4338ca;
}

.task-recurrence-tree__signal--d4:hover,
.task-recurrence-tree__signal--d4:focus-visible {
    border-color: rgba(79, 70, 229, 0.4);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.task-recurrence-tree__note {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 9px 10px;
    border-left: 3px solid rgba(11, 87, 208, 0.38);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.78);
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.task-recurrence-tree__note-user {
    display: inline;
    margin-right: 2px;
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(11, 87, 208, 0.08);
    color: var(--text);
    font-weight: 750;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.task-recurrence-tree__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.task-recurrence-tree__link {
    justify-self: end;
}

.task-recurrence-tree__rail--gap::before {
    background: repeating-linear-gradient(
        to bottom,
        rgba(96, 112, 133, 0.28) 0 5px,
        transparent 5px 10px
    );
}

.task-recurrence-tree__gap-card {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border: 1px dashed rgba(96, 112, 133, 0.3);
    border-radius: var(--radius-md);
    background: rgba(248, 250, 252, 0.74);
    color: var(--text-soft);
}

.task-recurrence-tree__gap-card strong {
    color: var(--text);
    font-size: 0.9rem;
}

@media (max-width: 760px) {
    .task-recurrence-history-intro {
        flex-direction: column;
    }

    .task-recurrence-history-intro__action {
        width: 100%;
        justify-content: center;
        white-space: normal;
    }

    .task-recurrence-tree {
        --recurrence-step: 6px;
        padding: 8px;
    }

    .task-recurrence-tree__item,
    .task-recurrence-tree__gap {
        padding-left: calc(56px + (var(--recurrence-depth) * var(--recurrence-step)));
    }

    .task-recurrence-tree__rail {
        left: calc(2px + (var(--recurrence-depth) * var(--recurrence-step)));
    }

    .task-recurrence-tree__row {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 8px;
        padding: 10px 12px;
    }

    .task-recurrence-tree__actions {
        justify-content: flex-start;
    }

    .task-recurrence-tree__gap-card {
        display: grid;
        justify-content: stretch;
    }
}

.timeline-card--compact {
    padding: 14px;
    gap: 8px;
}

.task-detail-section {
    display: grid;
    gap: 10px;
}

.task-detail-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.task-detail-section__header strong {
    font-size: 0.96rem;
}

.task-detail-section__header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.task-rich-copy {
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface-muted);
}

.checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 700;
}

.checkbox-line input[type="checkbox"] {
    flex: 0 0 18px;
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-line input[type="checkbox"]:focus {
    outline: 2px solid rgba(11, 87, 208, 0.28);
    outline-offset: 2px;
    box-shadow: none;
}

.task-parameter-builder,
.task-parameter-builder__rows,
.task-parameter-row,
.task-parameter-input-panel,
.task-parameter-input-grid,
.task-parameter-value-grid,
.task-parameter-trend-grid,
.task-parameter-trend-card,
.task-parameter-trend-card__title {
    display: grid;
}

.task-parameter-builder {
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-muted);
}

.task-parameter-builder__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.task-parameter-builder__header span {
    color: var(--text);
}

.task-parameter-builder__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.task-parameter-builder__intro {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.task-parameter-builder__rows {
    gap: 10px;
}

.task-parameter-row {
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
}

.task-parameter-row--duplicate {
    border-color: rgba(220, 38, 38, 0.38);
    background: rgba(254, 242, 242, 0.78);
}

.task-parameter-row__grid {
    display: grid;
    grid-template-columns: minmax(150px, 1.05fr) minmax(150px, 1.1fr) minmax(112px, 0.7fr) minmax(82px, 0.55fr) minmax(82px, 0.5fr) minmax(82px, 0.5fr) auto;
    gap: 10px;
    align-items: end;
}

.task-parameter-row__required {
    min-height: 44px;
    padding-bottom: 2px;
}

.task-parameter-row__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
}

.task-parameter-row__feedback {
    min-width: 0;
    min-height: 20px;
    flex: 1 1 auto;
    color: #991b1b;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.35;
    overflow: visible;
    white-space: normal;
}

.task-parameter-row__feedback[aria-hidden="true"] {
    visibility: hidden;
}

.task-parameter-row__remove {
    flex: 0 0 auto;
    justify-self: end;
}

.task-parameter-input-panel {
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-muted);
}

.task-parameter-input-grid {
    gap: 10px;
}

.task-next-deadline-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
}

.task-next-deadline-panel__header,
.task-next-deadline-panel__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.task-next-deadline-panel__header > div {
    display: grid;
    gap: 3px;
}

.task-next-deadline-panel__header small,
.task-next-deadline-panel__summary span {
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 700;
}

.task-next-deadline-panel__summary {
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid rgba(123, 138, 159, 0.24);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

.task-next-deadline-panel__summary strong {
    white-space: nowrap;
}

.task-next-deadline-panel__toggle {
    justify-content: flex-start;
}

.task-next-deadline-panel__controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.task-next-deadline-panel__controls .field--full {
    grid-column: 1 / -1;
}

.task-parameter-input small {
    color: var(--text-soft);
    font-size: 0.78rem;
}

.task-parameter-value-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.task-parameter-value {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
}

.task-parameter-value__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.task-parameter-value__header > span:first-child {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.task-parameter-value strong {
    color: var(--text);
}

.task-parameter-value--warning {
    border-color: rgba(217, 119, 6, 0.35);
    background: rgba(255, 251, 235, 0.82);
}

.task-parameter-trend-section {
    gap: 12px;
}

.task-parameter-trend-section .task-detail-section__header small {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.task-parameter-trend-export {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.task-parameter-trend-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.task-parameter-trend-card {
    gap: 12px;
    padding: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(15, 118, 110, 0.06), rgba(11, 87, 208, 0.035)),
        #fff;
}

.task-parameter-trend-card__header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.task-parameter-trend-card__title {
    gap: 3px;
    min-width: 0;
}

.task-parameter-trend-card__title strong {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.18;
}

.task-parameter-trend-card__title small {
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 700;
}

.task-parameter-trend-chart-shell {
    width: 100%;
    max-width: 640px;
    justify-self: center;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.task-parameter-trend-chart {
    width: 100%;
    height: auto;
    min-height: 0;
    display: block;
    border: 1px solid rgba(96, 112, 133, 0.16);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.72);
}

.task-parameter-trend__grid-line {
    stroke: rgba(96, 112, 133, 0.22);
    stroke-width: 1;
}

.task-parameter-trend__axis-label,
.task-parameter-trend__date-label,
.task-parameter-trend__limit-label {
    fill: var(--text-soft);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 800;
}

.task-parameter-trend__line {
    fill: none;
    stroke: #0f766e;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.task-parameter-trend__point {
    fill: #fff;
    stroke: #0f766e;
    stroke-width: 2.5;
}

.task-parameter-trend__point--warning {
    fill: #fff7ed;
    stroke: #d97706;
    stroke-width: 3;
}

.task-parameter-trend__limit {
    stroke-width: 1.5;
    stroke-dasharray: 6 5;
}

.task-parameter-trend__limit--min {
    stroke: rgba(14, 116, 144, 0.58);
}

.task-parameter-trend__limit--max {
    stroke: rgba(190, 18, 60, 0.48);
}

.task-parameter-trend-card__footer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.task-parameter-trend-card__footer span {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid rgba(96, 112, 133, 0.16);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.task-parameter-trend-card__footer strong {
    min-width: 0;
    color: var(--text);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
    text-transform: none;
}

.task-parameter-trend-card__actions {
    display: flex;
    justify-content: flex-end;
}

.task-parameter-history-open {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.82rem;
}

.task-parameter-history-dialog {
    width: min(1180px, calc(100vw - 32px));
    max-width: none;
    max-height: min(880px, calc(100dvh - 32px));
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-xl);
    background: var(--surface-strong);
    color: var(--text);
    box-shadow: 0 28px 86px rgba(15, 23, 42, 0.24);
}

.task-parameter-history-dialog::backdrop {
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(4px);
}

.task-parameter-history-dialog__panel {
    display: grid;
    grid-template-rows: auto auto auto minmax(220px, auto) minmax(0, 1fr);
    gap: 14px;
    max-height: min(880px, calc(100dvh - 32px));
    padding: 18px;
    overflow: hidden;
}

.task-parameter-history-dialog__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.task-parameter-history-dialog__title {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.task-parameter-history-dialog__title strong {
    color: var(--text);
    font-size: clamp(1.22rem, 1.8vw, 1.6rem);
    line-height: 1.12;
}

.task-parameter-history-dialog__title small {
    color: var(--text-soft);
    font-size: 0.9rem;
    font-weight: 700;
}

.task-parameter-history-dialog__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.task-parameter-history-close {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.82rem;
}

.task-parameter-history-toolbar {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

.task-parameter-history-period {
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-soft);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
}

.task-parameter-history-period:hover {
    color: var(--text);
    background: rgba(11, 87, 208, 0.08);
}

.task-parameter-history-period.is-active {
    color: #fff;
    background: var(--accent);
}

.task-parameter-history-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.task-parameter-history-chart-shell {
    min-height: 230px;
    padding: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(15, 118, 110, 0.05), rgba(11, 87, 208, 0.025)),
        var(--surface-muted);
}

.task-parameter-history-chart {
    display: block;
    width: 100%;
    height: min(300px, 36vh);
    min-height: 230px;
}

.task-parameter-history-chart__empty {
    fill: var(--text-soft);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 800;
}

.task-parameter-history-table-wrap {
    min-height: 0;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
}

.task-parameter-history-table {
    min-width: 940px;
}

.task-parameter-history-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface-muted);
}

.task-parameter-history-table__row--warning td {
    background: rgba(255, 251, 235, 0.72);
}

.task-parameter-history-empty {
    margin: 12px;
}

body[data-theme="dark"] .task-parameter-trend-card {
    background:
        linear-gradient(180deg, rgba(20, 184, 166, 0.1), rgba(91, 157, 255, 0.08)),
        var(--surface-muted);
}

body[data-theme="dark"] .task-parameter-trend-chart,
body[data-theme="dark"] .task-parameter-trend-card__footer span {
    background: rgba(15, 23, 36, 0.58);
}

body[data-theme="dark"] .task-parameter-trend__point {
    fill: var(--surface-strong);
}

body[data-theme="dark"] .task-parameter-trend__point--warning {
    fill: rgba(217, 119, 6, 0.18);
}

body[data-theme="dark"] .task-parameter-history-dialog {
    background: var(--surface-strong);
}

body[data-theme="dark"] .task-parameter-history-chart-shell,
body[data-theme="dark"] .task-parameter-history-toolbar,
body[data-theme="dark"] .task-parameter-history-table thead th {
    background: var(--surface-muted);
}

body[data-theme="dark"] .task-parameter-history-table__row--warning td {
    background: rgba(217, 119, 6, 0.13);
}

.task-action-card {
    gap: 18px;
}

.task-action-form {
    gap: 14px;
}

.task-action-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.task-action-buttons .primary-button,
.task-action-buttons .secondary-button,
.task-action-buttons .ghost-button {
    width: 100%;
    justify-content: center;
}

.task-project-box {
    display: grid;
    gap: 10px;
}

.task-project-box p {
    margin: 0;
}

.task-detail-layout .card-header,
.task-detail-grid .card-header {
    font-size: 0.88rem;
}

.task-detail-layout .muted,
.task-detail-grid .muted,
.task-detail-layout .rich-copy p,
.task-detail-layout .rich-copy ul,
.task-detail-layout .rich-copy ol,
.task-detail-layout .rich-copy blockquote,
.task-detail-grid .rich-copy p,
.task-detail-grid .rich-copy ul,
.task-detail-grid .rich-copy ol,
.task-detail-grid .rich-copy blockquote,
.task-detail-layout .timeline-note,
.task-detail-grid .timeline-note {
    font-size: 0.92rem;
}

.task-detail-layout .assignment-card small,
.task-detail-grid .assignment-card small,
.task-detail-layout .text-link,
.task-detail-grid .text-link,
.task-detail-layout .data-table td small,
.task-detail-grid .data-table td small {
    font-size: 0.88rem;
}

.task-detail-layout .data-table th,
.task-detail-grid .data-table th,
.task-detail-layout .stat-label,
.task-detail-grid .stat-label {
    font-size: 0.90rem;
}

.task-detail-layout .badge,
.task-detail-grid .badge {
    min-height: 30px;
    font-size: 0.78rem;
}

/* Gør dashboardets boksoverskrifter tydeligere uden at ændre kortenes tabelstruktur. */
body.page-dashboard .dashboard-card-stack > .card > .card-header {
    position: relative;
    align-items: center;
    min-height: 42px;
    margin-bottom: 12px;
    padding: 9px 12px 10px;
    overflow: hidden;
    border: 1px solid rgba(15, 118, 110, 0.14);
    border-radius: var(--radius-lg);
    background: linear-gradient(90deg, rgba(15, 118, 110, 0.09), rgba(247, 250, 253, 0.72) 58%, rgba(255, 255, 255, 0));
}

body.page-dashboard .dashboard-card-stack > .card > .card-header::after {
    content: "";
    position: absolute;
    left: 12px;
    bottom: 0;
    width: min(96px, 32%);
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(15, 118, 110, 0.82), rgba(48, 120, 235, 0.56));
}

.dashboard-task-card-header {
    align-items: center;
}

.dashboard-task-card-header__title,
.dashboard-task-card-header__actions {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

body.page-dashboard .dashboard-task-card-header__title > span:last-child,
body.page-dashboard .dashboard-card-stack > .card > .card-header:not(.dashboard-task-card-header) > span:last-child {
    color: var(--text);
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1.2;
}

.dashboard-task-card-header__actions {
    margin-left: auto;
    justify-content: flex-end;
    flex-wrap: wrap;
    text-align: right;
}

.dashboard-task-card-header__actions small {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
}

.dashboard-alert {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(15, 118, 110, 0.12);
    background: rgba(15, 118, 110, 0.05);
}

.dashboard-alert strong {
    font-size: 0.78rem;
}

.dashboard-alert p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.7rem;
    line-height: 1.35;
}

.dashboard-alert--danger {
    border-color: rgba(181, 71, 71, 0.22);
    background: rgba(181, 71, 71, 0.1);
}

.assignment-repair-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.82fr);
    gap: 18px;
    align-items: stretch;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-muted);
}

.assignment-repair-card--critical {
    border-color: rgba(181, 71, 71, 0.32);
    background:
        linear-gradient(180deg, rgba(181, 71, 71, 0.08), rgba(181, 71, 71, 0.03)),
        var(--surface-muted);
}

.assignment-repair-card__main,
.assignment-repair-card__form {
    display: grid;
    gap: 12px;
    align-content: start;
    min-width: 0;
}

.assignment-repair-card__header {
    display: grid;
    gap: 4px;
}

.assignment-repair-card__main strong {
    display: block;
    margin-top: 8px;
    color: var(--text);
    font-size: 1.06rem;
}

.assignment-repair-card__main small {
    display: block;
    margin-top: 4px;
    color: var(--text-soft);
}

.assignment-repair-card__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.assignment-repair-card__fact {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding-left: 12px;
    border-left: 3px solid rgba(11, 87, 208, 0.28);
    color: var(--text-soft);
}

.assignment-repair-card__fact--valid {
    border-left-color: rgba(15, 118, 110, 0.36);
}

.assignment-repair-card__fact--invalid {
    border-left-color: rgba(181, 71, 71, 0.36);
}

.assignment-repair-card__fact dt {
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.assignment-repair-card__fact dd {
    margin: 0;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.assignment-choice-group {
    display: grid;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.assignment-choice-group legend {
    padding: 0;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 900;
}

.assignment-repair-card__note {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.84rem;
    line-height: 1.45;
}

.assignment-repair-card__validation {
    margin: 0;
    padding: 8px 10px;
    border: 1px solid rgba(181, 71, 71, 0.32);
    border-radius: var(--radius-md);
    background: rgba(181, 71, 71, 0.08);
    color: #9f1239;
    font-size: 0.82rem;
    font-weight: 800;
}

.assignment-repair-card__validation[hidden] {
    display: none;
}

.assignment-choice-list {
    display: grid;
    gap: 8px;
    max-height: 260px;
    overflow: auto;
    padding: 2px 4px 2px 0;
}

.assignment-choice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 20px;
    gap: 10px;
    align-items: center;
    min-height: 52px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.assignment-choice:hover,
.assignment-choice:focus-within {
    border-color: rgba(11, 87, 208, 0.4);
    box-shadow: 0 0 0 3px rgba(11, 87, 208, 0.1);
}

.assignment-choice:has(input:checked) {
    border-color: rgba(15, 118, 110, 0.46);
    background: rgba(15, 118, 110, 0.08);
}

.assignment-repair-card__form.is-invalid .assignment-choice {
    border-color: rgba(181, 71, 71, 0.34);
}

.assignment-choice input {
    width: 18px;
    height: 18px;
    accent-color: #0f766e;
}

.assignment-choice__body {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.assignment-choice__body strong {
    margin: 0;
    color: var(--text);
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.assignment-choice__body span {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
}

.assignment-choice > i {
    color: #0f766e;
    opacity: 0;
    transition: opacity 160ms ease;
}

.assignment-choice:has(input:checked) > i {
    opacity: 1;
}

.assignment-choice-empty {
    display: grid;
    gap: 4px;
    padding: 11px 12px;
    border: 1px dashed rgba(181, 71, 71, 0.34);
    border-radius: var(--radius-md);
    background: rgba(181, 71, 71, 0.06);
    color: var(--text-soft);
}

.assignment-choice-empty strong {
    color: var(--text);
    font-size: 0.88rem;
}

.assignment-repair-card__actions {
    align-self: end;
}

body[data-theme="dark"] .assignment-choice {
    background: rgba(15, 23, 36, 0.52);
}

body[data-theme="dark"] .assignment-choice:has(input:checked) {
    background: rgba(20, 184, 166, 0.13);
}

body[data-theme="dark"] .assignment-repair-card__validation {
    color: #fecdd3;
}

.dashboard-status-block {
    padding: 4px 0;
}

.dashboard-department-card {
    gap: 12px;
}

.dashboard-department-card__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-department-card__stats span {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: rgba(15, 118, 110, 0.06);
    color: var(--text-soft);
}

.dashboard-department-card__stats strong {
    color: var(--text);
    font-size: 1rem;
}

.meter-list,
.stack-list {
    display: grid;
    gap: 12px;
}

.stack-list--compact {
    margin-top: 18px;
}

.meter-row,
.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) repeat(2, minmax(200px, 0.8fr)) auto;
    gap: 16px;
    align-items: end;
    margin-bottom: 20px;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-filter-row {
    grid-template-columns: minmax(280px, 1.5fr) repeat(2, minmax(220px, 1fr)) auto;
}

.project-filter-row .filter-actions {
    justify-content: flex-start;
}

.system-settings-card {
    max-width: 860px;
}

.system-settings-form {
    margin-top: 14px;
}

.system-settings-preview {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

.system-settings-preview span {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.system-settings-preview code {
    overflow-wrap: anywhere;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.secondary-button.is-disabled,
.text-link.is-disabled {
    pointer-events: none;
    opacity: 0.52;
    transform: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.data-table th {
    font-size: 0.98rem;
    color: var(--text-soft);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.data-table td {
    font-size: 1rem;
}

.data-table td strong {
    font-size: 1.08rem;
}

.data-table td small {
    display: block;
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 0.94rem;
}

.task-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.task-title-line strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.task-project-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: #0f5b7a;
    font-size: 0.88rem;
    line-height: 1;
}

.task-d4-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    color: #92400e;
    background: rgba(245, 158, 11, 0.14);
    font-size: 0.78rem;
    line-height: 1;
}

.task-priority-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    font-size: 0.7rem;
    line-height: 1;
}

.task-priority-indicator--low {
    color: #047857;
    background: rgba(16, 185, 129, 0.1);
}

.task-priority-indicator--medium {
    color: #5b6776;
    background: rgba(100, 116, 139, 0.1);
}

.task-priority-indicator--high {
    color: #b45309;
    background: rgba(245, 158, 11, 0.14);
}

.task-row-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 8px;
    margin-top: 4px;
}

.task-row-meta__item {
    display: inline-flex;
    align-items: center;
}

.task-row-meta__item + .task-row-meta__item::before {
    content: "\00b7";
    margin-right: 8px;
    color: rgba(96, 112, 133, 0.72);
}

body.page-equipment .data-table th,
body.page-equipment .data-table td {
    padding: 9px 10px;
}

body.page-equipment .data-table td strong {
    font-size: 0.9rem;
}

body.page-equipment .data-table td:first-child {
    min-width: 180px;
}

.task-row--danger {
    background: rgba(181, 71, 71, 0.08);
}

.task-row--critical {
    background: rgba(220, 38, 38, 0.14);
}

.task-row--today {
    background: rgba(15, 118, 110, 0.06);
}

.task-row--certificate {
    background: rgba(79, 70, 229, 0.06);
}

.project-card {
    padding: 22px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface-muted);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.project-card--elevated {
    display: grid;
    gap: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.08)),
        var(--surface-muted);
}

.project-card--risk {
    border-color: rgba(220, 38, 38, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.12)),
        linear-gradient(135deg, rgba(254, 242, 242, 0.92), rgba(255, 255, 255, 0.68));
}

.project-card--active {
    border-color: rgba(37, 99, 235, 0.16);
}

.project-card--planned {
    border-color: rgba(148, 163, 184, 0.22);
}

.project-card--completed {
    border-color: rgba(15, 118, 110, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.12)),
        linear-gradient(135deg, rgba(240, 253, 250, 0.92), rgba(255, 255, 255, 0.7));
}

.project-card__header,
.project-card__headline,
.project-card__context,
.project-list-header,
.project-list-header__copy,
.project-section-stack,
.project-section,
.project-fact-grid,
.project-utility-grid,
.project-utility-link__copy {
    display: grid;
}

.project-card__header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
}

.project-card__headline {
    gap: 8px;
}

.project-card__headline strong {
    font-size: 1.06rem;
    line-height: 1.3;
}

.project-card__context {
    grid-template-columns: repeat(auto-fit, minmax(180px, max-content));
    gap: 10px 14px;
    color: var(--text-soft);
    font-size: 0.94rem;
}

.project-card__context span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.project-card__description {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card__description--muted {
    color: var(--text-soft);
}

.project-fact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.project-fact {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.62);
}

.project-fact__label {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.project-progress {
    display: grid;
    gap: 10px;
}

.project-progress__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.project-progress__track {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(191, 219, 254, 0.36);
}

.project-progress__track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1673ff 0%, #0b57d0 100%);
}

.project-gantt-card {
    gap: 14px;
}

.project-gantt__meta,
.project-gantt__legend {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.project-gantt__legend {
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 800;
}

.project-gantt__legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.project-gantt__legend-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.project-gantt__viewport {
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-color: rgba(96, 112, 133, 0.42) transparent;
}

.project-gantt {
    min-width: 820px;
    display: grid;
    gap: 8px;
}

.project-gantt__axis,
.project-gantt__row {
    display: grid;
    grid-template-columns: minmax(220px, 0.36fr) minmax(440px, 1fr) 118px;
    align-items: center;
    gap: 12px;
}

.project-gantt__axis {
    color: var(--text-soft);
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.project-gantt__axis > span:last-child,
.project-gantt__date {
    text-align: right;
}

.project-gantt__axis-track {
    position: relative;
    height: 38px;
    border-bottom: 1px solid var(--line-strong);
}

.project-gantt__tick,
.project-gantt__today {
    position: absolute;
    left: var(--gantt-left);
    width: 1px;
    pointer-events: none;
}

.project-gantt__tick {
    top: 12px;
    bottom: 0;
    background: var(--line);
}

.project-gantt__tick span {
    position: absolute;
    top: -12px;
    left: 0;
    transform: translateX(-50%);
    white-space: nowrap;
}

.project-gantt__today {
    top: 0;
    bottom: -8px;
    width: 2px;
    border-radius: 999px;
    background: #b54747;
    box-shadow: 0 0 0 3px rgba(181, 71, 71, 0.12);
}

.project-gantt__today::before {
    content: "I dag";
    position: absolute;
    top: -1px;
    left: 7px;
    color: #b54747;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.project-gantt__rows {
    display: grid;
    gap: 8px;
}

.project-gantt__row {
    min-height: 56px;
}

.project-gantt__task {
    min-width: 0;
    min-height: 48px;
    display: grid;
    align-content: center;
    gap: 3px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    color: var(--text);
    text-decoration: none;
    background: var(--surface-muted);
}

.project-gantt__task:hover {
    border-color: rgba(11, 87, 208, 0.28);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.07);
}

.project-gantt__task strong,
.project-gantt__task small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-gantt__task small,
.project-gantt__date small {
    color: var(--text-soft);
}

.project-gantt__row--child .project-gantt__task {
    position: relative;
    padding-left: 24px;
}

.project-gantt__row--child .project-gantt__task::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 14px;
    bottom: 14px;
    width: 3px;
    border-radius: 999px;
    background: var(--line-strong);
}

.project-gantt__track {
    position: relative;
    min-height: 48px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent calc(12.5% - 1px),
            rgba(96, 112, 133, 0.12) calc(12.5% - 1px),
            rgba(96, 112, 133, 0.12) 12.5%
        ),
        linear-gradient(180deg, rgba(247, 250, 253, 0.86), rgba(241, 245, 251, 0.72));
}

.project-gantt__bar {
    position: absolute;
    left: var(--gantt-left);
    top: 9px;
    bottom: 9px;
    width: var(--gantt-width);
    min-width: 8px;
    max-width: calc(100% - var(--gantt-left));
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    overflow: hidden;
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 850;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        0 8px 16px rgba(15, 23, 42, 0.12);
}

.project-gantt__marker {
    position: absolute;
    left: clamp(10px, var(--gantt-left), calc(100% - 10px));
    top: 50%;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.32),
        0 7px 14px rgba(15, 23, 42, 0.18);
}

.project-gantt__marker::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
}

.project-gantt__bar span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-gantt__bar:hover,
.project-gantt__marker:hover {
    filter: brightness(1.04);
}

.project-gantt__bar--not-started {
    background: linear-gradient(180deg, #64748b 0%, #475569 100%);
}

.project-gantt__bar--in-progress {
    background: linear-gradient(180deg, #1673ff 0%, #0b57d0 100%);
}

.project-gantt__bar--blocked {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.project-gantt__bar--awaiting-certificate {
    background: linear-gradient(180deg, #8b5cf6 0%, #6d28d9 100%);
}

.project-gantt__bar--completed {
    background: linear-gradient(180deg, #22a66a 0%, #1f8a54 100%);
}

.project-gantt__date {
    display: grid;
    gap: 3px;
}

.project-gantt__date strong {
    font-size: 0.88rem;
}

.project-card__actions {
    align-items: center;
}

.project-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.82fr);
    gap: 18px;
    align-items: start;
}

.project-workspace__main,
.project-workspace__side {
    min-width: 0;
}

.project-workspace__side {
    position: sticky;
    top: 112px;
}

.project-form-card {
    display: grid;
    gap: 16px;
}

.project-list-header {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.project-list-intro {
    display: grid;
    gap: 6px;
}

.project-list-intro p,
.project-section__title p,
.project-form-card__intro {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.project-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 0 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    margin-bottom: 20px;
}

.project-results-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.08);
    color: var(--accent-dark);
    font-weight: 700;
}

.project-inline-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.project-section-stack {
    gap: 20px;
}

.project-section {
    gap: 14px;
}

.project-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.project-section__title {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.project-section__title strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1rem;
}

.project-section__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.14);
    color: var(--text);
}

.project-section--risk .project-section__icon {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.project-section--active .project-section__icon {
    background: rgba(37, 99, 235, 0.12);
    color: #0b57d0;
}

.project-section--planned .project-section__icon {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.project-section--completed .project-section__icon {
    background: rgba(15, 118, 110, 0.12);
    color: var(--accent-dark);
}

.project-section__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: var(--text);
    font-weight: 800;
}

.compact-filter {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 16px;
    align-items: end;
}

body.js-ready .compact-filter[data-auto-submit="true"] .filter-actions {
    display: none;
}

[data-live-filter-panel] {
    position: relative;
    transition: opacity 180ms ease, filter 180ms ease;
}

[data-live-filter-panel].is-filter-loading {
    opacity: 0.58;
    filter: saturate(0.92);
    pointer-events: none;
}

[data-live-filter-panel].is-filter-loading::after {
    content: "";
    position: absolute;
    top: 14px;
    right: 14px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(43, 63, 103, 0.14);
    border-top-color: var(--accent);
    animation: filter-panel-spin 620ms linear infinite;
}

@keyframes filter-panel-spin {
    to {
        transform: rotate(360deg);
    }
}

body.page-suppliers .app-shell {
    gap: 10px;
    align-content: start;
    padding-bottom: 12px;
}

body.page-suppliers .page-hero {
    grid-template-columns: minmax(0, 1.8fr) auto;
    gap: 10px;
    padding: 0;
}

body.page-suppliers .page-hero h1 {
    margin: 4px 0 6px;
    font-size: clamp(1.2rem, 1.45vw, 1.6rem);
}

body.page-suppliers .page-hero .lead,
body.page-suppliers .muted,
body.page-suppliers .data-table td,
body.page-suppliers .data-table td small,
body.page-suppliers .text-link {
    font-size: 0.90rem;
    line-height: 1.35;
}

body.page-suppliers .card,
body.page-suppliers .card--wide {
    padding: 10px;
    border-radius: 14px;
}

body.page-suppliers .card-header,
body.page-suppliers .data-table th,
body.page-suppliers .field span {
    font-size: 0.90rem;
}

body.page-suppliers .card-header {
    margin-bottom: 8px;
}

body.page-suppliers .status-dot {
    width: 9px;
    height: 9px;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

body.page-suppliers .primary-button,
body.page-suppliers .secondary-button,
body.page-suppliers .ghost-button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 1rem;
}

.supplier-dashboard-stack,
.supplier-detail-layout {
    display: grid;
    gap: 14px;
    align-content: start;
}

.supplier-dashboard-card {
    width: 100%;
    max-width: none;
}

.supplier-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.supplier-section-head--align-end {
    align-items: end;
}

.supplier-section-copy {
    display: grid;
    gap: 4px;
}

.supplier-section-copy .card-header {
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 0;
}

.supplier-section-intro {
    margin: 0;
    max-width: 72ch;
}

.supplier-filter-toolbar {
    min-width: min(100%, 520px);
}

.supplier-table-wrap {
    margin-top: 2px;
}

.supplier-data-table {
    table-layout: fixed;
}

.supplier-data-table th,
.supplier-data-table td {
    padding: 9px 10px;
}

.supplier-data-table th:nth-child(1),
.supplier-data-table td:nth-child(1) {
    width: 29%;
}

.supplier-data-table th:nth-child(2),
.supplier-data-table td:nth-child(2) {
    width: 17%;
}

.supplier-data-table th:nth-child(3),
.supplier-data-table td:nth-child(3) {
    width: 35%;
}

.supplier-data-table th:nth-child(4),
.supplier-data-table td:nth-child(4) {
    width: 12%;
}

.supplier-data-table th:nth-child(5),
.supplier-data-table td:nth-child(5) {
    width: 7%;
    text-align: right;
}

.supplier-data-table td strong {
    font-size: 0.9rem;
}

.supplier-contact-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 10px;
    min-width: 0;
}

.supplier-contact-line > * {
    min-width: 0;
}

.supplier-contact-line > * + *::before {
    content: "\00b7";
    margin-right: 10px;
    color: rgba(96, 112, 133, 0.72);
}

.supplier-contact-line a,
.supplier-detail-panel a {
    color: var(--accent-dark);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.supplier-detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
    align-items: start;
}

.supplier-detail-panel {
    display: grid;
    gap: 12px;
}

.supplier-detail-item,
.supplier-detail-note {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
}

.supplier-detail-panel--wide {
    grid-column: 1 / -1;
}

.supplier-detail-list {
    display: grid;
    gap: 10px;
}

.supplier-detail-list--service {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.supplier-detail-item {
    display: grid;
    gap: 4px;
}

.supplier-detail-item span,
.supplier-detail-note span {
    margin-bottom: 4px;
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.supplier-detail-item strong,
.supplier-detail-item a {
    font-size: 1rem;
}

.supplier-detail-note {
    display: grid;
    gap: 6px;
}

.supplier-detail-note p {
    margin: 0;
    color: var(--text);
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.supplier-detail-note--large {
    min-height: 128px;
}

.supplier-service-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface-muted);
}

.supplier-service-summary p {
    max-width: 70ch;
    margin: 0;
    color: var(--text-soft);
    line-height: 1.5;
}

@media (max-width: 860px) {
    body.page-suppliers .supplier-section-head,
    body.page-suppliers .supplier-section-head--align-end {
        flex-direction: column;
        align-items: stretch;
    }

    body.page-suppliers .supplier-filter-toolbar {
        min-width: 0;
        width: 100%;
    }

    body.page-suppliers .supplier-detail-layout,
    body.page-suppliers .supplier-detail-list--service {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    body.page-suppliers .supplier-data-table,
    body.page-suppliers .supplier-data-table thead,
    body.page-suppliers .supplier-data-table tbody,
    body.page-suppliers .supplier-data-table tr,
    body.page-suppliers .supplier-data-table th,
    body.page-suppliers .supplier-data-table td {
        display: block;
        width: 100%;
    }

    body.page-suppliers .supplier-data-table thead {
        display: none;
    }

    body.page-suppliers .supplier-data-table tr {
        padding: 10px 0;
        border-bottom: 1px solid var(--line);
    }

    body.page-suppliers .supplier-data-table td {
        display: grid;
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 10px;
        padding: 7px 4px;
        border-bottom: 0;
        text-align: left;
    }

    body.page-suppliers .supplier-data-table td::before {
        content: attr(data-label);
        color: var(--text-soft);
        font-size: 0.72rem;
        font-weight: 900;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    body.page-suppliers .supplier-data-table td:last-child {
        text-align: left;
    }
}

.project-list-shell {
    display: grid;
    gap: 16px;
}

.project-utility-card {
    display: grid;
    gap: 16px;
}

.project-utility-grid {
    gap: 12px;
}

.project-utility-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.54);
    color: var(--text);
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.project-utility-link:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 118, 110, 0.28);
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.06);
}

.project-completion-form {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: var(--radius-md);
    background: rgba(255, 251, 235, 0.62);
}

.project-completion-form .primary-button {
    justify-content: center;
    width: 100%;
}

.project-completion-notice {
    display: grid;
    gap: 4px;
}

.project-utility-link__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--accent-dark);
}

.admin-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-console-nav,
.admin-domain-stack,
.admin-module-list {
    display: grid;
    gap: 16px;
}

.admin-console-nav {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: start;
}

.admin-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text);
    font-size: 0.96rem;
    font-weight: 700;
}

.admin-module-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-module-row__copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.admin-module-row__copy strong {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.admin-module-row__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-console-nav__link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
    align-content: start;
    column-gap: 14px;
    row-gap: 4px;
    min-height: 84px;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface-muted);
    color: var(--text);
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.admin-console-nav__icon {
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--accent-dark);
    font-size: 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.admin-console-nav__group {
    grid-column: 2;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-console-nav__title {
    grid-column: 2;
    display: block;
    line-height: 1.2;
}

.admin-console-nav__link.is-active,
.admin-console-nav__link:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 118, 110, 0.3);
    box-shadow: 0 16px 28px rgba(15, 118, 110, 0.08);
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(15, 118, 110, 0.04));
}

.admin-console-nav__link.is-active .admin-console-nav__icon,
.admin-console-nav__link:hover .admin-console-nav__icon {
    background: rgba(15, 118, 110, 0.16);
    color: var(--accent-dark);
}

.admin-domain-card {
    padding: 22px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface-muted);
    display: grid;
    gap: 18px;
}

.admin-domain-card__header strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.06rem;
}

.admin-module-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-module-card {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: var(--surface-strong);
    text-decoration: none;
    color: var(--text);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.admin-module-card p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.admin-module-card:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 118, 110, 0.28);
    box-shadow: 0 16px 28px rgba(15, 118, 110, 0.08);
}

.admin-module-card--planned {
    opacity: 0.88;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.14));
}

.admin-list-header {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

body.page-admin .app-shell {
    gap: 10px;
    align-content: start;
}

body.page-admin .alert {
    align-self: start;
    min-height: auto;
    height: auto;
}

body.page-admin .page-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 0;
    align-items: center;
}

body.page-admin .page-hero h1 {
    margin: 2px 0 4px;
    font-size: clamp(1.22rem, 1.4vw, 1.55rem);
}

body.page-admin .page-hero .lead {
    max-width: 56ch;
    font-size: 0.86rem;
    line-height: 1.35;
}

body.page-admin .page-actions {
    align-self: start;
    padding: 4px;
    border-radius: 12px;
}

body.page-admin .page-actions .primary-button,
body.page-admin .page-actions .secondary-button,
body.page-admin .page-actions .ghost-button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.82rem;
}

body.page-admin .admin-console-nav {
    display: flex;
    gap: 6px;
    align-items: center;
    overflow-x: auto;
    padding: 2px 0 4px;
    scrollbar-width: thin;
}

body.page-admin .admin-console-nav__link {
    flex: 0 0 auto;
    display: inline-flex;
    grid-template-columns: none;
    grid-template-rows: none;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
}

body.page-admin .admin-console-nav__icon {
    grid-row: auto;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    font-size: 0.78rem;
    box-shadow: none;
}

body.page-admin .admin-console-nav__group {
    display: none;
}

body.page-admin .admin-console-nav__title {
    grid-column: auto;
    font-size: 0.82rem;
    line-height: 1;
}

body.page-admin .admin-list-header {
    gap: 10px;
    margin-bottom: 12px;
}

body.page-admin .card {
    padding: 14px;
    border-radius: 14px;
}

body.page-admin .card-header {
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

body.page-admin input,
body.page-admin select,
body.page-admin textarea {
    min-height: 38px;
    padding: 9px 11px;
    font-size: 0.88rem;
}

body.page-admin .field span {
    font-size: 0.78rem;
}

body.page-admin .data-table th,
body.page-admin .data-table td {
    padding: 9px 10px;
}

body.page-admin .data-table th {
    font-size: 0.78rem;
}

body.page-admin .data-table td,
body.page-admin .data-table td small {
    font-size: 0.88rem;
    line-height: 1.32;
}

body.page-admin .data-table td strong {
    font-size: 0.92rem;
}

body.page-admin .badge {
    min-height: 24px;
    padding: 0 8px;
    font-size: 0.7rem;
}

.admin-interval-stack {
    align-items: start;
}

.admin-interval-overview,
.admin-interval-list {
    display: grid;
    gap: 16px;
}

.admin-interval-overview__body {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 18px;
    align-items: start;
}

.admin-interval-overview__copy {
    display: grid;
    gap: 8px;
}

.admin-interval-overview__copy strong {
    font-size: 1.06rem;
    line-height: 1.3;
}

.admin-interval-overview__copy p,
.admin-interval-list-header p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.admin-interval-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.audit-filter {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 0.8fr)) minmax(220px, 1.2fr) auto;
    gap: 12px;
    align-items: end;
}

body.page-admin .audit-filter {
    grid-template-columns: repeat(3, minmax(128px, 0.8fr)) repeat(2, minmax(128px, 0.65fr)) minmax(180px, 1fr) auto;
    gap: 8px;
}

.audit-filter__actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

body.page-admin .audit-filter__actions {
    gap: 6px;
}

body.page-admin .audit-filter__actions .primary-button,
body.page-admin .audit-filter__actions .secondary-button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.82rem;
}

.audit-summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text-soft);
    font-size: 0.92rem;
    font-weight: 800;
}

.audit-integrity-card {
    display: grid;
    gap: 14px;
}

.audit-integrity-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.audit-integrity-card__header .card-header {
    margin-bottom: 4px;
}

.audit-integrity-card__header p {
    margin: 0;
}

.audit-integrity-card__facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.audit-integrity-card__facts span {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

.audit-integrity-card__facts strong {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.2;
    word-break: break-word;
}

.audit-integrity-card__facts small,
.audit-integrity-card__hash {
    color: var(--text-soft);
    line-height: 1.45;
}

.audit-integrity-card__hash,
.audit-integrity-card__issue {
    margin: 0;
}

.admin-statistics-toolbar,
.admin-statistics-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-statistics-toolbar p,
.admin-statistics-panel__head p {
    max-width: 760px;
    margin: 0;
}

.admin-statistics-filter {
    display: flex;
    align-items: end;
    gap: 8px;
    margin: 0;
}

.admin-statistics-filter .field {
    min-width: 190px;
}

.admin-statistics-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.admin-statistics-kpis article {
    min-height: 100px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.admin-statistics-kpis span,
.admin-statistics-kpis small,
.admin-statistics-legend,
.admin-statistics-bar-row small {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
}

.admin-statistics-kpis strong {
    color: var(--text);
    font-size: 1.35rem;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.admin-statistics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.admin-statistics-panel,
.admin-statistics-technical {
    display: grid;
    gap: 12px;
}

.admin-statistics-panel--wide {
    grid-column: 1 / -1;
}

.admin-statistics-chart-shell {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.admin-statistics-chart {
    width: 100%;
    min-width: 620px;
    height: auto;
    display: block;
    border: 1px solid rgba(96, 112, 133, 0.16);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.88)),
        var(--surface);
}

/* Holder den brede auditkurve i samme visuelle højde som de øvrige kurver. */
.admin-statistics-panel--wide .admin-statistics-chart {
    max-width: var(--admin-statistics-chart-width, 760px);
    min-width: var(--admin-statistics-chart-width, 760px);
}

.admin-statistics-chart__grid-line {
    stroke: rgba(96, 112, 133, 0.18);
    stroke-width: 1;
}

.admin-statistics-chart__axis-label,
.admin-statistics-chart__date-label {
    fill: var(--text-soft);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 800;
}

.admin-statistics-chart__line {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-statistics-chart__line--primary,
.admin-statistics-chart__point--primary {
    stroke: #2563eb;
}

.admin-statistics-chart__line--secondary,
.admin-statistics-chart__point--secondary {
    stroke: #0f766e;
}

.admin-statistics-chart__line--success,
.admin-statistics-chart__point--success {
    stroke: #16a34a;
}

.admin-statistics-chart__line--danger,
.admin-statistics-chart__point--danger {
    stroke: #dc2626;
}

.admin-statistics-chart__line--warning,
.admin-statistics-chart__point--warning {
    stroke: #d97706;
}

.admin-statistics-chart__point {
    fill: var(--surface);
    stroke-width: 2.4;
}

.admin-statistics-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-statistics-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.admin-statistics-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.admin-statistics-legend__dot--primary {
    background: #2563eb;
}

.admin-statistics-legend__dot--secondary {
    background: #0f766e;
}

.admin-statistics-legend__dot--success {
    background: #16a34a;
}

.admin-statistics-legend__dot--danger {
    background: #dc2626;
}

.admin-statistics-legend__dot--warning {
    background: #d97706;
}

.admin-statistics-bars {
    display: grid;
    gap: 10px;
}

.admin-statistics-bar-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(140px, 0.8fr) minmax(44px, auto);
    align-items: center;
    gap: 10px;
}

.admin-statistics-bar-row > div:first-child {
    min-width: 0;
}

.admin-statistics-bar-row strong,
.admin-statistics-bar-row small {
    display: block;
    overflow-wrap: anywhere;
}

.admin-statistics-bar-row__track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.22);
}

.admin-statistics-bar-row__track i {
    width: var(--bar-width);
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb 0%, #14b8a6 100%);
}

.admin-statistics-bar-row b {
    color: var(--text);
    font-size: 0.9rem;
    text-align: right;
}

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

@media (max-width: 720px) {
    .admin-statistics-toolbar,
    .admin-statistics-filter,
    .admin-statistics-bar-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .admin-statistics-toolbar {
        display: grid;
    }

    .admin-statistics-filter {
        display: grid;
    }

    .admin-statistics-filter .field {
        min-width: 0;
    }

    .admin-statistics-bar-row b {
        text-align: left;
    }
}

.audit-table td:first-child {
    min-width: 170px;
}

body.page-admin .audit-table td:first-child {
    min-width: 150px;
}

.audit-table td:last-child,
.audit-table th:last-child {
    min-width: 240px;
    white-space: normal;
}

body.page-admin .audit-table td:last-child,
body.page-admin .audit-table th:last-child {
    min-width: 180px;
    white-space: normal;
}

.audit-details summary {
    cursor: pointer;
    color: var(--primary);
    font-weight: 800;
}

.audit-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.audit-detail-block {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.audit-detail-block strong {
    font-size: 0.82rem;
    text-transform: uppercase;
    color: var(--text-soft);
}

.audit-json {
    max-width: min(540px, 70vw);
    max-height: 260px;
    overflow: auto;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.72);
    color: var(--text);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.78rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.audit-meta-list {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 4px 10px;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
}

.audit-meta-list dt {
    color: var(--text-soft);
    font-weight: 800;
}

.audit-meta-list dd {
    min-width: 0;
    margin: 0;
    color: var(--text);
    overflow-wrap: anywhere;
}

.project-empty-state {
    padding: 26px;
    border-radius: var(--radius-lg);
    border: 1px dashed var(--line-strong);
    background: var(--surface-muted);
}

.project-empty-state strong {
    display: block;
    margin-bottom: 8px;
}

.table-wrap {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.38);
}

.data-table thead {
    background: rgba(15, 118, 110, 0.06);
}

.data-table td:first-child {
    min-width: 260px;
}

.data-table td:last-child,
.data-table th:last-child {
    white-space: nowrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
}

.badge--neutral {
    color: var(--text);
    background: rgba(127, 140, 135, 0.15);
}

.badge--info {
    color: #0f5b7a;
    background: rgba(61, 155, 220, 0.18);
}

.badge--success {
    color: #0d5b35;
    background: rgba(31, 138, 84, 0.14);
}

.badge--warning {
    color: #8b5a00;
    background: rgba(245, 158, 11, 0.18);
}

.badge--danger {
    color: #8e2a2a;
    background: rgba(181, 71, 71, 0.14);
}

.stat-card--danger {
    border-color: rgba(181, 71, 71, 0.22);
    background: linear-gradient(180deg, rgba(181, 71, 71, 0.12), rgba(255, 255, 255, 0.82));
}

.stat-card--alert {
    position: relative;
    box-shadow:
        inset 0 0 0 1px rgba(181, 71, 71, 0.12),
        0 14px 28px rgba(181, 71, 71, 0.12);
}

.stat-card--alert::before {
    content: "Lageradvarsel";
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, #fff5f5 0%, #fee2e2 100%);
    border: 1px solid rgba(220, 38, 38, 0.24);
    color: #991b1b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-dot--danger {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.14);
}

.status-dot--today {
    background: linear-gradient(180deg, #14b8a6 0%, #0f766e 100%);
}

.calendar-toolbar,
.calendar-toolbar__center,
.calendar-filter,
.calendar-day__header,
.calendar-event,
.rich-copy,
.insight-block {
    display: grid;
    gap: 12px;
}

.calendar-toolbar {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    margin-bottom: 18px;
}

.calendar-card {
    overflow: visible;
}

body.page-calendar .app-shell {
    gap: 10px;
    align-content: start;
}

body.page-calendar .calendar-card {
    padding: 14px;
    border-radius: 14px;
}

body.page-calendar .card-header {
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.calendar-toolbar__center {
    justify-items: center;
}

.calendar-filter {
    grid-template-columns: minmax(220px, 1fr) minmax(170px, auto) auto auto;
    align-items: end;
}

.calendar-filter .field {
    min-width: 0;
}

.calendar-filter .field span {
    font-size: 0.76rem;
}

.calendar-filter select {
    min-height: 42px;
}

.calendar-filter .secondary-button {
    align-self: end;
    min-height: 42px;
    padding: 0 18px;
}

body.page-calendar .calendar-toolbar {
    align-items: end;
    gap: 10px;
    margin-bottom: 12px;
}

body.page-calendar .calendar-toolbar__center {
    gap: 8px;
}

body.page-calendar .calendar-toolbar__center > strong {
    font-size: 1rem;
}

body.page-calendar .calendar-filter {
    grid-template-columns: minmax(210px, 0.9fr) minmax(160px, 0.7fr) auto auto;
    gap: 8px;
}

body.page-calendar .calendar-filter .field span {
    font-size: 0.72rem;
}

body.page-calendar .calendar-filter select,
body.page-calendar .calendar-filter .secondary-button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.84rem;
}

body.page-calendar .calendar-scope-label {
    font-size: 0.78rem;
}

body.page-calendar .calendar-legend {
    gap: 8px 12px;
}

body.page-calendar .calendar-weekdays,
body.page-calendar .calendar-grid {
    gap: 8px;
}

body.page-calendar .calendar-weekdays {
    margin-bottom: 8px;
    font-size: 0.78rem;
}

body.page-calendar .calendar-day {
    min-height: 148px;
    gap: 8px;
    padding: 10px;
    border-radius: 12px;
}

body.page-calendar .calendar-event {
    min-height: 32px;
    padding: 6px 8px 6px 11px;
}

.calendar-view-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.64);
}

.calendar-view-switch__button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.calendar-view-switch__button:hover {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.calendar-view-switch__button.is-active {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(11, 87, 208, 0.22);
}

.calendar-view-switch__button.is-active:hover {
    color: #ffffff;
}

.calendar-scope-label {
    color: var(--text-soft);
    font-weight: 700;
}

.calendar-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.calendar-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 750;
}

.calendar-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(96, 112, 133, 0.42);
}

.calendar-status--not-started {
    background: #94a3b8;
}

.calendar-status--in-progress {
    background: #3b82f6;
}

.calendar-status--blocked {
    background: #f59e0b;
}

.calendar-status--awaiting-certificate {
    background: #4f46e5;
}

.calendar-status--completed {
    background: #22c55e;
}

.calendar-status--project {
    background: #a855f7;
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.calendar-weekdays {
    margin-bottom: 12px;
    color: var(--text-soft);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
}

.calendar-day {
    position: relative;
    min-height: 166px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-content: start;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(247, 250, 253, 0.72));
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.calendar-day.has-events {
    background: var(--surface-muted);
}

.calendar-day.has-project-periods {
    background:
        linear-gradient(180deg, rgba(168, 85, 247, 0.08), rgba(255, 255, 255, 0) 54%),
        var(--surface-muted);
}

.calendar-day.is-today {
    border-color: rgba(20, 184, 166, 0.68);
    background:
        linear-gradient(180deg, rgba(20, 184, 166, 0.11) 0%, rgba(255, 255, 255, 0.94) 48%),
        var(--surface);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14), 0 16px 32px rgba(15, 23, 42, 0.08);
}

.calendar-day.is-today::after {
    content: "";
    position: absolute;
    inset: -1px;
    border: 2px solid rgba(20, 184, 166, 0.34);
    border-radius: inherit;
    pointer-events: none;
}

.calendar-day.has-events:hover {
    border-color: rgba(96, 112, 133, 0.34);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.calendar-day.is-today.has-events:hover {
    border-color: rgba(20, 184, 166, 0.76);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16), 0 18px 34px rgba(15, 23, 42, 0.1);
}

.calendar-day.is-muted {
    opacity: 0.58;
}

.calendar-day.is-muted.is-today {
    opacity: 1;
}

.calendar-day__empty {
    align-self: start;
    font-size: 0.82rem;
    line-height: 1.35;
    opacity: 0.72;
}

.calendar-day__header {
    grid-auto-flow: column;
    justify-content: space-between;
    align-items: center;
}

.calendar-day__header > div {
    display: grid;
    gap: 2px;
}

.calendar-day.is-today .calendar-day__header strong {
    color: #0f766e;
}

.calendar-day__badges {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.calendar-day__today-badge {
    min-height: 26px;
    display: inline-grid;
    place-items: center;
    padding: 0 8px;
    border-radius: 999px;
    background: #0f766e;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
}

.calendar-day__count {
    min-width: 26px;
    min-height: 26px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(91, 157, 255, 0.16);
    color: var(--accent-dark);
    font-size: 0.74rem;
    font-weight: 800;
}

.calendar-day__project-count {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border: 1px solid rgba(168, 85, 247, 0.28);
    border-radius: 999px;
    background: rgba(168, 85, 247, 0.14);
    color: #6d28d9;
    font-size: 0.68rem;
    font-weight: 850;
    line-height: 1;
}

.calendar-event-list {
    display: grid;
    gap: 6px;
    align-content: start;
}

.calendar-event-list--overflow {
    max-height: 300px;
    overflow: auto;
    padding-right: 4px;
}

.calendar-event {
    min-height: 36px;
    position: relative;
    padding: 7px 9px 7px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid transparent;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.calendar-event::before {
    content: "";
    position: absolute;
    inset: 7px auto 7px 5px;
    width: 3px;
    border-radius: 999px;
    background: rgba(96, 112, 133, 0.5);
}

.calendar-event:hover {
    border-color: rgba(96, 112, 133, 0.24);
    transform: translateY(-1px);
}

.calendar-event span,
.calendar-event small {
    min-width: 0;
}

.calendar-event span {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.88rem;
    font-weight: 750;
    line-height: 1.2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.calendar-event small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text-soft);
    font-size: 0.72rem;
    line-height: 1.25;
}

.calendar-event--not-started {
    background: rgba(148, 163, 184, 0.16);
}

.calendar-event--not-started::before {
    background: #94a3b8;
}

.calendar-event--in-progress {
    background: rgba(59, 130, 246, 0.14);
}

.calendar-event--in-progress::before {
    background: #3b82f6;
}

.calendar-event--blocked {
    background: rgba(245, 158, 11, 0.16);
}

.calendar-event--blocked::before {
    background: #f59e0b;
}

.calendar-event--awaiting-certificate {
    background: rgba(79, 70, 229, 0.14);
}

.calendar-event--awaiting-certificate::before {
    background: #4f46e5;
}

.calendar-event--completed {
    background: rgba(34, 197, 94, 0.14);
}

.calendar-event--completed::before {
    background: #22c55e;
}

.calendar-event--project {
    background: rgba(168, 85, 247, 0.13);
}

.calendar-event--project::before {
    background: #a855f7;
}

.calendar-project-periods {
    display: grid;
    gap: 6px;
}

.calendar-event-list + .calendar-project-periods,
.calendar-day__more + .calendar-project-periods {
    margin-top: 2px;
    padding-top: 6px;
    border-top: 1px solid rgba(168, 85, 247, 0.14);
}

.calendar-project-period {
    min-height: 34px;
    border-color: rgba(168, 85, 247, 0.14);
}

.calendar-project-period span {
    font-size: 0.82rem;
    -webkit-line-clamp: 1;
}

.calendar-project-period small {
    font-size: 0.68rem;
}

.calendar-day__more {
    position: relative;
    margin-top: 0;
}

.calendar-day__more summary {
    width: 100%;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.62);
    color: var(--accent-dark);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
    transition: border-color 180ms ease, background 180ms ease;
}

.calendar-day__more summary:hover {
    border-color: rgba(11, 87, 208, 0.26);
    background: rgba(255, 255, 255, 0.92);
}

.calendar-day__more summary::-webkit-details-marker {
    display: none;
}

.calendar-day__more[open] summary {
    margin-bottom: 0;
}

.calendar-day__more[open] .calendar-event-list--overflow {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 25;
    padding: 10px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    background: var(--surface-strong);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.16);
}

.year-wheel-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(20px, 2.2vw, 34px);
    align-items: start;
}

.year-wheel,
.year-wheel-agenda {
    min-width: 0;
    width: 100%;
}

.year-wheel__dial {
    position: relative;
    width: min(100%, 660px);
    aspect-ratio: 1;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 50%;
    background:
        radial-gradient(circle at center, var(--surface-strong) 0 29%, rgba(255, 255, 255, 0) 30%),
        conic-gradient(
            from -90deg,
            rgba(59, 130, 246, 0.18) 0deg 30deg,
            rgba(20, 184, 166, 0.18) 30deg 60deg,
            rgba(245, 158, 11, 0.16) 60deg 90deg,
            rgba(168, 85, 247, 0.15) 90deg 120deg,
            rgba(34, 197, 94, 0.16) 120deg 150deg,
            rgba(14, 165, 233, 0.16) 150deg 180deg,
            rgba(239, 68, 68, 0.13) 180deg 210deg,
            rgba(99, 102, 241, 0.16) 210deg 240deg,
            rgba(217, 119, 6, 0.14) 240deg 270deg,
            rgba(5, 150, 105, 0.16) 270deg 300deg,
            rgba(219, 39, 119, 0.13) 300deg 330deg,
            rgba(37, 99, 235, 0.16) 330deg 360deg
        ),
        var(--surface-muted);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46), var(--shadow);
}

.year-wheel__dial::before,
.year-wheel__dial::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.year-wheel__dial::before {
    inset: 12%;
    border: 1px dashed rgba(96, 112, 133, 0.28);
}

.year-wheel__dial::after {
    inset: 27%;
    border: 1px solid rgba(96, 112, 133, 0.16);
}

.year-wheel__center {
    position: absolute;
    inset: 35%;
    z-index: 2;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 4px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-strong);
    text-align: center;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1);
}

.year-wheel__center span,
.year-wheel__center small,
.year-wheel__month-name {
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.year-wheel__center strong {
    color: var(--text);
    font-size: 1.7rem;
    line-height: 1;
}

.year-wheel__center small {
    text-transform: none;
}

.year-wheel__center-subline {
    color: var(--accent-dark);
    font-weight: 850;
}

.year-wheel__month {
    --intensity: 0;
    position: absolute;
    left: calc(var(--x) * 1%);
    top: calc(var(--y) * 1%);
    z-index: 3;
    width: clamp(82px, 16%, 96px);
    min-height: 72px;
    display: grid;
    place-items: center;
    gap: 2px;
    overflow: hidden;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    text-align: center;
    text-decoration: none;
    transform: translate(-50%, -50%);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.year-wheel__month::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #14b8a6, #3b82f6 52%, #f59e0b);
    opacity: calc(var(--intensity) * 0.24);
    pointer-events: none;
}

.year-wheel__month > * {
    position: relative;
    z-index: 1;
}

.year-wheel__month strong {
    font-size: 1.28rem;
    line-height: 1;
}

.year-wheel__project-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    max-width: 100%;
    margin-top: 2px;
    padding: 0 7px;
    border: 1px solid rgba(168, 85, 247, 0.28);
    border-radius: 999px;
    background: rgba(168, 85, 247, 0.14);
    color: #6d28d9;
    font-size: 0.68rem;
    font-weight: 850;
    line-height: 1;
}

.year-wheel__month.has-events {
    border-color: rgba(11, 87, 208, 0.24);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.year-wheel__month.is-selected {
    border-color: rgba(11, 87, 208, 0.52);
    box-shadow: 0 0 0 4px rgba(11, 87, 208, 0.12), 0 14px 28px rgba(15, 23, 42, 0.12);
}

.year-wheel__month:hover {
    border-color: rgba(11, 87, 208, 0.42);
    transform: translate(-50%, -52%);
}

.year-wheel-agenda {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.year-wheel-agenda__month {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 142px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
}

.year-wheel-agenda__month.has-events {
    background: var(--surface-muted);
}

.year-wheel-agenda__month.is-selected {
    border-color: rgba(11, 87, 208, 0.42);
}

.year-wheel-agenda__month-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.year-wheel-agenda__month-header a {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-weight: 850;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.year-wheel-agenda__month-header a:hover {
    color: var(--accent-dark);
}

.year-wheel-agenda__month-header span {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(91, 157, 255, 0.14);
    color: var(--accent-dark);
    font-size: 0.72rem;
    font-weight: 800;
}

.year-wheel-agenda__more summary {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
    color: var(--accent-dark);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.year-wheel-agenda__more summary::-webkit-details-marker {
    display: none;
}

.year-wheel-agenda__more[open] .calendar-event-list {
    margin-top: 8px;
}

.year-wheel-project-periods {
    display: grid;
    gap: 8px;
    padding-top: 2px;
}

.calendar-event-list + .year-wheel-project-periods,
.year-wheel-agenda__more + .year-wheel-project-periods {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.year-wheel-project-periods__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.year-wheel-project-periods__title strong {
    min-width: 0;
    overflow: hidden;
    color: #6d28d9;
    font-size: 0.72rem;
    text-align: right;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
}

.year-wheel-project-period {
    border-color: rgba(168, 85, 247, 0.18);
}

body[data-theme="dark"] .calendar-view-switch,
body[data-theme="dark"] .year-wheel__month,
body[data-theme="dark"] .year-wheel-agenda__month,
body[data-theme="dark"] .year-wheel-agenda__more summary {
    background: rgba(29, 40, 56, 0.74);
}

body[data-theme="dark"] .calendar-day.is-today {
    border-color: rgba(45, 212, 191, 0.72);
    background:
        linear-gradient(180deg, rgba(45, 212, 191, 0.18) 0%, rgba(29, 40, 56, 0.92) 50%),
        var(--surface);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18), 0 16px 32px rgba(2, 6, 23, 0.22);
}

body[data-theme="dark"] .calendar-day.is-today .calendar-day__header strong {
    color: #5eead4;
}

body[data-theme="dark"] .calendar-day.is-today.has-events:hover {
    border-color: rgba(94, 234, 212, 0.78);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.2), 0 18px 34px rgba(2, 6, 23, 0.24);
}

body[data-theme="dark"] .calendar-day__today-badge {
    background: #5eead4;
    color: #042f2e;
}

body[data-theme="dark"] .year-wheel__dial {
    background:
        radial-gradient(circle at center, var(--surface-strong) 0 29%, rgba(29, 40, 56, 0) 30%),
        conic-gradient(
            from -90deg,
            rgba(91, 157, 255, 0.2) 0deg 30deg,
            rgba(45, 212, 191, 0.18) 30deg 60deg,
            rgba(251, 191, 36, 0.14) 60deg 90deg,
            rgba(192, 132, 252, 0.16) 90deg 120deg,
            rgba(74, 222, 128, 0.14) 120deg 150deg,
            rgba(56, 189, 248, 0.14) 150deg 180deg,
            rgba(248, 113, 113, 0.13) 180deg 210deg,
            rgba(129, 140, 248, 0.16) 210deg 240deg,
            rgba(251, 146, 60, 0.13) 240deg 270deg,
            rgba(52, 211, 153, 0.14) 270deg 300deg,
            rgba(244, 114, 182, 0.13) 300deg 330deg,
            rgba(96, 165, 250, 0.16) 330deg 360deg
        ),
        var(--surface-muted);
}

.rich-copy p {
    margin: 0;
    line-height: 1.7;
}

.rich-copy ul,
.rich-copy ol,
.rich-copy blockquote {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.7;
}

.rich-copy blockquote {
    padding-left: 18px;
    border-left: 3px solid var(--accent-soft);
}

.button-cluster {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.timeline-card {
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface-muted);
}

.timeline-note {
    margin: 10px 0 0;
    color: var(--text);
    line-height: 1.6;
}

/* Kompakt desktop-layout til bærbare, hvor vi stadig vil bevare fuld sidemenu. */
@media (min-width: 1181px) and (max-width: 1480px) {
    html {
        font-size: 12.5px;
    }

    body {
        font-size: 1rem;
    }

    .auth-body {
        padding: 18px;
    }

    .auth-shell {
        width: min(1480px, 100%);
        min-height: calc(100vh - 36px);
        min-height: calc(100dvh - 36px);
        grid-template-columns: minmax(0, 1.02fr) clamp(360px, 31vw, 460px);
        gap: 16px;
    }

    .auth-panel--brand {
        padding: 26px;
        gap: 18px;
    }

    .auth-panel h1 {
        font-size: clamp(1.65rem, 1.9vw, 2.15rem);
        margin: 6px 0 8px;
    }

    .auth-panel .lead,
    .feature-card--auth p,
    .muted {
        font-size: 0.82rem;
        line-height: 1.4;
    }

    .auth-highlights {
        gap: 8px;
    }

    .feature-card--auth {
        padding: 12px;
        border-radius: 14px;
    }

    .feature-card--auth h2 {
        font-size: 0.86rem;
    }

    .feature-card__label,
    .eyebrow {
        font-size: 0.58rem;
    }

    .form-stack {
        gap: 12px;
    }

    .field {
        gap: 5px;
    }

    .field span {
        font-size: 0.8rem;
    }

    input {
        min-height: 40px;
        padding: 9px 12px;
    }

    .password-field {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px;
    }

    .card-header {
        margin-bottom: 6px;
        font-size: 0.76rem;
    }

    .status-dot {
        width: 9px;
        height: 9px;
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
    }

    .alert {
        margin-bottom: 12px;
        padding: 10px 12px;
    }

    .app-brand__logo-frame {
        width: min(148px, 100%);
        height: 58px;
    }

    .app-brand__logo {
        max-width: 148px;
        max-height: 58px;
    }

    .app-brand__text small {
        font-size: 11px;
        line-height: 1.35;
    }

    .app-nav__link {
        grid-template-columns: 18px minmax(0, 1fr);
        gap: 10px;
        padding: 9px 10px;
        border-radius: 12px;
    }

    .app-nav__icon {
        font-size: 14px;
    }

    .app-sidebar__label {
        font-size: 11px;
    }

    .sidebar-meta-card strong {
        font-size: 18px;
    }

    .sidebar-meta-card p {
        font-size: 11px;
    }

    .app-nav__title {
        font-size: 14px;
    }

    .app-nav__link small {
        font-size: 11px;
    }

    .sidebar-meta-card {
        padding: 8px 8px;
    }

    .app-shell {
        gap: 10px;
        padding-bottom: 12px;
    }

    .page-hero {
        grid-template-columns: minmax(0, 1.7fr) auto;
        gap: 10px;
        padding: 0;
    }

    .page-hero h1 {
        margin: 4px 0 6px;
        font-size: clamp(1.2rem, 1.45vw, 1.55rem);
    }

    .page-hero .lead {
        max-width: 60ch;
        font-size: 0.82rem;
        line-height: 1.3;
    }

    .page-actions {
        gap: 6px;
    }

    .primary-button,
    .secondary-button,
    .ghost-button {
        min-height: 32px;
        padding: 0 11px;
        font-size: 0.82rem;
    }

    .page-actions .primary-button,
    .page-actions .secondary-button,
    .page-actions .ghost-button {
        min-height: 31px;
        padding: 0 12px;
        font-size: 0.8rem;
    }

    .card-header {
        margin-bottom: 8px;
        font-size: 0.8rem;
    }

    .stat-card strong {
        font-size: clamp(0.92rem, 0.9vw, 0.94rem);
    }

    .dashboard-focus-card,
    .dashboard-action-card {
        gap: 6px;
        padding: 10px;
    }

    .dashboard-focus-card__value {
        font-size: 1.8rem;
    }

    .dashboard-focus-card h2,
    .dashboard-action-card strong {
        font-size: 0.82rem;
    }

    .dashboard-focus-card p,
    .dashboard-action-card p,
    .dashboard-note {
        font-size: 0.76rem;
        line-height: 1.3;
    }

    .muted,
    .data-table td,
    .data-table td small,
    .text-link {
        font-size: 0.76rem;
    }

    .data-table th,
    .stat-label {
        font-size: 0.90rem;
    }

    .badge {
        min-height: 24px;
        padding: 0 8px;
        font-size: 0.66rem;
    }

    .task-project-indicator {
        width: 18px;
        height: 18px;
        font-size: 0.78rem;
    }

    .summary-item strong,
    .task-fact strong,
    .assignment-card strong,
    .timeline-card strong {
        font-size: 0.88rem;
    }

    .task-overview-banner__title {
        font-size: clamp(1.04rem, 1.2vw, 1.24rem);
    }

    .task-overview-banner__summary,
    .task-fact span,
    .task-detail-section__header strong {
        font-size: 0.72rem;
    }

    .task-overview-banner__deadline {
        gap: 12px;
        padding: 12px 14px;
    }

    .task-overview-banner__deadline-label {
        font-size: 0.62rem;
    }

    .task-overview-banner__deadline-date {
        font-size: clamp(1.1rem, 1.35vw, 1.4rem);
    }

    .task-overview-banner__deadline-note {
        font-size: 0.74rem;
    }

    .task-overview-banner__deadline-note--meta,
    .task-overview-banner__deadline-metric {
        font-size: 0.7rem;
    }
}

@media (min-width: 1181px) and (max-width: 1680px) {
    body.page-dashboard .app-shell {
        font-size: 12.5px;
    }

    body.page-dashboard .page-hero,
    body.page-dashboard .stat-grid--operations,
    body.page-dashboard .dashboard-focus-grid,
    body.page-dashboard .dashboard-card-stack {
        gap: 8px;
    }

    body.page-dashboard .page-actions {
        gap: 6px;
    }

    body.page-dashboard .card,
    body.page-dashboard .card--wide,
    body.page-dashboard .stat-card {
        padding: 10px;
        border-radius: 14px;
    }

    body.page-dashboard .dashboard-focus-card,
    body.page-dashboard .dashboard-action-card {
        gap: 6px;
        padding: 10px;
    }

    body.page-dashboard .page-hero h1 {
        font-size: clamp(1.16rem, 1.25vw, 1.45rem);
    }

    body.page-dashboard .page-hero .lead,
    body.page-dashboard .muted,
    body.page-dashboard .dashboard-focus-card p,
    body.page-dashboard .dashboard-action-card p,
    body.page-dashboard .dashboard-note,
    body.page-dashboard .data-table td,
    body.page-dashboard .data-table td small,
    body.page-dashboard .text-link {
        font-size: 0.98rem;
    }

    body.page-dashboard .card-header,
    body.page-dashboard .data-table th,
    body.page-dashboard .dashboard-focus-card h2,
    body.page-dashboard .dashboard-action-card strong,
    body.page-dashboard .stat-label {
        font-size: 0.9rem;
    }

    body.page-dashboard .data-table td strong {
        font-size: 0.92rem;
    }

    body.page-dashboard .badge {
        min-height: 24px;
        padding: 0 8px;
        font-size: 0.66rem;
    }

    body.page-dashboard .task-project-indicator {
        width: 17px;
        height: 17px;
        font-size: 0.72rem;
    }
}

@media (min-width: 1440px) {
    .stat-grid--operations {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .content-grid,
    .content-grid--wide {
        gap: 20px;
    }

    .dashboard-card-stack {
        gap: 20px;
    }

    .task-detail-layout,
    .task-detail-grid {
        gap: 20px;
    }

    .quick-action-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .app-frame {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: fixed;
        inset: 18px auto 18px 18px;
        width: min(340px, calc(100vw - 36px));
        z-index: 30;
        transform: translateX(calc(-100% - 24px));
        transition: transform 220ms ease;
    }

    .app-body[data-nav-open="true"] .app-sidebar {
        transform: translateX(0);
    }

    .app-sidebar__panel {
        min-height: calc(100vh - 36px);
        min-height: calc(100dvh - 36px);
        height: calc(100vh - 36px);
        height: calc(100dvh - 36px);
    }

    .app-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .content-grid,
    .content-grid--wide,
    .task-detail-layout,
    .task-detail-grid,
    .assignment-repair-card,
    .task-cluster,
    .project-workspace,
    .admin-card-grid,
    .admin-console-nav,
    .admin-module-list,
    .admin-interval-overview__body,
    .admin-interval-metrics {
        grid-template-columns: 1fr;
    }

    .project-workspace__side {
        position: static;
    }

    body.page-equipment .equipment-detail-layout > .equipment-detail-card:first-child,
    body.page-equipment .equipment-detail-layout > aside.equipment-detail-card,
    body.page-equipment .equipment-detail-layout > .equipment-detail-secondary,
    body.page-equipment .equipment-detail-layout > .equipment-photo-section {
        grid-column: 1;
        grid-row: auto;
    }

    .task-detail-layout__side {
        position: static;
    }

    .page-hero {
        grid-template-columns: 1fr;
    }

    .page-actions {
        justify-content: flex-start;
    }

    .quick-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .equipment-list-row__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-focus-grid {
        grid-template-columns: 1fr;
    }

    .task-fact-grid,
    .task-relationship-grid,
    .task-parameter-row__grid,
    .task-parameter-value-grid,
    .task-parameter-trend-card__footer,
    .assignment-repair-card__facts,
    .task-recurrence-history-summary {
        grid-template-columns: 1fr;
    }

    .assignment-choice-list {
        max-height: none;
    }

    .assignment-repair-card__actions .primary-button,
    .assignment-repair-card__actions .secondary-button {
        width: 100%;
        justify-content: center;
    }

    .task-overview-banner__deadline {
        grid-template-columns: 1fr;
    }

    .task-overview-banner__d4 {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .task-overview-banner__deadline-status {
        justify-items: start;
    }

    .task-parameter-builder__header {
        align-items: stretch;
        flex-direction: column;
    }

    .task-parameter-builder__actions {
        width: 100%;
        flex-direction: column;
    }

    .task-parameter-builder__header .secondary-button,
    .task-parameter-row__remove {
        width: 100%;
        justify-content: center;
    }

    .task-parameter-row__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .task-parameter-row__feedback {
        width: 100%;
    }

    .task-next-deadline-panel__header,
    .task-next-deadline-panel__summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .task-next-deadline-panel__controls {
        grid-template-columns: minmax(0, 1fr);
    }

    .task-parameter-trend-card__header {
        display: grid;
        grid-template-columns: 1fr;
    }

    .task-parameter-trend-card__header .badge {
        justify-self: start;
    }

    .task-parameter-trend-card__actions,
    .task-detail-section__header-actions {
        justify-content: flex-start;
    }

    .task-parameter-trend-chart-shell {
        max-width: none;
        margin-right: -2px;
        margin-left: -2px;
    }

    .task-parameter-trend-chart {
        width: max(560px, 100%);
        max-width: none;
    }

    .task-parameter-history-dialog {
        width: calc(100vw - 20px);
        max-height: calc(100dvh - 20px);
        border-radius: var(--radius-lg);
    }

    .task-parameter-history-dialog__panel {
        grid-template-rows: auto auto auto minmax(280px, auto) minmax(0, 1fr);
        max-height: calc(100dvh - 20px);
        padding: 12px;
    }

    .task-parameter-history-dialog__header,
    .task-parameter-history-dialog__actions {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .task-parameter-history-dialog__actions .secondary-button,
    .task-parameter-history-dialog__actions .ghost-button {
        width: 100%;
        justify-content: center;
    }

    .task-parameter-history-toolbar {
        width: 100%;
        overflow-x: auto;
    }

    .task-parameter-history-period {
        flex: 1 0 auto;
    }

    .task-parameter-history-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .task-parameter-history-chart {
        width: max(720px, 100%);
        max-width: none;
        height: 300px;
        min-height: 300px;
    }
}

/* Login-siden må gerne være kompakt på bærbare, men skal ikke arve appens meget tætte arbejdsvisning. */
@media (min-width: 1181px) and (max-width: 1480px) {
    .auth-shell.auth-shell--login {
        width: min(1180px, 100%);
        grid-template-columns: minmax(0, 1fr) minmax(380px, 470px);
        gap: 24px;
    }

    .card.card--login {
        padding: 34px;
    }

    .card-header.card-header--login {
        margin-bottom: 26px;
        font-size: 0.96rem;
    }

    .card--login .auth-card-intro h1 {
        margin: 0;
        font-size: 2.8rem;
    }

    .card--login .auth-card-intro p {
        font-size: 0.96rem;
        line-height: 1.45;
    }

    .card--login .form-stack.auth-form {
        gap: 16px;
    }

    .card--login .field span {
        font-size: 0.86rem;
    }

    .card--login input {
        min-height: 52px;
        padding: 12px 15px;
    }

    .card--login .primary-button--login,
    .card--login .ghost-button {
        min-height: 52px;
        font-size: 0.9rem;
    }
}

@media (max-width: 1180px) {
    .profile-overview,
    .profile-workspace {
        grid-template-columns: 1fr;
    }

    .year-wheel-layout {
        grid-template-columns: 1fr;
    }

    .year-wheel__dial {
        position: relative;
        top: auto;
        max-width: 620px;
    }
}

@media (max-width: 920px) {
    .app-topbar,
    .app-header__actions,
    .app-topbar__left {
        flex-direction: column;
        align-items: stretch;
    }

    .app-topbar__summary {
        align-items: flex-start;
    }

    .app-topbar__title,
    .app-topbar__context {
        white-space: normal;
    }

    .app-user {
        justify-content: flex-start;
    }

    .app-header__actions {
        justify-content: flex-start;
    }

    .app-header__context-actions,
    .app-header__quick-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        padding: 4px 4px 10px;
        margin-right: 0;
        border-right: 0;
        border-bottom: 1px solid rgba(184, 194, 208, 0.58);
    }

    .app-header__context-actions .primary-button,
    .app-header__context-actions .secondary-button,
    .app-header__context-actions .ghost-button,
    .app-header__quick-actions .primary-button,
    .app-header__quick-actions .secondary-button,
    .app-header__quick-actions .ghost-button {
        flex: 1 1 auto;
    }

    .app-header__cluster {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .app-help-button {
        width: 100%;
        justify-content: flex-start;
        padding: 0 10px;
    }

    .app-presence {
        min-width: 0;
        padding: 8px 10px 4px;
    }

    .app-user {
        border-left: 0;
        border-right: 0;
        border-top: 1px solid rgba(184, 194, 208, 0.58);
        border-bottom: 1px solid rgba(184, 194, 208, 0.58);
        border-radius: 0;
        padding: 10px;
    }

    .app-logout-form .secondary-button {
        width: 100%;
        justify-content: flex-start;
        padding: 0 10px;
    }

    .page-hero,
    .calendar-toolbar {
        grid-template-columns: 1fr;
        display: grid;
    }

    .quick-action-grid,
    .insight-grid,
    .stat-grid--operations,
    .stat-grid--profile,
    .dashboard-order-list,
    .dashboard-department-card__stats,
    .project-fact-grid,
    .meta-grid,
    .profile-fact-grid,
    .profile-stat-grid,
    .profile-shortcut-grid,
    .profile-stat-grid--wide,
    .calendar-weekdays,
    .calendar-grid,
    .equipment-list-row__grid {
        grid-template-columns: 1fr;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .audit-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.page-admin .audit-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .audit-filter__search,
    .audit-filter__actions {
        grid-column: 1 / -1;
    }

    .audit-integrity-card__facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-card__header,
    .project-progress__row,
    .project-section__header,
    .project-results-bar,
    .project-inline-actions {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .project-card__context,
    .project-section__title {
        grid-template-columns: 1fr;
    }

    .calendar-filter {
        grid-template-columns: 1fr;
        width: 100%;
    }

    body.page-calendar .calendar-filter {
        grid-template-columns: 1fr;
        width: 100%;
    }

    body.page-calendar .calendar-toolbar {
        align-items: stretch;
    }

    .calendar-filter .secondary-button {
        width: 100%;
    }

    body.page-calendar .calendar-filter .secondary-button {
        width: 100%;
    }

    .calendar-view-switch {
        width: 100%;
    }

    .calendar-view-switch__button {
        flex: 1 1 0;
    }

    .year-wheel__dial {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        max-width: none;
        aspect-ratio: auto;
        padding: 12px;
        border-radius: 8px;
        background: var(--surface-muted);
    }

    body[data-theme="dark"] .year-wheel__dial {
        background: var(--surface-muted);
    }

    .year-wheel__dial::before,
    .year-wheel__dial::after {
        display: none;
    }

    .year-wheel__center,
    .year-wheel__month {
        position: relative;
        inset: auto;
        left: auto;
        top: auto;
        transform: none;
    }

    .year-wheel__center {
        grid-column: 1 / -1;
        border-radius: 8px;
    }

    .year-wheel__month {
        width: auto;
        min-height: 66px;
    }

    .year-wheel__month:hover {
        transform: translateY(-1px);
    }

    .year-wheel-agenda {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .app-body {
        padding: 12px;
    }

    .app-frame {
        min-height: calc(100vh - 24px);
        min-height: calc(100dvh - 24px);
        gap: 14px;
    }

    .app-sidebar {
        inset: 12px auto 12px 12px;
        width: min(320px, calc(100vw - 24px));
    }

    .app-topbar {
        padding: 14px;
        border-radius: 20px;
    }

    .app-shell {
        padding-bottom: 20px;
    }

    .session-timeout__panel,
    .task-draft-notice {
        grid-template-columns: 1fr;
    }

    .session-timeout__actions,
    .task-draft-notice {
        align-items: stretch;
    }

    .session-timeout__actions,
    .task-draft-notice__actions,
    .task-draft-notice__actions .ghost-button {
        width: 100%;
    }

    .compact-filter {
        grid-template-columns: 1fr;
    }

    .audit-filter,
    .audit-detail-grid,
    .audit-integrity-card__facts {
        grid-template-columns: 1fr;
    }

    body.page-admin .audit-filter {
        grid-template-columns: 1fr;
    }

    .audit-filter__search,
    .audit-filter__actions {
        grid-column: auto;
    }

    .audit-filter__actions .primary-button,
    .audit-filter__actions .secondary-button {
        width: 100%;
    }

    .profile-hero-card__top,
    .profile-task-item__row,
    .profile-side-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-work-actions {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .year-wheel__dial {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .year-wheel-agenda {
        grid-template-columns: 1fr;
    }

    .kpi-filter-row,
    .kpi-hero-panel,
    .kpi-performance-panel,
    .kpi-layout {
        grid-template-columns: 1fr;
    }

    .kpi-scope-tabs {
        grid-template-columns: 1fr;
    }

    .kpi-parameter-summary,
    .kpi-parameter-filter {
        grid-template-columns: 1fr;
    }

    .kpi-context-strip {
        align-items: flex-start;
        flex-direction: column;
    }

    .kpi-gauge {
        justify-self: start;
    }

    .kpi-trend-chart__row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .kpi-trend-chart__row > strong {
        text-align: left;
    }

    .kpi-risk-item {
        align-items: stretch;
        flex-direction: column;
    }

}

/* Samlet dark-mode-lag: holder alle gennemgående flader, kontroller og statusfarver i samme visuelle system. */
body[data-theme="dark"] {
    --bg: #0b1120;
    --bg-soft: #111827;
    --surface: rgba(17, 24, 39, 0.94);
    --surface-strong: #151f33;
    --surface-muted: rgba(24, 34, 53, 0.92);
    --text: #f5f7fb;
    --text-soft: #c4cede;
    --line: rgba(148, 163, 184, 0.24);
    --line-strong: rgba(203, 213, 225, 0.34);
    --accent: #78a7ff;
    --accent-dark: #a9c8ff;
    --accent-soft: rgba(96, 165, 250, 0.18);
    --success: #74d99f;
    --error: #fca5a5;
    --shadow: 0 22px 58px rgba(0, 0, 0, 0.38);
    background:
        linear-gradient(180deg, rgba(7, 12, 22, 0.9), rgba(7, 12, 22, 0.9)),
        linear-gradient(180deg, #0f172a 0%, #070b14 100%);
}

body[data-theme="dark"]::before {
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.055) 1px, transparent 1px);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.24), transparent 70%);
}

body[data-theme="dark"] .auth-panel,
body[data-theme="dark"] .card,
body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .card--wide,
body[data-theme="dark"] .app-sidebar__panel,
body[data-theme="dark"] .app-topbar,
body[data-theme="dark"] .timeline-card,
body[data-theme="dark"] .assignment-card,
body[data-theme="dark"] .profile-task-item,
body[data-theme="dark"] .profile-shortcut-card,
body[data-theme="dark"] .profile-fact-card,
body[data-theme="dark"] .help-shortcut,
body[data-theme="dark"] .help-callout,
body[data-theme="dark"] .help-mini-panel,
body[data-theme="dark"] .help-module-list div,
body[data-theme="dark"] .help-role-card,
body[data-theme="dark"] .help-error-grid article {
    background: var(--surface);
    border-color: var(--line);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        var(--shadow);
}

body[data-theme="dark"] .app-sidebar__panel,
body[data-theme="dark"] .app-topbar {
    background: rgba(15, 23, 42, 0.94);
    border-color: rgba(148, 163, 184, 0.34);
}

body[data-theme="dark"] .task-recurrence-tree__item--has-d4:not(.task-recurrence-tree__item--has-oos) .task-recurrence-tree__marker,
body[data-theme="dark"] .task-recurrence-tree__signal--d4 {
    border-color: rgba(167, 139, 250, 0.38);
    background: rgba(124, 58, 237, 0.18);
    color: #ddd6fe;
}

body[data-theme="dark"] .task-recurrence-tree__item--has-oos .task-recurrence-tree__marker,
body[data-theme="dark"] .task-recurrence-tree__signal--oos {
    border-color: rgba(251, 191, 36, 0.42);
    background: rgba(245, 158, 11, 0.18);
    color: #fde68a;
}

body[data-theme="dark"] .sidebar-meta-card,
body[data-theme="dark"] .dashboard-order-row,
body[data-theme="dark"] .profile-hero-card,
body[data-theme="dark"] .profile-signal-card,
body[data-theme="dark"] .task-recurrence-notice,
body[data-theme="dark"] .equipment-hero,
body[data-theme="dark"] .equipment-qr-box,
body[data-theme="dark"] .equipment-overview-shortcut,
body[data-theme="dark"] .equipment-list-row,
body[data-theme="dark"] .equipment-list-summary,
body[data-theme="dark"] .equipment-disclosure,
body[data-theme="dark"] .equipment-editor-section,
body[data-theme="dark"] .equipment-stock-card,
body[data-theme="dark"] .equipment-stock-current,
body[data-theme="dark"] .equipment-production-curve,
body[data-theme="dark"] .admin-statistics-chart,
body[data-theme="dark"] .admin-statistics-kpis article,
body[data-theme="dark"] .kpi-system-link,
body[data-theme="dark"] .dashboard-alert,
body[data-theme="dark"] .year-wheel__dial {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
        var(--surface-muted);
    border-color: var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

body[data-theme="dark"] .profile-signal-card--warning,
body[data-theme="dark"] .stat-card--danger,
body[data-theme="dark"] .dashboard-alert--danger {
    background:
        linear-gradient(180deg, rgba(248, 113, 113, 0.18), rgba(127, 29, 29, 0.09)),
        var(--surface-muted);
    border-color: rgba(248, 113, 113, 0.34);
}

body[data-theme="dark"] .app-header__cluster {
    background:
        linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border-color: rgba(148, 163, 184, 0.34);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 12px 28px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .app-header__context-actions,
body[data-theme="dark"] .app-header__quick-actions,
body[data-theme="dark"] .app-user {
    border-color: rgba(148, 163, 184, 0.24);
}

body[data-theme="dark"] .app-nav__link {
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.72));
    border-color: rgba(148, 163, 184, 0.2);
}

body[data-theme="dark"] .app-nav__link.is-active,
body[data-theme="dark"] .app-nav__link:hover {
    color: #f8fbff;
    background:
        linear-gradient(180deg, rgba(59, 130, 246, 0.28), rgba(37, 99, 235, 0.18)),
        var(--surface-strong);
    border-color: rgba(125, 166, 255, 0.42);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 12px 24px rgba(37, 99, 235, 0.16);
}

body[data-theme="dark"] .app-nav__icon,
body[data-theme="dark"] .app-nav__link small,
body[data-theme="dark"] .app-nav__sublink,
body[data-theme="dark"] .app-topbar__context,
body[data-theme="dark"] .app-brand__text small,
body[data-theme="dark"] .app-user__meta small,
body[data-theme="dark"] .app-presence__label,
body[data-theme="dark"] .app-presence__value small,
body[data-theme="dark"] .muted,
body[data-theme="dark"] .lead,
body[data-theme="dark"] .stat-label,
body[data-theme="dark"] .form-section-title {
    color: var(--text-soft);
}

body[data-theme="dark"] .app-nav__link.is-active .app-nav__icon,
body[data-theme="dark"] .app-nav__link:hover .app-nav__icon,
body[data-theme="dark"] .app-nav__sublink.is-active,
body[data-theme="dark"] .app-nav__sublink:hover,
body[data-theme="dark"] .text-link,
body[data-theme="dark"] .help-index a:hover,
body[data-theme="dark"] .help-topic summary i:first-child,
body[data-theme="dark"] .help-empty-state .card-header i {
    color: var(--accent-dark);
}

body[data-theme="dark"] .help-topic [data-help-search-focus="true"] {
    background: rgba(251, 191, 36, 0.14);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.14);
}

body[data-theme="dark"] .help-search-hit {
    color: #111827;
    background: linear-gradient(180deg, #fde68a, #facc15);
}

body[data-theme="dark"] .app-nav__submenu {
    border-left-color: rgba(148, 163, 184, 0.24);
}

body[data-theme="dark"] .app-nav__sublink.is-active,
body[data-theme="dark"] .app-nav__sublink:hover {
    background: rgba(96, 165, 250, 0.14);
    border-color: rgba(125, 166, 255, 0.22);
}

body[data-theme="dark"] input,
body[data-theme="dark"] input[type="text"],
body[data-theme="dark"] input[type="search"],
body[data-theme="dark"] input[type="email"],
body[data-theme="dark"] input[type="password"],
body[data-theme="dark"] input[type="date"],
body[data-theme="dark"] input[type="number"],
body[data-theme="dark"] input[type="tel"],
body[data-theme="dark"] input[type="url"],
body[data-theme="dark"] select,
body[data-theme="dark"] textarea,
body[data-theme="dark"] .rich-editor-surface,
body[data-theme="dark"] .input-with-suffix,
body[data-theme="dark"] .equipment-qr-box__canvas,
body[data-theme="dark"] .selector-empty-state {
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.98));
    border-color: var(--line-strong);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        inset 0 0 0 1px rgba(15, 23, 42, 0.35);
}

body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
    color: rgba(196, 206, 222, 0.68);
}

body[data-theme="dark"] option {
    color: var(--text);
    background: #111827;
}

body[data-theme="dark"] input:focus,
body[data-theme="dark"] input[type="text"]:focus,
body[data-theme="dark"] input[type="search"]:focus,
body[data-theme="dark"] input[type="email"]:focus,
body[data-theme="dark"] input[type="password"]:focus,
body[data-theme="dark"] input[type="date"]:focus,
body[data-theme="dark"] input[type="number"]:focus,
body[data-theme="dark"] input[type="tel"]:focus,
body[data-theme="dark"] input[type="url"]:focus,
body[data-theme="dark"] select:focus,
body[data-theme="dark"] textarea:focus,
body[data-theme="dark"] .rich-editor-surface:focus {
    border-color: rgba(125, 166, 255, 0.8);
    box-shadow:
        0 0 0 1px rgba(125, 166, 255, 0.72),
        0 0 0 4px rgba(96, 165, 250, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .field.is-invalid input,
body[data-theme="dark"] .field.is-invalid select,
body[data-theme="dark"] .field.is-invalid textarea,
body[data-theme="dark"] input[aria-invalid="true"],
body[data-theme="dark"] select[aria-invalid="true"],
body[data-theme="dark"] textarea[aria-invalid="true"] {
    background:
        linear-gradient(180deg, rgba(127, 29, 29, 0.42), rgba(69, 10, 10, 0.3)),
        #111827;
    border-color: rgba(248, 113, 113, 0.72);
}

body[data-theme="dark"] .secondary-button,
body[data-theme="dark"] .ghost-button,
body[data-theme="dark"] .app-nav-toggle {
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    border-color: var(--line-strong);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .primary-button,
body[data-theme="dark"] .app-user__avatar {
    color: #ffffff;
    background: linear-gradient(180deg, #5b8cff 0%, #3b5bdb 100%);
    border-color: rgba(148, 191, 255, 0.32);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 10px 22px rgba(59, 130, 246, 0.2);
}

body[data-theme="dark"] .primary-button:hover,
body[data-theme="dark"] .secondary-button:hover,
body[data-theme="dark"] .ghost-button:hover {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 12px 24px rgba(0, 0, 0, 0.24);
}

body[data-theme="dark"] .secondary-button:disabled,
body[data-theme="dark"] .ghost-button:disabled,
body[data-theme="dark"] .secondary-button.is-disabled,
body[data-theme="dark"] .text-link.is-disabled {
    opacity: 0.5;
    box-shadow: none;
}

body[data-theme="dark"] .app-help-button {
    color: var(--accent-dark);
    background: rgba(96, 165, 250, 0.16);
    border-color: rgba(125, 166, 255, 0.26);
}

body[data-theme="dark"] .app-help-button:hover,
body[data-theme="dark"] .app-help-button.is-active {
    color: #ffffff;
    background: linear-gradient(180deg, #5b8cff 0%, #3b5bdb 100%);
}

body[data-theme="dark"] .app-logout-form .secondary-button {
    color: var(--text-soft);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

body[data-theme="dark"] .alert {
    border-color: var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .alert--success {
    color: #b8f6d0;
    background:
        linear-gradient(180deg, rgba(22, 101, 52, 0.34), rgba(20, 83, 45, 0.22)),
        var(--surface-muted);
    border-color: rgba(116, 217, 159, 0.32);
}

body[data-theme="dark"] .alert--warning,
body[data-theme="dark"] .suggested-date-item.is-warning {
    color: #fde68a;
    background:
        linear-gradient(180deg, rgba(146, 64, 14, 0.34), rgba(120, 53, 15, 0.22)),
        var(--surface-muted);
    border-color: rgba(245, 158, 11, 0.38);
}

body[data-theme="dark"] .alert--info {
    color: #cfe0ff;
    background:
        linear-gradient(180deg, rgba(30, 64, 175, 0.34), rgba(30, 58, 138, 0.2)),
        var(--surface-muted);
    border-color: rgba(125, 166, 255, 0.32);
}

body[data-theme="dark"] .alert--error {
    color: #fecaca;
    background:
        linear-gradient(180deg, rgba(127, 29, 29, 0.38), rgba(69, 10, 10, 0.22)),
        var(--surface-muted);
    border-color: rgba(248, 113, 113, 0.36);
}

body[data-theme="dark"] .data-table thead {
    background: rgba(96, 165, 250, 0.1);
}

body[data-theme="dark"] .data-table th,
body[data-theme="dark"] .data-table td {
    border-bottom-color: var(--line);
}

body[data-theme="dark"] .data-table th,
body[data-theme="dark"] .data-table td small,
body[data-theme="dark"] .task-row-meta__item + .task-row-meta__item::before {
    color: var(--text-soft);
}

body[data-theme="dark"] .badge--neutral {
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.18);
}

body[data-theme="dark"] .badge--info {
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.22);
}

body[data-theme="dark"] .badge--success {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.18);
}

body[data-theme="dark"] .badge--warning {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.2);
}

body[data-theme="dark"] .badge--danger {
    color: #fecaca;
    background: rgba(248, 113, 113, 0.18);
}

body[data-theme="dark"] .project-gantt__legend {
    color: var(--text-soft);
}

body[data-theme="dark"] .project-gantt__axis-track {
    border-bottom-color: rgba(148, 163, 184, 0.32);
}

body[data-theme="dark"] .project-gantt__tick {
    background: rgba(148, 163, 184, 0.2);
}

body[data-theme="dark"] .project-gantt__task {
    background: rgba(30, 41, 59, 0.76);
    border-color: rgba(148, 163, 184, 0.24);
}

body[data-theme="dark"] .project-gantt__task:hover {
    border-color: rgba(125, 166, 255, 0.34);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

body[data-theme="dark"] .project-gantt__track {
    border-color: rgba(148, 163, 184, 0.22);
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent calc(12.5% - 1px),
            rgba(148, 163, 184, 0.14) calc(12.5% - 1px),
            rgba(148, 163, 184, 0.14) 12.5%
        ),
        linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(17, 24, 39, 0.74));
}

body[data-theme="dark"] .project-gantt__row--child .project-gantt__task::before {
    background: rgba(148, 163, 184, 0.34);
}

body[data-theme="dark"] .eyebrow,
body[data-theme="dark"] .page-kicker,
body[data-theme="dark"] .calendar-view-switch,
body[data-theme="dark"] .year-wheel__month,
body[data-theme="dark"] .year-wheel-agenda__month,
body[data-theme="dark"] .year-wheel-agenda__more summary,
body[data-theme="dark"] .theme-option-card,
body[data-theme="dark"] .department-choice,
body[data-theme="dark"] .primary-choice,
body[data-theme="dark"] .checkbox-card,
body[data-theme="dark"] .checkbox-line,
body[data-theme="dark"] .task-parameter-trend-card,
body[data-theme="dark"] .task-parameter-history-toolbar,
body[data-theme="dark"] .task-parameter-history-table thead th {
    color: var(--text);
    background: var(--surface-muted);
    border-color: var(--line);
}

body[data-theme="dark"] .theme-option input:checked + .theme-option-card,
body[data-theme="dark"] .department-choice:has(input:checked),
body[data-theme="dark"] .primary-choice:has(input:checked),
body[data-theme="dark"] .checkbox-card:has(input:checked),
body[data-theme="dark"] .calendar-view-switch__button.is-active,
body[data-theme="dark"] .year-wheel__month.is-selected,
body[data-theme="dark"] .year-wheel-agenda__month.is-selected {
    background:
        linear-gradient(180deg, rgba(59, 130, 246, 0.24), rgba(37, 99, 235, 0.16)),
        var(--surface-strong);
    border-color: rgba(125, 166, 255, 0.42);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.14);
}

body[data-theme="dark"] .profile-shortcut-card:hover,
body[data-theme="dark"] .help-shortcut:hover,
body[data-theme="dark"] .profile-task-item:hover {
    background:
        linear-gradient(180deg, rgba(59, 130, 246, 0.16), rgba(15, 23, 42, 0.92));
    border-color: rgba(125, 166, 255, 0.32);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.14);
}

body[data-theme="dark"] .task-project-indicator {
    color: var(--accent-dark);
}

body[data-theme="dark"] .task-d4-indicator {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.18);
}

body[data-theme="dark"] .task-overview-banner__d4 {
    border-color: rgba(245, 158, 11, 0.34);
    border-left-color: #f59e0b;
    background:
        linear-gradient(180deg, rgba(245, 158, 11, 0.16), rgba(15, 23, 42, 0.68)),
        rgba(15, 23, 42, 0.84);
}

body[data-theme="dark"] .task-overview-banner__d4-icon {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.2);
}

body[data-theme="dark"] .task-priority-indicator--low {
    color: #86efac;
    background: rgba(34, 197, 94, 0.16);
}

body[data-theme="dark"] .task-priority-indicator--medium {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.16);
}

body[data-theme="dark"] .task-priority-indicator--high {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.18);
}

body[data-theme="dark"] .task-transition__backdrop,
body[data-theme="dark"] .session-timeout__backdrop {
    background: rgba(2, 6, 23, 0.68);
}

body[data-theme="dark"] .task-transition__panel,
body[data-theme="dark"] .session-timeout__panel,
body[data-theme="dark"] .auth-transition__panel,
body[data-theme="dark"] .card--login {
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(15, 23, 42, 0.98)),
        radial-gradient(circle at top, rgba(96, 165, 250, 0.12), transparent 48%);
    border-color: var(--line);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

body[data-theme="dark"] .task-transition__progress {
    background: rgba(30, 41, 59, 0.72);
    border-color: rgba(125, 166, 255, 0.22);
}

body[data-theme="dark"] .task-transition__label,
body[data-theme="dark"] .task-transition__meta,
body[data-theme="dark"] .session-timeout__copy p,
body[data-theme="dark"] .help-search-field span,
body[data-theme="dark"] .help-topic p,
body[data-theme="dark"] .help-module-list span,
body[data-theme="dark"] .help-role-card span,
body[data-theme="dark"] .help-error-grid span,
body[data-theme="dark"] .help-error-grid small,
body[data-theme="dark"] .help-mini-panel p {
    color: var(--text-soft);
}

body[data-theme="dark"].page-admin .admin-console-nav__link {
    background: var(--surface-muted);
    border-color: var(--line);
}

/* Finpolering af dark mode for tætte lister, kalenderbokse og dashboardkort. */
body[data-theme="dark"] .dashboard-focus-panel,
body[data-theme="dark"] .dashboard-card-stack > .card,
body[data-theme="dark"] .calendar-card {
    background:
        linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(11, 18, 32, 0.96)),
        var(--surface);
    border-color: rgba(148, 163, 184, 0.28);
}

body[data-theme="dark"].page-dashboard .dashboard-card-stack > .card > .card-header {
    border-color: rgba(45, 212, 191, 0.22);
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.14), rgba(30, 41, 59, 0.58) 58%, rgba(15, 23, 42, 0));
}

body[data-theme="dark"].page-dashboard .dashboard-card-stack > .card > .card-header::after {
    background: linear-gradient(90deg, rgba(94, 234, 212, 0.8), rgba(147, 197, 253, 0.58));
}

body[data-theme="dark"] .dashboard-focus-card,
body[data-theme="dark"] .dashboard-action-card {
    background:
        linear-gradient(180deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.9)),
        var(--surface-muted);
    border-color: rgba(148, 163, 184, 0.26);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 12px 22px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .dashboard-focus-card--critical,
body[data-theme="dark"] .dashboard-focus-card--danger,
body[data-theme="dark"] .dashboard-focus-card--assignment-alert {
    background:
        linear-gradient(180deg, rgba(190, 18, 60, 0.22), rgba(15, 23, 42, 0.9)),
        var(--surface-muted);
    border-color: rgba(251, 113, 133, 0.48);
}

body[data-theme="dark"] .dashboard-focus-card--warning {
    background:
        linear-gradient(180deg, rgba(180, 83, 9, 0.2), rgba(15, 23, 42, 0.9)),
        var(--surface-muted);
    border-color: rgba(251, 191, 36, 0.48);
}

body[data-theme="dark"] .dashboard-focus-card--today {
    background:
        linear-gradient(180deg, rgba(71, 85, 105, 0.58), rgba(15, 23, 42, 0.9)),
        var(--surface-muted);
    border-color: rgba(203, 213, 225, 0.3);
}

body[data-theme="dark"] .dashboard-focus-card--project,
body[data-theme="dark"] .dashboard-focus-card--kpi {
    background:
        linear-gradient(180deg, rgba(14, 116, 144, 0.18), rgba(15, 23, 42, 0.9)),
        var(--surface-muted);
    border-color: rgba(45, 212, 191, 0.38);
}

body[data-theme="dark"] .dashboard-focus-card--certificate {
    background:
        linear-gradient(180deg, rgba(109, 40, 217, 0.22), rgba(15, 23, 42, 0.9)),
        var(--surface-muted);
    border-color: rgba(196, 181, 253, 0.42);
}

body[data-theme="dark"] .dashboard-focus-card--assignment {
    background:
        linear-gradient(180deg, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.9)),
        var(--surface-muted);
    border-color: rgba(147, 197, 253, 0.38);
}

body[data-theme="dark"] .dashboard-focus-card__icon {
    background: rgba(148, 163, 184, 0.14);
    color: var(--accent-dark);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .dashboard-focus-card--critical .dashboard-focus-card__icon,
body[data-theme="dark"] .dashboard-focus-card--danger .dashboard-focus-card__icon,
body[data-theme="dark"] .dashboard-focus-card--assignment-alert .dashboard-focus-card__icon {
    color: #fecdd3;
    background: rgba(244, 63, 94, 0.22);
}

body[data-theme="dark"] .dashboard-focus-card--warning .dashboard-focus-card__icon {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.22);
}

body[data-theme="dark"] .dashboard-focus-card--certificate .dashboard-focus-card__icon {
    color: #ddd6fe;
    background: rgba(124, 58, 237, 0.24);
}

body[data-theme="dark"] .dashboard-focus-card--assignment .dashboard-focus-card__icon {
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.22);
}

body[data-theme="dark"] .dashboard-focus-card--kpi .dashboard-focus-card__icon,
body[data-theme="dark"] .dashboard-focus-card--project .dashboard-focus-card__icon {
    color: #99f6e4;
    background: rgba(20, 184, 166, 0.2);
}

body[data-theme="dark"] .data-table {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.62);
    border-collapse: separate;
    border-spacing: 0;
}

body[data-theme="dark"] .data-table thead {
    background: rgba(51, 65, 85, 0.86);
}

body[data-theme="dark"] .data-table tbody tr {
    background: rgba(30, 41, 59, 0.72);
}

body[data-theme="dark"] .data-table tbody tr:nth-child(even) {
    background: rgba(36, 48, 68, 0.72);
}

body[data-theme="dark"] .task-row--danger {
    background:
        linear-gradient(90deg, rgba(180, 83, 9, 0.28), rgba(30, 41, 59, 0.78));
}

body[data-theme="dark"] .task-row--critical {
    background:
        linear-gradient(90deg, rgba(190, 18, 60, 0.34), rgba(30, 41, 59, 0.78));
}

body[data-theme="dark"] .task-row--today {
    background:
        linear-gradient(90deg, rgba(20, 184, 166, 0.2), rgba(30, 41, 59, 0.78));
}

body[data-theme="dark"] .task-row--certificate {
    background:
        linear-gradient(90deg, rgba(109, 40, 217, 0.24), rgba(30, 41, 59, 0.78));
}

body[data-theme="dark"] .data-table td,
body[data-theme="dark"] .data-table th {
    border-bottom-color: rgba(148, 163, 184, 0.18);
}

body[data-theme="dark"] .data-table tbody tr:last-child td {
    border-bottom: 0;
}

body[data-theme="dark"] .calendar-day {
    background:
        linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.9)),
        var(--surface-muted);
    border-color: rgba(148, 163, 184, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

body[data-theme="dark"] .calendar-day.has-events {
    background:
        linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94)),
        var(--surface-muted);
}

body[data-theme="dark"] .calendar-day.has-project-periods {
    background:
        linear-gradient(180deg, rgba(88, 28, 135, 0.26), rgba(15, 23, 42, 0.9) 58%),
        var(--surface-muted);
}

body[data-theme="dark"] .calendar-day.is-muted {
    opacity: 1;
    background:
        linear-gradient(180deg, rgba(55, 65, 81, 0.42), rgba(17, 24, 39, 0.72)),
        var(--surface-muted);
    border-color: rgba(148, 163, 184, 0.16);
}

body[data-theme="dark"] .calendar-day:not(.has-events) .calendar-day__empty {
    color: rgba(196, 206, 222, 0.6);
}

body[data-theme="dark"] .calendar-day.has-events:hover {
    border-color: rgba(125, 166, 255, 0.42);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.26);
}

body[data-theme="dark"] .calendar-event {
    color: var(--text);
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

body[data-theme="dark"] .calendar-event--not-started {
    background: rgba(71, 85, 105, 0.52);
}

body[data-theme="dark"] .calendar-event--in-progress {
    background: rgba(30, 64, 175, 0.46);
}

body[data-theme="dark"] .calendar-event--blocked {
    background: rgba(120, 53, 15, 0.5);
}

body[data-theme="dark"] .calendar-event--awaiting-certificate {
    background: rgba(88, 28, 135, 0.5);
}

body[data-theme="dark"] .calendar-event--completed {
    background: rgba(6, 95, 70, 0.48);
}

body[data-theme="dark"] .calendar-event--project {
    background: rgba(88, 28, 135, 0.46);
}

body[data-theme="dark"] .calendar-day__project-count {
    border-color: rgba(216, 180, 254, 0.34);
    background: rgba(88, 28, 135, 0.44);
    color: #f3e8ff;
}

body[data-theme="dark"] .year-wheel__center-subline,
body[data-theme="dark"] .year-wheel-project-periods__title strong {
    color: #d8b4fe;
}

body[data-theme="dark"] .year-wheel__project-badge {
    border-color: rgba(216, 180, 254, 0.34);
    background: rgba(88, 28, 135, 0.44);
    color: #f3e8ff;
}

body[data-theme="dark"] .calendar-day__more summary,
body[data-theme="dark"] .year-wheel-agenda__more summary {
    color: #cfe0ff;
    background: rgba(30, 41, 59, 0.92);
    border-color: rgba(148, 163, 184, 0.24);
}

body[data-theme="dark"] .calendar-day__more summary:hover,
body[data-theme="dark"] .year-wheel-agenda__more summary:hover {
    background: rgba(51, 65, 85, 0.96);
    border-color: rgba(125, 166, 255, 0.34);
}

body[data-theme="dark"] .calendar-day__more[open] .calendar-event-list--overflow {
    background: var(--surface-strong);
    border-color: var(--line-strong);
    box-shadow: 0 24px 42px rgba(0, 0, 0, 0.38);
}

body input[type="checkbox"],
body input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    min-width: 20px;
    max-width: 20px;
    height: 20px;
    min-height: 20px;
    max-height: 20px;
    padding: 0;
    margin: 0;
    flex: 0 0 20px;
    line-height: normal;
    vertical-align: middle;
    background-color: var(--surface-strong);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(241, 245, 249, 0.72));
    background-position: center;
    background-repeat: no-repeat;
    background-size: 14px 14px;
    border: 1px solid #aeb9c7;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        0 1px 2px rgba(15, 23, 42, 0.05);
    accent-color: var(--accent);
    cursor: pointer;
}

body input[type="checkbox"] {
    border-radius: 3px;
}

body input[type="radio"] {
    border-radius: 999px;
}

body input[type="checkbox"]:checked {
    background-color: var(--accent);
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 7.2L5.7 9.8L11 4.2' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(11, 87, 208, 0.08);
}

body input[type="checkbox"]:indeterminate {
    background-color: var(--accent);
    background-image: linear-gradient(#fff, #fff);
    background-size: 10px 2px;
    border-color: var(--accent);
}

body input[type="radio"]:checked {
    background-color: var(--accent);
    background-image: radial-gradient(circle at center, #fff 0 34%, transparent 38% 100%);
    background-size: 100% 100%;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(11, 87, 208, 0.08);
}

body input[type="checkbox"]:focus,
body input[type="radio"]:focus {
    outline: 2px solid rgba(11, 87, 208, 0.28);
    outline-offset: 2px;
    box-shadow: none;
}

body input[type="checkbox"]:disabled,
body input[type="radio"]:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}
