:root {
    --dtc-black: #000000;
    --dtc-surface: #121212;
    --dtc-surface-soft: #1d1d1d;
    --dtc-text: #ffffff;
    --dtc-muted: #a8a8a8;
    --dtc-primary: #f9652f;
    --dtc-primary-dark: #da4209;
    --dtc-primary-warm: #d78129;
    --dtc-warning: #ff8456;
    --dtc-border: rgba(249, 101, 47, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    background: var(--dtc-black);
    color: var(--dtc-text);
}

a {
    color: inherit;
}

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.92)),
        var(--dtc-surface);
}

.site-header {
    border-bottom: 2px solid var(--dtc-primary);
    background: rgba(0, 0, 0, 0.72);
}

.site-header__inner,
.hero,
.contact,
.site-footer__inner {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header__inner {
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand-logo {
    width: min(260px, 58vw);
    height: auto;
}

.site-nav {
    display: flex;
    gap: 18px;
    color: var(--dtc-muted);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-nav a {
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus {
    color: var(--dtc-primary);
}

.hero {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    align-items: center;
    gap: 56px;
    padding: 96px 0 72px;
}

.eyebrow {
    width: fit-content;
    margin: 0 0 22px;
    padding: 7px 12px;
    border: 1px solid var(--dtc-border);
    color: var(--dtc-muted);
    font-size: 0.95rem;
    line-height: 1.2;
}

h1 {
    max-width: 780px;
    margin: 0;
    font-size: 5.6rem;
    line-height: 0.94;
    font-weight: 800;
    text-transform: uppercase;
}

.accent {
    color: var(--dtc-primary);
}

.hero__text {
    max-width: 680px;
    margin: 28px 0 0;
    color: var(--dtc-muted);
    font-size: 1.18rem;
    line-height: 1.7;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid var(--dtc-primary);
    border-radius: 4px;
    background: var(--dtc-primary-dark);
    color: var(--dtc-text);
    font-weight: 700;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover,
.button:focus {
    transform: translateY(-1px);
}

.button--ghost {
    background: transparent;
    color: var(--dtc-primary);
}

.button--danger {
    border-color: #b91c1c;
    background: #991b1b;
}

.contact-card {
    padding: 28px;
    border: 1px solid var(--dtc-border);
    background: rgba(18, 18, 18, 0.88);
}

.contact-card h2 {
    margin: 0 0 20px;
    color: var(--dtc-primary);
    font-size: 1.45rem;
}

.contact-list {
    display: grid;
    gap: 20px;
}

.contact-list h3 {
    margin: 0 0 6px;
    color: var(--dtc-text);
    font-size: 1rem;
}

.contact-list p {
    margin: 0;
    color: var(--dtc-muted);
    line-height: 1.55;
}

.contact-list a {
    color: var(--dtc-primary);
    text-decoration: none;
}

.contact {
    padding: 0 0 74px;
}

.contact__strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.08);
}

.metric {
    min-height: 124px;
    padding: 20px;
    background: var(--dtc-surface-soft);
}

.metric strong {
    display: block;
    margin-bottom: 8px;
    color: var(--dtc-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.metric span {
    color: var(--dtc-text);
    line-height: 1.45;
}

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--dtc-black);
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 30px 0;
    color: var(--dtc-muted);
    font-size: 0.95rem;
}

.footer-logo {
    width: 172px;
    height: auto;
}

@media (max-width: 860px) {
    .site-header__inner,
    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav {
        flex-wrap: wrap;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 36px;
        padding-top: 56px;
    }

    h1 {
        font-size: 3.6rem;
    }

    .contact__strip {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    h1 {
        font-size: 2.55rem;
    }

    .contact__strip {
        grid-template-columns: 1fr;
    }
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    background: var(--dtc-black);
}

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: #0a0a0a;
    overflow-y: auto;
}

.app-logo {
    display: block;
    margin-bottom: 26px;
}

.app-logo img {
    width: 190px;
    height: auto;
}

.app-nav {
    display: grid;
    gap: 6px;
}

.app-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 4px;
    color: var(--dtc-muted);
    text-decoration: none;
    font-weight: 700;
}

.app-nav a:hover,
.app-nav a:focus {
    background: rgba(249, 101, 47, 0.14);
    color: var(--dtc-text);
}

.app-main {
    min-width: 0;
}

.app-topbar {
    min-height: 112px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--dtc-surface);
}

.app-topbar h1 {
    margin-top: 4px;
    font-size: 2rem;
    line-height: 1.1;
    text-transform: none;
}

.topbar-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.24);
}

.language-switcher a {
    min-width: 40px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 3px;
    color: var(--dtc-muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.language-switcher a:hover,
.language-switcher a:focus,
.language-switcher a.is-active {
    border-color: rgba(249, 101, 47, 0.54);
    background: rgba(249, 101, 47, 0.16);
    color: var(--dtc-text);
}

.language-switcher a:hover,
.language-switcher a:focus {
    transform: translateY(-1px);
}

.topline {
    margin: 0;
    color: var(--dtc-primary);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.app-content {
    padding: 28px 32px 48px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.command-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
    gap: 24px;
    align-items: end;
    margin-bottom: 18px;
    padding: 28px;
    border: 1px solid rgba(249, 101, 47, 0.22);
    background:
        linear-gradient(135deg, rgba(249, 101, 47, 0.18), transparent 36%),
        linear-gradient(180deg, #181818, #101010);
}

.command-hero h2 {
    max-width: 850px;
    margin: 0;
    font-size: 2.35rem;
    line-height: 1.04;
}

.command-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 16px 0 0;
    color: var(--dtc-muted);
    line-height: 1.65;
}

.command-actions {
    display: grid;
    gap: 12px;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.dashboard-kpi {
    min-height: 126px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, #1d1d1d, #111111);
    transition: transform 180ms ease, border-color 180ms ease;
}

.dashboard-kpi:hover {
    transform: translateY(-2px);
    border-color: rgba(249, 101, 47, 0.45);
}

.dashboard-kpi span {
    color: var(--dtc-muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.dashboard-kpi strong {
    color: var(--dtc-primary);
    font-size: 2.4rem;
    line-height: 1;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    gap: 18px;
    margin-bottom: 18px;
}

.status-panel,
.lane-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--dtc-surface-soft);
}

.status-panel {
    padding: 20px;
}

.status-panel h2,
.lane-card h2 {
    margin: 0;
    color: var(--dtc-primary);
    font-size: 1.15rem;
}

.status-stack {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.status-row {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 12px;
    border-left: 3px solid var(--dtc-primary);
    background: rgba(0, 0, 0, 0.22);
}

.status-row span {
    color: var(--dtc-muted);
}

.status-row strong {
    color: var(--dtc-text);
}

.dashboard-lanes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.lane-card {
    overflow: hidden;
}

.lane-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lane-card__header a {
    color: var(--dtc-primary);
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
}

.signal-list {
    display: grid;
}

.signal-item {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: inherit;
    text-decoration: none;
    transition: background-color 160ms ease, transform 160ms ease;
}

.signal-item:hover,
.signal-item:focus {
    background: rgba(249, 101, 47, 0.10);
}

.signal-item strong {
    display: block;
    color: var(--dtc-text);
    line-height: 1.35;
}

.signal-item span {
    display: block;
    margin-top: 6px;
    color: var(--dtc-muted);
    font-size: 0.9rem;
    line-height: 1.35;
}

.signal-item em {
    flex: 0 0 auto;
    color: var(--dtc-primary);
    font-style: normal;
    font-weight: 900;
}

.signal-item--danger em {
    color: #fecaca;
}

.dashboard-card,
.workflow-panel,
.auth-panel,
.mobile-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--dtc-surface-soft);
}

.dashboard-card {
    min-height: 128px;
    padding: 22px;
}

.dashboard-card strong {
    display: block;
    color: var(--dtc-primary);
    font-size: 2.2rem;
    line-height: 1;
}

.dashboard-card span {
    display: block;
    margin-top: 10px;
    color: var(--dtc-muted);
}

.workflow-panel {
    margin-top: 22px;
    padding: 24px;
}

.workflow-panel h2 {
    margin: 0 0 10px;
    color: var(--dtc-primary);
    font-size: 1.25rem;
}

.workflow-panel p {
    margin: 0;
    color: var(--dtc-muted);
    line-height: 1.7;
}

.resource-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--dtc-surface-soft);
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--dtc-primary);
    font-size: 0.82rem;
    text-transform: uppercase;
}

td {
    color: var(--dtc-muted);
}

.actions-cell a {
    display: inline-flex;
    margin-right: 12px;
    color: var(--dtc-primary);
    font-weight: 700;
    text-decoration: none;
}

.entity-link {
    color: var(--dtc-text);
    font-weight: 800;
    text-decoration: none;
}

.entity-link:hover,
.entity-link:focus {
    color: var(--dtc-primary);
}

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

.form-stack {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--dtc-muted);
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    background: #0b0b0b;
    color: var(--dtc-text);
    font: inherit;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.danger-form {
    margin-top: 24px;
}

.auth-panel {
    width: min(420px, 100%);
    margin: 8vh auto 0;
    padding: 28px;
}

.auth-panel img {
    width: 230px;
    margin-bottom: 28px;
}

.alert-error {
    padding: 12px 14px;
    border: 1px solid #b91c1c;
    background: rgba(185, 28, 28, 0.18);
    color: #fecaca;
}

.alert-success {
    padding: 12px 14px;
    border: 1px solid #15803d;
    background: rgba(21, 128, 61, 0.18);
    color: #bbf7d0;
}

.mobile-list {
    display: grid;
    gap: 14px;
}

.mobile-card {
    padding: 18px;
}

.mobile-card h2 {
    margin: 10px 0 8px;
    font-size: 1.22rem;
}

.mobile-card p {
    margin: 0 0 16px;
    color: var(--dtc-muted);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(249, 101, 47, 0.16);
    color: var(--dtc-primary);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.action-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.action-button {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(249, 101, 47, 0.32);
    background: linear-gradient(135deg, rgba(249, 101, 47, 0.18), rgba(18, 18, 18, 0.92));
    color: var(--dtc-text);
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease;
}

.action-button:hover,
.action-button:focus {
    transform: translateY(-2px);
    border-color: var(--dtc-primary);
}

.action-button span {
    font-weight: 800;
    line-height: 1.25;
}

.action-button strong {
    color: var(--dtc-primary);
    font-size: 1.7rem;
    line-height: 1;
}

.action-button--secondary {
    border-color: rgba(168, 168, 168, 0.28);
    background: linear-gradient(135deg, rgba(168, 168, 168, 0.12), rgba(18, 18, 18, 0.92));
}

.action-button--danger {
    border-color: rgba(185, 28, 28, 0.52);
    background: linear-gradient(135deg, rgba(185, 28, 28, 0.22), rgba(18, 18, 18, 0.92));
}

.action-button--muted {
    opacity: 0.64;
    pointer-events: none;
}

.progress-panel {
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--dtc-surface-soft);
}

.progress-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.progress-panel h2 {
    margin: 0;
    color: var(--dtc-primary);
    font-size: 1.18rem;
}

.progress-panel p {
    margin: 8px 0 0;
    color: var(--dtc-muted);
}

.progress-number {
    color: var(--dtc-text);
    font-size: 2.35rem;
    line-height: 1;
}

.progress-track {
    height: 14px;
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid rgba(249, 101, 47, 0.22);
    background: #080808;
}

.progress-track span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--dtc-primary-dark), var(--dtc-primary), var(--dtc-warning));
    transition: width 850ms cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-track span.is-visible {
    width: var(--progress);
}

.progress-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.progress-stats span {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--dtc-muted);
    background: rgba(0, 0, 0, 0.22);
}

.progress-stats strong {
    color: var(--dtc-text);
}

.detail-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.detail-fact,
.detail-note,
.context-panel,
.relation-section {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--dtc-surface-soft);
}

.detail-fact {
    min-height: 98px;
    padding: 16px;
}

.detail-fact strong {
    display: block;
    margin-bottom: 8px;
    color: var(--dtc-primary);
    font-size: 0.82rem;
    text-transform: uppercase;
}

.detail-fact span {
    color: var(--dtc-text);
    line-height: 1.45;
}

.detail-note {
    margin-bottom: 18px;
    padding: 18px;
}

.detail-note h2,
.context-panel h2,
.relation-section h2 {
    margin: 0;
    color: var(--dtc-primary);
    font-size: 1.15rem;
}

.context-panel {
    margin-bottom: 18px;
    padding: 18px;
}

.context-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.context-links a {
    display: grid;
    gap: 6px;
    min-height: 74px;
    padding: 14px;
    border: 1px solid rgba(249, 101, 47, 0.24);
    background: rgba(249, 101, 47, 0.08);
    text-decoration: none;
}

.context-links strong {
    color: var(--dtc-primary);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.context-links span {
    color: var(--dtc-text);
}

.detail-note p {
    margin: 12px 0 0;
    color: var(--dtc-muted);
    line-height: 1.65;
}

.relation-section {
    margin-top: 18px;
    overflow: hidden;
}

.relation-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.relation-section__header span,
.empty-state {
    color: var(--dtc-muted);
}

.empty-state {
    margin: 0;
    padding: 18px;
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: static;
        height: auto;
        padding: 14px 16px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .app-logo {
        margin-bottom: 12px;
    }

    .app-logo img {
        width: 176px;
    }

    .app-nav {
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .app-nav a {
        min-height: 48px;
        white-space: nowrap;
    }

    .app-topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px 16px;
    }

    .topbar-tools {
        width: 100%;
        justify-content: space-between;
    }

    .app-topbar h1 {
        font-size: 1.65rem;
    }

    .app-content {
        padding: 18px 16px 34px;
    }

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

    .command-hero,
    .dashboard-main-grid,
    .dashboard-lanes {
        grid-template-columns: 1fr;
    }

    .dashboard-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

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

@media (max-width: 680px) {
    .dashboard-grid,
    .dashboard-kpi-grid,
    .form-grid,
    .detail-summary {
        grid-template-columns: 1fr;
    }

    .command-hero {
        padding: 20px;
    }

    .command-hero h2 {
        font-size: 1.85rem;
    }

    .signal-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .resource-actions {
        justify-content: stretch;
    }

    .resource-actions .button,
    .form-actions .button,
    .mobile-card .button,
    .auth-panel .button,
    .topbar-tools form,
    .topbar-tools form .button {
        width: 100%;
    }

    .topbar-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .language-switcher {
        width: 100%;
        justify-content: space-between;
    }

    .language-switcher a {
        flex: 1 1 0;
    }

    .table-wrap {
        border: 0;
        background: transparent;
        overflow: visible;
    }

    table,
    thead,
    tbody,
    tr,
    th,
    td {
        display: block;
    }

    table {
        min-width: 0;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 14px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: var(--dtc-surface-soft);
    }

    td {
        display: flex;
        justify-content: space-between;
        gap: 18px;
        padding: 12px 14px;
    }

    td::before {
        content: attr(data-label);
        color: var(--dtc-primary);
        font-weight: 800;
    }

    .actions-cell {
        justify-content: flex-start;
    }

    .detail-actions .button {
        width: 100%;
    }

    .context-links {
        grid-template-columns: 1fr;
    }

    .action-panel {
        grid-template-columns: 1fr;
    }

    .progress-panel__header {
        flex-direction: column;
    }

    .relation-section__header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
    }

    .progress-track span {
        width: var(--progress);
    }
}

/* ============================================================
   Portal-Kacheln und Admin-Bereich (dynamisches Modulportal)
   ============================================================ */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.module-tile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 168px;
    padding: 20px;
    text-decoration: none;
    color: var(--dtc-text);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid var(--tile-color, var(--dtc-primary));
    background: linear-gradient(180deg, #1d1d1d, #111111);
    transition: transform 180ms ease, border-color 180ms ease;
}

.module-tile:hover,
.module-tile:focus {
    transform: translateY(-2px);
    border-color: var(--tile-color, var(--dtc-primary));
}

.module-tile__icon {
    font-size: 1.9rem;
    line-height: 1;
}

.module-tile__title {
    font-size: 1.15rem;
    font-weight: 800;
}

.module-tile__desc {
    color: var(--dtc-muted);
    font-size: 0.9rem;
    flex: 1;
}

.module-tile__badge {
    align-self: flex-start;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}

.admin-nav a {
    padding: 8px 14px;
    text-decoration: none;
    color: var(--dtc-muted);
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-nav a.is-active,
.admin-nav a:hover {
    color: var(--dtc-text);
    border-color: var(--tile-color, var(--dtc-primary));
}

.access-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    margin: 8px 0 16px;
}

.checkbox-list label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.checkbox-list input {
    width: auto;
}

@media (max-width: 680px) {
    .module-grid {
        grid-template-columns: 1fr;
    }
}

.checkbox-inline {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.checkbox-inline input {
    width: auto;
}

.form-fieldset {
    grid-column: 1 / -1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 14px;
}

.form-fieldset legend {
    padding: 0 6px;
    color: var(--dtc-muted);
    font-weight: 800;
}

.access-matrix select {
    min-width: 130px;
}
