/* ==========================================================
   LIAB Office
   Zentrales Designsystem
========================================================== */


/* ==========================================================
   DESIGN TOKENS
========================================================== */

:root {
    /* Grundfarben */
    --color-background: #f5f6f8;
    --color-surface: #ffffff;
    --color-surface-muted: #f8f9fb;

    --color-border: #d9dee5;
    --color-border-light: #e8ebef;

    --color-text: #1f2937;
    --color-text-light: #6b7280;
    --color-text-disabled: #9ca3af;

    /* Markenfarbe */
    --color-primary: #d4a017;
    --color-primary-hover: #b98a12;

    /* Links */
    --color-link: #2b5cab;
    --color-link-hover: #214985;

    /* Statusfarben */
    --color-success: #2e8b57;
    --color-success-hover: #26754a;
    --color-success-background: #eaf6ef;

    --color-warning: #b7791f;
    --color-warning-background: #fff7e6;

    --color-danger: #b42318;
    --color-danger-hover: #912018;
    --color-danger-background: #fef0ef;

    --color-neutral-background: #eef1f4;

    /* Formulare */
    --control-height: 38px;
    --control-radius: 6px;
    --control-padding-x: 12px;

    --color-control-border: #d5dbe3;
    --color-control-background: #ffffff;
    --color-control-hover: #c5ccd6;
    --color-control-disabled: #f1f3f5;

    --color-focus: #3b82f6;
    --color-focus-ring: rgba(59, 130, 246, 0.15);

    /* Tabellen */
    --color-table-header: #f3f4f6;
    --color-table-stripe: #fafbfc;
    --color-table-hover: #f3f6f9;

    /* Abstände */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Radien */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;

    /* Rückwärtskompatibilität */
    --radius: var(--radius-lg);

    /* Schatten */
    --shadow-sm:
        0 1px 2px rgba(15, 23, 42, 0.04);

    --shadow-md:
        0 4px 12px rgba(15, 23, 42, 0.07);

    /* Typografie */
    --font-size-sm: 0.875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.25rem;
}


/* ==========================================================
   RESET UND GRUNDLAGEN
========================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scrollbar-gutter: stable;
}

body {
    margin: 0;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-size: 15px;
    line-height: 1.5;

    color: var(--color-text);
    background: var(--color-background);
}

h1,
h2,
h3,
h4 {
    margin-top: 0;

    color: var(--color-text);

    font-weight: 600;
    line-height: 1.25;
}

p {
    margin-top: 0;
}

a {
    color: var(--color-link);
    text-decoration: none;
}

a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}


/* ==========================================================
   GLOBALER SEITENCONTAINER
========================================================== */

.page-container {
    width: 100%;
    max-width: 1440px;

    margin: 0 auto;
    padding: 24px 32px;
}

.page-container > header {
    margin-bottom: 12px;
}

.application-footer {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-md);

    color: var(--color-text-disabled);
    border-top: 1px solid var(--color-border-light);

    font-size: 0.75rem;
    text-align: center;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    color: var(--color-text);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.site-brand:hover {
    color: var(--color-text);
    text-decoration: none;
}

.site-brand-logo {
    display: block;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
}

.page-container > nav {
    margin-bottom: 0;
}

.page-container > hr {
    margin: 8px 0 16px;

    border: 0;
    border-top: 1px solid var(--color-border);
}

.page-container > main {
    margin-top: 0;
}

.page-container > main > :first-child {
    margin-top: 0;
}


/* ==========================================================
   SEITENÜBERSCHRIFTEN
========================================================== */

.page-title {
    margin-bottom: var(--spacing-lg);

    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.25;
}

.page-header {
    margin-bottom: var(--spacing-xl);
}

.page-header-back {
    margin: 0 0 var(--spacing-sm);

    font-size: var(--font-size-sm);
}

.page-header-back a {
    color: var(--color-text-light);
    text-decoration: none;
}

.page-header-back a:hover {
    color: var(--color-text);
}

.page-header h1,
.page-header h2 {
    margin-bottom: var(--spacing-xs);
}

.page-header-subtitle {
    margin: 0;

    color: var(--color-text-light);
}


/* ==========================================================
   HAUPTNAVIGATION
========================================================== */

.main-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;

    margin-bottom: 10px;
}

.main-navigation a {
    position: relative;

    padding: 6px 0;

    color: var(--color-text-light);

    font-weight: 500;
    text-decoration: none;

    transition:
        color 0.15s ease;
}

.main-navigation a:hover {
    color: var(--color-text);
}

.main-navigation a.active {
    color: var(--color-primary);
    font-weight: 600;
}

.main-navigation a.active::after {
    content: "";

    position: absolute;

    right: 0;
    bottom: -8px;
    left: 0;

    height: 3px;

    border-radius: 3px;

    background: var(--color-primary);
}

.main-navigation-session {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);

    margin-left: auto;

    color: var(--color-text-light);
    font-size: var(--font-size-sm);
}

.main-navigation-session form {
    margin: 0;
}

.main-navigation-logout {
    padding: 0;

    color: var(--color-link);
    background: transparent;
    border: 0;

    font: inherit;
    cursor: pointer;
}

.main-navigation-logout:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}


/* ==========================================================
   KARTEN
========================================================== */

.card {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);

    background: var(--color-surface);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);
}

/*
 * Neue Designsystem-Klassen und bisherige Klassen
 * werden vorerst parallel unterstützt.
 */
.card__header,
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);

    margin-bottom: var(--spacing-md);
}

.card__title,
.card-header h3 {
    margin: 0;

    font-size: 1.05rem;
    font-weight: 600;
}

.card__body > :last-child {
    margin-bottom: 0;
}

.card__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--spacing-sm);

    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);

    border-top: 1px solid var(--color-border-light);
}

.card-action {
    padding: 0;

    color: var(--color-text-light);
    background: none;

    border: 0;

    font: inherit;
    text-decoration: none;

    cursor: pointer;

    transition:
        color 0.15s ease;
}

.card-action:hover,
button.card-action:hover {
    color: var(--color-text);
    text-decoration: none;
}


/* ==========================================================
   FORMULARE
========================================================== */

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

    margin-bottom: 18px;
}

.form-label {
    color: var(--color-text);

    font-size: var(--font-size-sm);
    font-weight: 600;
}

.form-control,
.form-select {
    width: 100%;
    min-height: var(--control-height);

    padding:
        8px
        var(--control-padding-x);

    color: var(--color-text);
    background: var(--color-control-background);

    border: 1px solid var(--color-control-border);
    border-radius: var(--control-radius);

    font: inherit;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease;
}

textarea.form-control {
    min-height: 96px;
    resize: vertical;
}

.form-control:hover,
.form-select:hover {
    border-color: var(--color-control-hover);
}

.form-control:focus,
.form-select:focus {
    outline: none;

    border-color: var(--color-focus);

    box-shadow:
        0 0 0 3px var(--color-focus-ring);
}

.form-control:disabled,
.form-select:disabled {
    color: var(--color-text-disabled);
    background: var(--color-control-disabled);

    cursor: not-allowed;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.form-checkbox input {
    margin: 0;
}

.form-row {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(220px, 1fr)
        );
    gap: var(--spacing-md);
}

.form-help {
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
}

.form-error {
    color: var(--color-danger);
    font-size: var(--font-size-sm);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--spacing-sm);

    margin-top: var(--spacing-lg);
}

.form-message {
    min-height: 1.5rem;
    margin-bottom: var(--spacing-md);
}

.form-success {
    margin: 0;

    color: var(--color-success);
}

.form-section-title {
    margin:
        var(--spacing-lg)
        0
        var(--spacing-md);

    padding-top: var(--spacing-md);

    border-top: 1px solid var(--color-border);

    font-size: 1rem;
    font-weight: 600;
}


/* ==========================================================
   BUTTONS
========================================================== */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);

    min-height: var(--control-height);

    padding:
        8px
        16px;

    color: var(--color-text);
    background: var(--color-surface);

    border: 1px solid var(--color-border);
    border-radius: var(--control-radius);

    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;

    cursor: pointer;

    transition:
        color 0.15s ease,
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.button:hover {
    border-color: var(--color-control-hover);
    text-decoration: none;
}

.button:focus-visible {
    outline: none;

    box-shadow:
        0 0 0 3px var(--color-focus-ring);
}

.button:disabled,
.button[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
}

/*
 * Primärbutton.
 * .button-primary bleibt vorerst als Altklasse erhalten.
 */
.button--primary,
.button-primary {
    color: #ffffff;
    background: var(--color-success);
    border-color: var(--color-success);
}

.button--primary:hover,
.button-primary:hover {
    color: #ffffff;
    background: var(--color-success-hover);
    border-color: var(--color-success-hover);
}

/*
 * Sekundäre Aktion
 */
.button--secondary {
    color: var(--color-text);
    background: var(--color-surface);
    border-color: var(--color-border);
}

.button--secondary:hover {
    color: var(--color-text);
    background: var(--color-surface-muted);
}

/*
 * Kritische Aktion
 */
.button--danger {
    color: #ffffff;
    background: var(--color-danger);
    border-color: var(--color-danger);
}

.button--danger:hover {
    color: #ffffff;
    background: var(--color-danger-hover);
    border-color: var(--color-danger-hover);
}

/*
 * Zurückhaltende Aktion ohne sichtbaren Rahmen
 */
.button--ghost {
    color: var(--color-text-light);
    background: transparent;
    border-color: transparent;
}

.button--ghost:hover {
    color: var(--color-text);
    background: var(--color-surface-muted);
    border-color: transparent;
}

.button--small {
    min-height: 30px;
    padding: 5px 10px;

    font-size: var(--font-size-sm);
}

.button--icon {
    width: var(--control-height);
    padding: 0;
}


/* ==========================================================
   ICON-BUTTONS
========================================================== */

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 28px;
    min-height: 28px;

    margin: 0;
    padding: 4px;

    color: var(--color-text-light);
    background: transparent;

    border: 0;
    border-radius: var(--radius-sm);

    font: inherit;
    font-size: 0.9rem;
    text-decoration: none;

    cursor: pointer;

    transition:
        color 0.15s ease,
        background-color 0.15s ease;
}

.icon-button:hover {
    color: var(--color-text);
    background: var(--color-surface-muted);
    text-decoration: none;
}

.icon-button--danger:hover {
    color: var(--color-danger);
    background: var(--color-danger-background);
}


/* ==========================================================
   TOOLBARS
========================================================== */

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);

    margin-bottom: var(--spacing-md);
}

.toolbar__group,
.toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-sm);
}

.toolbar__title {
    margin: 0;

    font-size: var(--font-size-lg);
    font-weight: 600;
}

.toolbar__search {
    width: min(320px, 100%);
}


/* ==========================================================
   TABELLEN
========================================================== */

/*
 * Minimale Rückwärtskompatibilität für bestehende Tabellen.
 * Neue Listen sollen zusätzlich die Klasse .table verwenden.
 */
table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 8px;

    text-align: left;
    vertical-align: top;

    border-bottom: 1px solid var(--color-border-light);
}

th {
    font-weight: 600;
}

.table-container {
    width: 100%;
    overflow-x: auto;

    background: var(--color-surface);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.table {
    width: 100%;
    min-width: 680px;

    border-collapse: collapse;
}

.table th,
.table td {
    padding: 11px 12px;

    text-align: left;
    vertical-align: middle;

    border-bottom: 1px solid var(--color-border-light);
}

.table thead {
    background: var(--color-table-header);
}

.table th {
    color: var(--color-text);

    font-size: var(--font-size-sm);
    font-weight: 600;

    white-space: nowrap;
}

.table tbody tr {
    background: var(--color-surface);

    transition:
        background-color 0.12s ease;
}

.table tbody tr:nth-child(even) {
    background: var(--color-table-stripe);
}

.table tbody tr:hover {
    background: var(--color-table-hover);
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table--compact th,
.table--compact td {
    padding: 7px 10px;
}

.table__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--spacing-xs);

    white-space: nowrap;
}

.table__empty {
    padding: var(--spacing-xl);

    color: var(--color-text-light);
    text-align: center;
}

/* ==========================================================
   EVENTKOPF
========================================================== */

.event-header h2 {
    margin-bottom: 0;

    font-size: 1.6rem;
    font-weight: 700;
}

.event-code {
    margin-top: 6px;
    margin-bottom: 12px;

    color: var(--color-text-light);

    font-size: 0.85rem;
    font-weight: 500;
}

/* ==========================================================
   WORKFLOW-STATUSLISTE
========================================================== */

.workflow-status-list {
    display: flex;
    flex-direction: column;
    gap: 10px;

    margin-bottom: 20px;
}

.workflow-status-row {
    display: grid;
    grid-template-columns: 180px auto;
    align-items: center;
    justify-content: start;
    column-gap: 20px;
}

.workflow-status-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.workflow-status-icon {
    display: inline-flex;
    justify-content: center;

    width: 20px;
}

.workflow-status-label {
    color: var(--color-text-light);
    font-size: 0.85rem;
}


/* ==========================================================
   DETAILTABELLEN
========================================================== */

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

.detail-table th {
    width: 220px;

    padding:
        0.6rem
        1rem
        0.6rem
        0;

    text-align: left;
    vertical-align: top;

    font-weight: 600;
}

.detail-table td {
    padding:
        0.6rem
        0;
}

.detail-table tr {
    border-bottom: 1px solid var(--color-border-light);
}

.detail-table tr:last-child {
    border-bottom: 0;
}

.detail-table tbody tr:hover {
    background: transparent;
}


/* ==========================================================
   STATUS-BADGES
========================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 3px 8px;

    border-radius: 999px;

    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;

    white-space: nowrap;
}

.badge--neutral {
    color: var(--color-text-light);
    background: var(--color-neutral-background);
}

.badge--success {
    color: var(--color-success);
    background: var(--color-success-background);
}

.badge--warning {
    color: var(--color-warning);
    background: var(--color-warning-background);
}

.badge--danger {
    color: var(--color-danger);
    background: var(--color-danger-background);
}

.badge--accounted {
    background: #166534;
    color: #ffffff;
    border: 1px solid #14532d;
    font-weight: 600;
}

.badge-icon {
    margin-right: 4px;
}


/* ==========================================================
   ALLGEMEINE HILFSKLASSEN
========================================================== */

.text-muted {
    color: var(--color-text-light);
}

.text-danger {
    color: var(--color-danger);
}

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

.text-right {
    text-align: right;
}

.nowrap {
    white-space: nowrap;
}

.hidden {
    display: none !important;
}


/* ==========================================================
   RESPONSIVE GRUNDANPASSUNGEN
========================================================== */

@media (max-width: 760px) {
    .page-container {
        padding:
            var(--spacing-md)
            var(--spacing-md);
    }

    .page-header {
        margin-bottom: var(--spacing-lg);
    }

    .toolbar {
        align-items: stretch;
    }

    .toolbar__group,
    .toolbar__actions {
        width: 100%;
    }

    .toolbar__actions {
        justify-content: flex-start;
    }

    .toolbar__search {
        width: 100%;
    }

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

    .card {
        padding: var(--spacing-md);
    }

    .detail-table th,
    .detail-table td {
        display: block;
        width: 100%;
    }

    .detail-table th {
        padding-bottom: 0;
    }
}


/* ==========================================================
   ZÄHLER-BADGES
========================================================== */

.badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 24px;
    padding: 2px 7px;

    color: var(--color-text-light);
    background: var(--color-neutral-background);

    border-radius: 999px;

    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;

    white-space: nowrap;
}

.badge-count--primary {

    color: var(--color-text);

    background: var(--color-border-light);

    font-weight: 700;

}

/* ==========================================================
   Historie
========================================================== */

.history-entry {

    display: flex;
    gap: 18px;

    position: relative;

    padding-bottom: 24px;
}

.history-entry-collapsible {
    display: none;
}

.history-list.is-expanded .history-entry-collapsible {
    display: flex;
}

.history-entry:last-child {

    padding-bottom: 0;
}

.history-marker {

    width: 12px;
    flex-shrink: 0;

    position: relative;
}

.history-marker::before {

    content: "";

    position: absolute;

    left: 5px;
    top: 0;

    width: 2px;
    height: 100%;

    background: var(--color-border);
}

.history-entry:last-child .history-marker::before {

    display: none;
}

.history-marker::after {

    content: "";

    position: absolute;

    left: 1px;
    top: 4px;

    width: 10px;
    height: 10px;

    border-radius: 50%;

    background: var(--color-primary);
}

.history-content {

    flex: 1;
}

.history-title {

    display: flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 4px;
}

.history-date {

    color: var(--color-text-light);
    font-size: .9rem;

    margin-bottom: 8px;
}

.history-message {

    padding-left: 28px;

    color: var(--color-text);
}

.history-toggle {
    margin-top: 8px;
}

/* ==========================================================
   LIAB-Combobox
========================================================== */

.liab-combobox {
    position: relative;
    width: 100%;
    max-width: 480px;
}

.liab-combobox-search {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.liab-combobox-options {
    position: absolute;
    z-index: 100;
    top: calc(100% + 4px);
    left: 0;

    width: 100%;
    max-height: 280px;
    overflow-y: auto;

    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);

    box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}

.liab-combobox-options[hidden] {
    display: none;
}

.liab-combobox-option[hidden] {
    display: none;
}

.liab-combobox-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md, 16px);

    width: 100%;
    padding: 10px 12px;

    color: var(--color-text);
    text-align: left;

    background: var(--color-surface);
    border: 0;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;

    cursor: pointer;
}

.liab-combobox-option:last-child {
    border-bottom: 0;
}

.liab-combobox-option:hover,
.liab-combobox-option:focus-visible,
.liab-combobox-option.is-active {
    background: var(--color-background);
}

.liab-combobox-option.is-selected {
    background: rgb(212 160 23 / 12%);
    border-left: 4px solid var(--color-primary);
    padding-left: 8px;
}

.liab-combobox-option.is-selected > .liab-combobox-option-name {
    font-weight: 700;
}

.liab-combobox-option-name {
    min-width: 0;
    overflow: hidden;

    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.liab-combobox-option-type {
    flex-shrink: 0;

    color: var(--color-text-light);
    font-size: 0.875rem;
    font-weight: 400;
}

/* ==========================================================
   Seitenkopf
   ========================================================== */

.page-back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: #6b7280;
    font-size: 0.95rem;
    text-decoration: none;
}

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

/* ==========================================================
   Leserolle
   ========================================================== */

.read-only-notice {
    display: flex;
    gap: 10px;
    align-items: baseline;
    margin: 14px 0 20px;
    padding: 10px 14px;
    border: 1px solid #bfdbfe;
    border-radius: var(--border-radius);
    background: #eff6ff;
    color: #1e3a5f;
    font-size: 0.9rem;
}

.read-only-form {
    opacity: 0.72;
}

.read-only-form::after {
    display: block;
    margin-top: 8px;
    color: var(--color-text-light);
    font-size: 0.85rem;
    content: "Nur für Administratoren bearbeitbar";
}

.read-only-action-notice {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: -8px 0 20px;
    padding: 13px 16px;
    border: 1px solid #fde68a;
    border-radius: var(--border-radius);
    background: #fffbeb;
    color: #78350f;
    box-shadow: 0 4px 12px rgb(120 53 15 / 7%);
}

.read-only-action-notice-icon {
    flex: 0 0 auto;
    font-size: 1.35rem;
}

.read-only-action-notice strong {
    display: block;
    margin-bottom: 2px;
}

@media (max-width: 700px) {
    .read-only-notice {
        display: block;
    }

    .read-only-notice strong {
        display: block;
        margin-bottom: 3px;
    }
}

/* Main section titles keep a consistent icon size on desktop and phones. */
.main-section-heading { display: flex; align-items: center; gap: 12px; }
.main-section-icon { display: block; width: 36px; height: 36px; flex: 0 0 36px; }
@media (max-width: 700px) {
    .main-section-heading { gap: 10px; }
    .main-section-icon { width: 32px; height: 32px; flex-basis: 32px; }
}

.main-navigation .main-navigation-account { display: inline-flex; align-items: center; gap: 6px; }
.main-navigation-account-icon { flex-shrink: 0; vertical-align: middle; }

/* Tablet header: account actions alongside the brand, main links below.
   Appointment overview keeps its existing hamburger navigation. */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    body:not(.event-list-page) .page-container { position: relative; }
    body:not(.event-list-page) .page-container > header { padding-right: 310px; }
    body:not(.event-list-page) .main-navigation { gap: 18px; font-size: 14px; }
    body:not(.event-list-page) .main-navigation-session {
        position: absolute;
        top: 24px;
        right: 32px;
        height: 44px;
        max-width: 300px;
        gap: 12px;
        white-space: nowrap;
    }
    body:not(.event-list-page) .main-navigation-session > a,
    body:not(.event-list-page) .main-navigation-logout {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
    body:not(.event-list-page) .main-navigation-account {
        max-width: 160px;
        overflow: hidden;
    }
}


/* Always-visible environment marker, independent of the local 2FA option. */
.development-banner {
    position: sticky;
    top: 0;
    z-index: 10000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 16px;
    padding: 12px 20px;
    background: #ffe066;
    color: #332600;
    border-bottom: 2px solid #b88600;
    text-align: center;
    font-size: 15px;
    line-height: 1.5;
}
.development-banner strong { letter-spacing: 0.06em; }
@media print {
    .development-banner { display: none; }
}
