:root {
    --bg: #f3f1eb;
    --bg-alt: #ebe7de;
    --surface: rgba(255, 255, 255, 0.84);
    --surface-strong: rgba(255, 255, 255, 0.96);
    --surface-dark: #17212b;
    --line: rgba(27, 37, 48, 0.12);
    --line-strong: rgba(27, 37, 48, 0.2);
    --text: #16202a;
    --muted: #657181;
    --accent: #1e9b87;
    --accent-dark: #137362;
    --danger: #b2483c;
    --warning: #8a6500;
    --success-bg: #e7f7f0;
    --success-text: #18553f;
    --error-bg: #fce8e4;
    --error-text: #7d2d24;
    --info-bg: #eaf4fb;
    --info-text: #224f72;
    --shadow-lg: 0 22px 60px rgba(15, 24, 35, 0.12);
    --shadow-sm: 0 8px 22px rgba(15, 24, 35, 0.07);
    --radius-xl: 32px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(30, 155, 135, 0.18), transparent 24%),
        radial-gradient(circle at 80% 20%, rgba(10, 54, 82, 0.09), transparent 26%),
        linear-gradient(140deg, #f4f2ec 0%, #ebe8df 46%, #e2ddd2 100%);
}

body.theme-christmas {
    --bg: #f7f0ea;
    --bg-alt: #efe1d9;
    --surface: rgba(255, 252, 250, 0.9);
    --surface-strong: rgba(255, 253, 251, 0.97);
    --surface-dark: #233227;
    --line: rgba(111, 31, 36, 0.12);
    --line-strong: rgba(111, 31, 36, 0.24);
    --text: #2d2220;
    --muted: #786661;
    --accent: #b34045;
    --accent-dark: #7f252b;
    --danger: #982f32;
    --warning: #8f6112;
    --success-bg: #edf7ef;
    --success-text: #245438;
    --error-bg: #fae7e3;
    --error-text: #7f252b;
    --info-bg: #eef2fb;
    --info-text: #31466c;
    --shadow-lg: 0 24px 60px rgba(59, 24, 24, 0.14);
    --shadow-sm: 0 10px 24px rgba(59, 24, 24, 0.08);
    background:
        radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.88), transparent 0.45rem),
        radial-gradient(circle at 22% 10%, rgba(255, 255, 255, 0.72), transparent 0.38rem),
        radial-gradient(circle at 78% 12%, rgba(255, 255, 255, 0.8), transparent 0.42rem),
        radial-gradient(circle at 88% 22%, rgba(255, 255, 255, 0.76), transparent 0.32rem),
        radial-gradient(circle at top left, rgba(192, 34, 44, 0.18), transparent 26%),
        radial-gradient(circle at 80% 18%, rgba(53, 116, 69, 0.18), transparent 24%),
        linear-gradient(145deg, #f9f1eb 0%, #efe2db 48%, #e4d4cc 100%);
}

body.theme-christmas::before,
body.theme-christmas::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body.theme-christmas::before {
    background:
        linear-gradient(90deg, rgba(127, 37, 43, 0.12) 0 25%, transparent 25% 50%, rgba(127, 37, 43, 0.12) 50% 75%, transparent 75% 100%);
    background-size: 96px 14px;
    background-repeat: repeat-x;
    background-position: top left;
    opacity: 0.9;
}

body.theme-christmas::after {
    background:
        radial-gradient(circle at 10% 30%, rgba(255, 255, 255, 0.9), transparent 0.18rem),
        radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.76), transparent 0.14rem),
        radial-gradient(circle at 44% 26%, rgba(255, 255, 255, 0.88), transparent 0.16rem),
        radial-gradient(circle at 62% 14%, rgba(255, 255, 255, 0.82), transparent 0.15rem),
        radial-gradient(circle at 77% 24%, rgba(255, 255, 255, 0.86), transparent 0.17rem),
        radial-gradient(circle at 92% 16%, rgba(255, 255, 255, 0.78), transparent 0.14rem);
    background-repeat: repeat-y;
    background-size: 100% 220px;
    opacity: 0.7;
}

body.theme-christmas .shell,
body.theme-christmas .login-shell,
body.theme-christmas .public-page-shell {
    position: relative;
    z-index: 1;
}

.cookie-notice {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 60;
    width: min(440px, calc(100vw - 32px));
    display: grid;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    background: var(--surface-strong);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
}

.cookie-notice[hidden] {
    display: none;
}

.cookie-notice__copy {
    display: grid;
    gap: 6px;
}

.cookie-notice__copy strong {
    font-size: 1rem;
    color: var(--heading, var(--text));
}

.cookie-notice__copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.cookie-notice__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

@media (max-width: 720px) {
    .cookie-notice {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
        padding: 16px;
    }

    .cookie-notice__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-notice__actions .ghost-button,
    .cookie-notice__actions .text-link {
        text-align: center;
    }
}

a {
    color: inherit;
}

code {
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    background: rgba(22, 32, 42, 0.06);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.9em;
}

.shell {
    display: grid;
    grid-template-columns: 258px 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 18px;
    background: rgba(23, 33, 43, 0.94);
    color: #f7fafc;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

body.theme-christmas .sidebar {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.09), transparent 24%),
        linear-gradient(180deg, rgba(44, 73, 51, 0.98) 0%, rgba(28, 50, 34, 0.98) 100%);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #1fa98f, #135f51);
    color: white;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.5rem;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

body.theme-christmas .brand-mark {
    background: linear-gradient(145deg, #c84549, #7f252b);
}

.brand strong,
.topbar h1,
.panel h2,
.login-card h1 {
    font-family: Georgia, "Iowan Old Style", serif;
    letter-spacing: -0.02em;
}

.brand small {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 3px;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-group__title {
    margin: 0 0 2px;
    padding: 0 12px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.nav-link {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.74);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    transform: translateX(2px);
}

body.theme-christmas .nav-group__title {
    color: rgba(255, 244, 232, 0.54);
}

body.theme-christmas .nav-link:hover,
body.theme-christmas .nav-link.is-active {
    background: rgba(255, 251, 245, 0.12);
}

.sidebar-note {
    margin-top: auto;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.main-panel {
    padding: 20px 20px 28px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
    margin-bottom: 16px;
}

body.theme-christmas .topbar {
    position: relative;
}

body.theme-christmas .topbar h1::after {
    content: "Weihnachtslayout";
    display: inline-flex;
    align-items: center;
    margin-left: 12px;
    padding: 0.28rem 0.72rem;
    border-radius: 999px;
    background: rgba(127, 37, 43, 0.1);
    color: #8e2b33;
    font-size: 0.8rem;
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    vertical-align: middle;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent-dark);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    font-weight: 700;
}

body.theme-christmas .eyebrow {
    color: #8e2b33;
}

.topbar h1 {
    margin: 0;
    font-size: clamp(1.7rem, 3.2vw, 2.6rem);
}

.lead {
    margin: 8px 0 0;
    color: var(--muted);
    max-width: 760px;
    line-height: 1.52;
    font-size: 0.98rem;
}

.topbar-actions {
    display: flex;
    gap: 14px;
    align-items: center;
}

.current-user {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: var(--shadow-sm);
    text-align: right;
}

.current-user span {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.ghost-button,
.button,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 0;
    font: inherit;
    font-weight: 650;
    font-size: 0.92rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.button,
button,
input[type="submit"] {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    box-shadow: var(--shadow-sm);
}

.button:hover,
button:hover,
input[type="submit"]:hover,
.ghost-button:hover {
    transform: translateY(-1px);
}

.ghost-button {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text);
    border: 1px solid rgba(22, 32, 42, 0.1);
}

body.theme-christmas .ghost-button {
    background: rgba(255, 250, 247, 0.72);
    border-color: rgba(127, 37, 43, 0.16);
}

.danger-button {
    background: linear-gradient(135deg, #cf5a4c, #a03b2e);
}

.muted-button {
    background: rgba(22, 32, 42, 0.08);
    color: var(--text);
}

.flash-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.flash {
    padding: 12px 14px;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}

.flash p {
    margin: 0;
    line-height: 1.6;
    white-space: pre-line;
}

.flash-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.flash-error {
    background: var(--error-bg);
    color: var(--error-text);
}

.flash-info {
    background: var(--info-bg);
    color: var(--info-text);
}

.content {
    display: grid;
    gap: 16px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
    padding: 18px;
}

body.theme-christmas .panel,
body.theme-christmas .stat-card,
body.theme-christmas .public-page-card,
body.theme-christmas .current-user {
    background:
        linear-gradient(180deg, rgba(255, 254, 252, 0.94) 0%, rgba(255, 249, 245, 0.9) 100%);
}

.panel h2 {
    margin: 0 0 12px;
    font-size: 1.32rem;
}

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

.grid {
    display: grid;
    gap: 16px;
}

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

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

.stats-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.stat-card {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--line);
}

.stat-card strong {
    display: block;
    margin-top: 6px;
    font-size: 1.65rem;
    font-family: Georgia, serif;
}

.stat-card span {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-size: 0.72rem;
    font-weight: 700;
}

.table-wrap {
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(22, 32, 42, 0.08);
    vertical-align: top;
}

th {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.inline-form,
.stack-form {
    display: flex;
    gap: 10px;
    align-items: end;
    flex-wrap: wrap;
    margin: 0;
}

.stack-form {
    flex-direction: column;
    align-items: stretch;
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #324250;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"],
textarea,
select {
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(22, 32, 42, 0.12);
    background: rgba(255, 255, 255, 0.84);
    color: var(--text);
    font: inherit;
}

textarea {
    min-height: 72px;
    padding: 12px;
    resize: vertical;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
}

.subtle {
    color: var(--muted);
    font-size: 0.95rem;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.filter-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-form--grid {
    display: grid;
    gap: 12px;
    flex: 1 1 780px;
}

.filter-panel {
    flex: 1 1 780px;
    border: 1px solid rgba(22, 32, 42, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
}

.filter-panel__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 650;
    list-style: none;
}

.filter-panel__summary::-webkit-details-marker {
    display: none;
}

.filter-panel__body {
    padding: 0 14px 14px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px 12px;
    align-items: end;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-form input[type="text"] {
    min-width: 220px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(22, 32, 42, 0.06);
    color: var(--muted);
    font-size: 0.86rem;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-top: 14px;
}

.pagination__meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.pagination__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.pagination__link,
.pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 650;
}

.pagination__link {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.5);
    color: var(--text);
    border: 1px solid rgba(22, 32, 42, 0.1);
    transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.pagination__link:hover {
    transform: translateY(-1px);
}

.pagination__link.is-current {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

.pagination__link.is-disabled {
    background: rgba(22, 32, 42, 0.04);
    color: var(--muted);
    border-color: rgba(22, 32, 42, 0.06);
    cursor: default;
}

.pagination__ellipsis {
    color: var(--muted);
}

.audit-diff-cell {
    min-width: 320px;
}

.audit-change {
    display: grid;
    grid-template-columns: minmax(110px, auto) minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(22, 32, 42, 0.08);
}

.audit-change:last-child {
    border-bottom: 0;
}

.audit-change strong {
    color: var(--text);
}

.audit-arrow {
    color: var(--muted);
}

.audit-context {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.audit-panel {
    border: 1px solid rgba(22, 32, 42, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.56);
}

.audit-panel__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
}

.audit-panel__summary::-webkit-details-marker {
    display: none;
}

.audit-panel__summary strong {
    display: block;
    font-size: 1.05rem;
}

.audit-panel__body {
    padding: 0 16px 16px;
}

.split {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.1fr);
    gap: 16px;
}

.stack {
    display: grid;
    gap: 14px;
}

.upload-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.upload-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
}

.dropzone {
    position: relative;
    min-height: 136px;
    border-radius: 18px;
    border: 1.5px dashed rgba(30, 155, 135, 0.45);
    background:
        linear-gradient(145deg, rgba(30, 155, 135, 0.08), rgba(19, 115, 98, 0.02)),
        rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 18px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.dropzone:hover,
.dropzone.is-dragover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 14px 28px rgba(30, 155, 135, 0.12);
}

.dropzone.is-uploading {
    cursor: progress;
    opacity: 0.72;
    transform: none;
}

.dropzone strong {
    font-size: 1.08rem;
}

.dropzone small,
.dropzone span {
    color: var(--muted);
    line-height: 1.5;
}

.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-status {
    min-height: 48px;
    margin-top: 12px;
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(246, 248, 250, 0.95);
    color: var(--muted);
    line-height: 1.45;
    white-space: pre-line;
}

.upload-status:empty {
    display: none;
}

.upload-status.is-loading {
    background: rgba(30, 155, 135, 0.10);
    color: #14584d;
}

.upload-status.is-success {
    background: rgba(38, 169, 108, 0.12);
    color: #176840;
}

.upload-status.is-error {
    background: rgba(201, 64, 64, 0.12);
    color: #8e2323;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(1080px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.92fr);
    overflow: hidden;
    border-radius: 36px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-lg);
}

.login-visual {
    min-height: 620px;
    padding: 40px 36px;
    color: white;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.22), transparent 18%),
        radial-gradient(circle at 78% 14%, rgba(255, 255, 255, 0.14), transparent 18%),
        linear-gradient(160deg, #1c2731 0%, #0f4a57 48%, #12816f 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

body.theme-christmas .login-visual {
    background:
        radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.2), transparent 16%),
        radial-gradient(circle at 80% 16%, rgba(255, 234, 198, 0.18), transparent 18%),
        linear-gradient(165deg, #294935 0%, #7f252b 52%, #c84549 100%);
}

.login-title {
    max-width: 12ch;
    font-size: clamp(2rem, 3.1vw, 3.15rem);
    line-height: 0.98;
    margin: 0 0 16px;
}

.login-title span {
    display: block;
}

.login-title span + span {
    margin-top: 0.04em;
}

.login-visual .lead {
    max-width: 31rem;
    line-height: 1.6;
}

.login-form-wrap {
    padding: 40px 36px;
    display: flex;
    align-items: center;
}

.login-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(22, 32, 42, 0.1);
}

.text-link {
    color: var(--accent-dark);
    text-decoration: none;
    font-weight: 650;
}

.text-link:hover {
    text-decoration: underline;
}

.login-form-wrap .panel {
    width: 100%;
    background: transparent;
    box-shadow: none;
    border: 0;
    padding: 0;
}

.public-page-shell {
    min-height: 100vh;
    padding: 28px 18px 40px;
}

.public-page-card {
    width: min(980px, 100%);
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
    padding: 26px;
    backdrop-filter: blur(12px);
}

body.theme-christmas .public-page-header,
body.theme-christmas .login-card,
body.theme-christmas .table-wrap,
body.theme-christmas .filter-panel,
body.theme-christmas .audit-panel {
    position: relative;
}

.public-page-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}

.public-page-header h1 {
    margin: 0;
    font-family: Georgia, "Iowan Old Style", serif;
    font-size: clamp(1.8rem, 3.2vw, 2.8rem);
    letter-spacing: -0.02em;
}

.public-page-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.legal-content {
    display: grid;
    gap: 16px;
}

.legal-section {
    padding: 16px 0 0;
    border-top: 1px solid rgba(22, 32, 42, 0.08);
}

.legal-section:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.legal-section h2 {
    margin: 0 0 10px;
    font-size: 1.12rem;
    font-family: Georgia, "Iowan Old Style", serif;
}

.legal-section p {
    margin: 0 0 10px;
    color: var(--text);
    line-height: 1.6;
}

.legal-section ul {
    margin: 0;
    padding-left: 18px;
}

.legal-section li {
    margin-bottom: 8px;
    line-height: 1.55;
}

.legal-note {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(22, 32, 42, 0.05);
    color: var(--muted);
}

.empty-state {
    padding: 14px;
    border-radius: 14px;
    background: rgba(22, 32, 42, 0.05);
    color: var(--muted);
}

.mini-actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.row-actions.nowrap {
    flex-wrap: nowrap;
    align-items: center;
}

.row-actions--wrap {
    flex-wrap: wrap;
}

.records-layout {
    display: grid;
    grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.35fr);
    gap: 16px;
}

.records-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.compact-card {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(22, 32, 42, 0.08);
    background: rgba(255, 255, 255, 0.5);
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.compact-card h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    font-family: Georgia, "Iowan Old Style", serif;
}

.compact-card p {
    margin: 0 0 12px;
    font-size: 0.94rem;
}

.table-wrap.compact-table th,
.table-wrap.compact-table td {
    padding: 8px 9px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.detail-actions {
    justify-content: end;
    align-items: center;
}

.billing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
    gap: 18px;
    align-items: start;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(250, 251, 247, 0.84)),
        radial-gradient(circle at top right, rgba(30, 155, 135, 0.14), transparent 42%);
}

.billing-hero h2 {
    margin-bottom: 10px;
}

.billing-hero__meta,
.billing-export-actions,
.billing-person-card__top,
.billing-report-grid {
    display: grid;
    gap: 12px;
}

.billing-hero__meta {
    align-content: start;
    justify-items: start;
}

.billing-export-actions {
    grid-template-columns: repeat(auto-fit, minmax(170px, auto));
}

.billing-report-grid {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
}

.billing-person-card {
    display: grid;
    gap: 16px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.billing-person-card__header,
.billing-art-card__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px 18px;
    align-items: start;
}

.billing-person-card__title,
.billing-art-card__title {
    min-width: 0;
}

.billing-person-card__meta,
.billing-art-card__meta {
    margin-top: 8px;
}

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

.billing-art-card {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.billing-actions {
    justify-content: flex-start;
    align-items: flex-start;
}

.billing-actions .button,
.billing-actions .ghost-button {
    white-space: nowrap;
}

.table-wrap.compact-table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.table-wrap.compact-table table {
    min-width: 860px;
}

.auswertung-matrix-wrap table {
    min-width: 980px;
}

.auswertung-matrix th.numeric,
.auswertung-matrix td.numeric {
    text-align: right;
    white-space: nowrap;
}

.auswertung-matrix__section-title th {
    background: rgba(30, 155, 135, 0.1);
    color: var(--text);
}

.auswertung-matrix__section-title th:first-child {
    letter-spacing: 0.12em;
}

.auswertung-matrix__subhead th {
    background: rgba(20, 31, 43, 0.04);
}

.auswertung-matrix__sum th {
    background: rgba(244, 241, 234, 0.95);
    color: var(--text);
}

.auswertung-matrix__spacer td {
    border: 0;
    padding: 10px 0;
    background: transparent;
}

.billing-address {
    white-space: pre-line;
    color: var(--text);
}

.archive-year-stack {
    display: grid;
    gap: 18px;
}

.archive-year-group {
    display: grid;
    gap: 12px;
}

.archive-year-group__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.archive-mail-meta {
    margin-top: 14px;
}

.archive-year-group__header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-family: Georgia, "Iowan Old Style", serif;
}

.archive-year-group__header span {
    color: var(--muted);
    font-size: 0.92rem;
}

.archive-quarter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.archive-quarter-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(22, 32, 42, 0.1);
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 248, 0.9)),
        radial-gradient(circle at top right, rgba(30, 155, 135, 0.1), transparent 42%);
    color: inherit;
    text-decoration: none;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.archive-quarter-card:hover,
.archive-quarter-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(30, 155, 135, 0.4);
    box-shadow: 0 18px 34px rgba(16, 47, 56, 0.08);
}

.archive-quarter-card.is-active {
    border-color: rgba(30, 155, 135, 0.65);
    box-shadow: 0 20px 36px rgba(16, 47, 56, 0.1);
}

.archive-quarter-card__label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

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

    .sidebar {
        position: relative;
        height: auto;
    }

    .split,
    .billing-hero,
    .billing-person-card__top,
    .records-layout,
    .records-editor-grid,
    .detail-header,
    .billing-person-card__header,
    .billing-art-card__header,
    .grid.two,
    .grid.three,
    .login-card {
        grid-template-columns: 1fr;
    }

    .detail-header,
    .billing-person-card__header,
    .billing-art-card__header {
        display: grid;
    }
}

@media (max-width: 760px) {
    .main-panel,
    .sidebar {
        padding: 20px;
    }

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

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

    .toolbar,
    .filter-form,
    .inline-form,
    .row-actions,
    .topbar-actions,
    .pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination__links {
        justify-content: stretch;
    }
}
