/*
 * * =========================================================
 * * Ski Second Hand – style.css
 * * White Mode = Standard
 * * Dark Mode = body.dark-mode
 * * =========================================================
 */

/* ---------- Design Tokens ---------- */
@font-face {
    font-family: "Material Symbols Rounded";
    src: url("/static/fonts/MaterialSymbolsRounded.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 700;
    font-display: block;
}

.material-symbols-rounded {
    font-family: "Material Symbols Rounded";
    font-weight: normal;
    font-style: normal;
    font-size: 28px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "liga";
    font-variation-settings:
        "FILL" 0,
        "wght" 500,
        "GRAD" 0,
        "opsz" 24;
}
:root {
    --bg: #f3f6fb;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --surface-3: #e8f0ff;
    --text: #0f172a;
    --text-soft: #475569;
    --text-secondary: #475569;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-dark: #1e3a5f;
    --secondary: #334155;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: #e2e8f0;
    --shadow: 0 10px 30px rgba(15,23,42,.08);
    --shadow-strong: 0 16px 45px rgba(15,23,42,.14);
    --radius: 20px;
    --radius-lg: 28px;
}

body.dark-mode {
    --bg: #111827;
    --surface: #1f2937;
    --surface-2: #111827;
    --surface-3: #273244;
    --text: #f9fafb;
    --text-soft: #e5e7eb;
    --text-secondary: #e5e7eb;
    --muted: #cbd5e1;
    --primary: #3b82f6;
    --primary-dark: #f9fafb;
    --secondary: #475569;
    --border: #374151;
    --shadow: 0 10px 30px rgba(0,0,0,.35);
    --shadow-strong: 0 18px 50px rgba(0,0,0,.45);
}

/* ---------- Base ---------- */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

h1, h2, h3 {
    color: var(--primary-dark);
}

a {
    color: inherit;
}

button {
    font-family: inherit;
}

input, select, textarea {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-size: 16px;
}

textarea {
    padding-top: 12px;
    resize: vertical;
}

input::placeholder, textarea::placeholder {
    color: var(--muted);
}

.material-symbols-rounded {
    font-size: 28px;
    line-height: 1;
}

/* ---------- Layout ---------- */

.app-layout {
    min-height: 100vh;
}

.content {
    margin-left: 260px;
    padding: 30px;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    padding: 25px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 4px 0 20px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
}

.sidebar h2 {
    margin: 0 0 18px;
    color: var(--primary-dark);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.sidebar-logo img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.sidebar-logo h2 {
    margin: 0;
    color: var(--primary-dark);
    font-size: 1.65rem;
    font-weight: 800;
}

.user-info {
    background: var(--surface-2);
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 24px;
}

.user-info span {
    color: var(--muted);
    font-size: 14px;
}

.sidebar nav a {
    padding: 13px 15px;
    margin-bottom: 8px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: 800;
    transition: .18s ease;
}

.sidebar nav a:hover {
    background: var(--surface-2);
    transform: translateY(-1px);
}

.sidebar-bottom {
    margin-top: auto;
    padding: 20px 0;
}

.theme-toggle, .settings-button {
    width: 52px;
    height: 52px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: .25s;
}

.theme-toggle:hover, .settings-button:hover {
    transform: translateY(-2px);
    background: var(--primary);
    color: white;
}

/* ---------- Buttons ---------- */

.btn, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all .18s ease;
}

.btn:hover, button:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.btn:active, button:active {
    transform: translateY(0);
}

.btn-primary, button {
    background: var(--primary);
    color: white;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
}

.btn-disabled {
    cursor: default;
    opacity: .85;
    pointer-events: none;
}

/* ---------- Forms ---------- */

form {
    background: var(--surface);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.search-form {
    background: var(--surface);
    border-radius: 22px;
    padding: 24px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 16px;
    align-items: center;
    box-shadow: var(--shadow);
}

.search-form input {
    width: 100%;
}

.table-form, td form, .action-buttons form, .portal-actions form, .payout-actions form, .account-bottom-actions form {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.scan-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
}

.scan-form input {
    width: 100%;
    font-size: 20px;
    padding: 0 18px;
}

/* ---------- Tables ---------- */

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
}

th, td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

tr:nth-child(even) {
    background: var(--surface-2);
}

/* Globale Aktionsspalte */

table th:last-child, table td:last-child {
    width: 240px;
    text-align: center;
}

.highlight-row {
    animation: highlightScan 1.4s ease;
}

@keyframes highlightScan {
    0% {
        background: #dcfce7;
    }

    100% {
        background: transparent;
    }
}

/* ---------- Hero / Panels ---------- */

.admin-hero, .kasse-hero, .portal-hero {
    background: linear-gradient(135deg,#1e3a5f,#4b79a1);
    color: white;
    border-radius: var(--radius-lg);
    padding: 34px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    box-shadow: var(--shadow-strong);
}

body.dark-mode .admin-hero, body.dark-mode .kasse-hero, body.dark-mode .portal-hero {
    background: linear-gradient(135deg,#111827,#1f2937);
    border: 1px solid var(--border);
}

.admin-hero h1, .kasse-hero h1, .portal-hero h1 {
    margin: 0;
    color: white;
}

.admin-hero p, .kasse-hero p, .portal-hero p {
    margin: 8px 0 0;
    color: rgba(255,255,255,.88);
    font-size: 18px;
}

.status-pill, .kasse-status {
    background: rgba(255,255,255,.18);
    color: white;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 800;
    white-space: nowrap;
}

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

.dashboard-panel, .timeline-box, .info-card, .metric-card, .portal-card, .kasse-panel, .zahlung-panel {
    background: var(--surface);
    color: var(--text);
    border-radius: 26px;
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.empty-cart {
    background: var(--surface-2);
    border-radius: 22px;
    padding: 45px;
    text-align: center;
    color: var(--text-soft);
}

.empty-cart div {
    font-size: 48px;
    margin-bottom: 12px;
}

/* ---------- Dashboard ---------- */

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 24px;
    margin-bottom: 30px;
}

.metric-card {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: .2s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
}

.metric-card span {
    font-size: 34px;
    margin-bottom: 14px;
}

.metric-card h2 {
    font-size: 40px;
    margin: 0;
}

.metric-card p {
    margin: 10px 0 0;
    color: var(--muted);
}

.metric-card.green {
    background: #e8f7ee;
}

.metric-card.yellow {
    background: #fff6d8;
}

.metric-card.blue {
    background: #e8f0ff;
}

.metric-card.purple {
    background: #f1e8ff;
}

body.dark-mode .metric-card.green {
    background: #064e3b;
}

body.dark-mode .metric-card.yellow {
    background: #713f12;
}

body.dark-mode .metric-card.blue {
    background: #1e3a8a;
}

body.dark-mode .metric-card.purple {
    background: #581c87;
}

.dashboard-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

/* Meldungen */

.status-message {
    margin: 20px 0;
    padding: 16px 20px;
    border-radius: 14px;
    color: white;
    font-weight: 700;
    animation: fadeIn .25s ease;
}

.status-message.success {
    background: #14532d;
    border: 1px solid #22c55e;
}

.status-message.warning {
    background: #3f2a0b;
    border: 1px solid #f59e0b;
}

.status-message.error {
    background: #7f1d1d;
    border: 1px solid #ef4444;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Breite Statusleisten */

.status-leiste {
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    padding: 0 22px;
    margin: 12px 0 18px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
}

.status-leiste.status-offen {
    background: #fff7e6;
    color: #b45309;
    border: 1px solid #f59e0b;
}

.status-leiste.status-erledigt {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #22c55e;
}

body.dark-mode .status-leiste.status-offen {
    background: #422006;
    color: #fde68a;
    border-color: #f59e0b;
}

body.dark-mode .status-leiste.status-erledigt {
    background: #14532d;
    color: #bbf7d0;
    border-color: #22c55e;
}

.status-details {
    margin-top: 14px;
    padding-left: 4px;
}

.status-details p {
    margin: 6px 0;
    color: var(--text-secondary);
}

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

/* ---------- Kasse ---------- */

.kasse-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.total-box {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: center;
}

.total-box span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 700;
}

.total-box strong {
    font-size: 42px;
    color: var(--primary-dark);
}

body.dark-mode .total-box strong {
    color: white;
}

.money-buttons {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 14px;
    margin: 22px 0;
}

.money-buttons button {
    height: 64px;
    border-radius: 18px;
    font-size: 22px;
    font-weight: 800;
}

body.dark-mode .money-buttons button {
    background: #111827;
    color: white;
    border: 1px solid #334155;
}

body.dark-mode .money-buttons button:hover {
    background: #2563eb;
}

.payment-form {
    margin-top: 24px !important;
}

.payment-form label {
    display: block;
    margin: 14px 0 8px;
    font-weight: 800;
}

.payment-form input, .storno-form input {
    width: 100%;
    height: 50px;
}

.storno-box {
    margin-top: 34px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.storno-box h2 {
    margin: 0 0 10px;
}

.storno-box p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.storno-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ---------- Druckerstatus / Kasse / Annahme ---------- */

.drucker-status {
    margin: 20px 0;
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.drucker-ok, .drucker-fehler, .drucker-status .status-message {
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 22px;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

/* Online */

.drucker-ok, .drucker-status .status-message.success {
    background: #14532d;
    color: #dcfce7;
    border: 1px solid #22c55e;
}

/* Offline */

.drucker-fehler, .drucker-status .status-message.error {
    background: #7f1d1d;
    color: #fecaca;
    border: 1px solid #ef4444;
}

/* Checkbox */

.auto-print {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 18px;
    border-radius: 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 800;
    white-space: nowrap;
}

.auto-print input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Darkmode */

body.dark-mode .drucker-ok {
    background: #065f46;
    color: #bbf7d0;
    border-color: #16a34a;
}

body.dark-mode .drucker-fehler {
    background: #3f1d1d;
    color: #fecaca;
    border-color: #ef4444;
}

/* Lightmode */

body:not(.dark-mode) .drucker-ok {
    background: #dcfce7;
    color: #166534;
    border-color: #22c55e;
}

body:not(.dark-mode) .drucker-fehler {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #ef4444;
}

/* ---------- Annahme / Artikel ---------- */

.annahme-form, .portal-artikel-form {
    display: grid;
    grid-template-columns: 1.1fr 1.6fr 1.1fr .8fr auto;
    gap: 18px;
    align-items: end;
}

.annahme-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.annahme-form label, .portal-artikel-form label {
    font-weight: 800;
    font-size: 14px;
}

.annahme-form input, .annahme-form select, .portal-artikel-form input, .portal-artikel-form select {
    width: 100%;
    height: 48px;
}

.annahme-save, .portal-artikel-form button {
    height: 48px;
    white-space: nowrap;
}

.action-buttons, .portal-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.action-buttons form, .portal-actions form {
    margin: 0;
    display: flex;
}

.action-buttons .btn {
    min-width: 125px;
    height: 44px;
}

.portal-action {
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 14px;
    text-decoration: none;
    cursor: pointer;
    font-size: 18px;
    color: #fff;
    transition: all .2s ease;
}

.portal-action:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.portal-action.edit {
    background: #f59e0b;
}

.portal-action.delete {
    background: #ef4444;
}

.portal-actions button.portal-action {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    padding: 0;
}

.article-edit-form {
    max-width: 700px;
}

.article-edit-form .form-group {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.article-edit-form .form-group label {
    width: 160px;
    font-weight: 600;
    flex-shrink: 0;
}

.article-edit-form .form-group input, .article-edit-form .form-group select {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.required, label .required, .form-group label .required, .article-edit-form .form-group label .required, .annahme-form label .required {
    color: #ef4444 !important;
    font-weight: 900;
}

/* ---------- Auszahlung ---------- */

.payout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.payout-header h2 {
    margin-top: 0;
}

.payout-header p {
    margin-bottom: 0;
}

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

.payout-done {
    margin-top: 18px;
    color: var(--success);
    font-weight: 700;
}

.auszahlung-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
    gap: 22px;
}

.auszahlung-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow);
    transition: .2s ease;
}

.auszahlung-card:hover {
    transform: translateY(-3px);
}

.auszahlung-card-top {
    justify-content: space-between;
    margin-bottom: 18px;
}

.auszahlung-card-top p, .auszahlung-card-info p {
    margin: 8px 0;
    color: var(--text-soft);
}

.auszahlung-betrag {
    font-size: 22px;
    font-weight: 900;
    color: var(--success) !important;
}

.auszahlung-card .btn {
    width: 100%;
    height: 48px;
    margin-top: 18px;
}

/* Auszahlung Kennzahlen */

.payout-stats {
    display: grid !important;
    grid-template-columns: repeat(4,minmax(0,1fr)) !important;
    gap: 20px;
    margin: 28px 0;
    width: 100%;
}

.payout-card, .payout-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 150px;
}

.payout-card .material-symbols-rounded, .payout-stat-icon .material-symbols-rounded, .payout-stat-card .material-symbols-rounded {
    font-size: 30px;
    color: var(--primary-dark);
}

.payout-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.payout-card p, .payout-stat-card p {
    margin: 0;
    font-weight: 700;
    color: var(--text-soft);
}

.payout-card h2, .payout-stat-card h2 {
    margin: 0;
    font-size: 38px;
    color: var(--primary-dark);
}

/* ---------- Portal ---------- */

.portal-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
}

.portal-topnav {
    max-width: 1160px;
    margin: 0 auto 34px;
    padding: 16px 20px;
    background: var(--surface);
    border-radius: 0 0 24px 24px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 260px 1fr auto;
    align-items: center;
    gap: 18px;
}

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

.portal-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.portal-brand strong {
    display: block;
    font-size: 22px;
    color: var(--primary-dark);
    line-height: 1.1;
}

.portal-brand span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.portal-navlinks {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.portal-navlinks a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: 800;
    white-space: nowrap;
    transition: .2s ease;
}

.portal-navlinks a:hover {
    background: var(--surface-2);
    color: var(--primary);
    transform: translateY(-2px);
}

.portal-nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.portal-theme-toggle, .portal-profile-button {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: .25s;
}

.portal-theme-toggle:hover, .portal-profile-button:hover {
    transform: translateY(-2px);
    background: var(--primary);
    color: white;
}

.portal-theme-toggle .material-symbols-rounded, .portal-profile-button .material-symbols-rounded {
    font-size: 26px;
}

.portal-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--danger);
    color: white;
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 800;
    white-space: nowrap;
    transition: .2s ease;
}

.portal-logout:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.portal-stats {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 20px;
    margin-bottom: 35px;
}

.portal-stat {
    background: var(--surface);
    color: var(--text);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    text-decoration: none;
}

.portal-stat h2 {
    font-size: 36px;
    margin: 0;
}

.portal-stat p {
    color: var(--muted);
}

.portal-section-title {
    margin: 10px 0 18px;
}

.portal-section-title h2 {
    margin: 0;
    font-size: 28px;
}

.portal-artikel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(360px,1fr));
    gap: 24px;
    align-items: stretch;
}

.portal-artikel-card {
    background: var(--surface);
    border-radius: 24px;
    padding: 26px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 22px;
    text-align: left;
}

.portal-artikel-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 22px;
}

.portal-artikel-category {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
}

.portal-artikel-card h3 {
    margin: 0;
    font-size: 26px;
    line-height: 1.15;
}

.portal-artikel-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 15px;
}

.portal-artikel-meta span {
    background: var(--surface-2);
    border-radius: 999px;
    padding: 8px 12px;
}

.portal-artikel-bottom {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.portal-price, .preis {
    font-size: 28px;
    font-weight: 950;
    color: var(--secondary);
    white-space: nowrap;
}

body.dark-mode .portal-price, body.dark-mode .preis {
    color: var(--text);
}

.portal-button {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 14px;
    text-decoration: none;
}

.portal-closed-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 45px 30px;
    border: 2px dashed #fca5a5;
    border-radius: 20px;
    background: #fff7f7;
    color: #7f1d1d;
}

.portal-closed-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff1f1;
    border: 1px solid #ffb8b8;
    border-radius: 16px;
    color: #e53935;
}

body.dark-mode .portal-closed-box {
    background: #3f1d1d;
    color: #fecaca;
    border-color: #ef4444;
}

/* ---------- Startseite ---------- */

.start-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.start-card {
    width: 420px;
    max-width: 90%;
    background: var(--surface);
    padding: 44px;
    border-radius: 28px;
    text-align: center;
    box-shadow: var(--shadow-strong);
}

.start-logo {
    width: 110px;
    margin-bottom: 20px;
}

.start-card h1 {
    margin: 0;
    font-size: 34px;
}

.start-card p {
    color: var(--muted);
    margin: 14px 0 32px;
}

.start-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.start-button {
    width: 100%;
    justify-content: center;
    font-size: 18px;
    padding: 16px;
}

/* ---------- Einstellungen ---------- */

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 30px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setting-item label, .setting-check {
    font-weight: 800;
}

.setting-check {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setting-check input {
    width: 20px;
    height: 20px;
}

.time-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.settings-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-buttons form {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* ---------- Kategorien / Farben ---------- */

.kategorien-table, .farben-table {
    table-layout: fixed;
}

.kategorien-table th:nth-child(1), .kategorien-table td:nth-child(1), .farben-table th:nth-child(1), .farben-table td:nth-child(1) {
    width: 50%;
}

.kategorien-table th:nth-child(2), .kategorien-table td:nth-child(2), .farben-table th:nth-child(2), .farben-table td:nth-child(2) {
    width: 160px;
    text-align: center;
}

.kategorien-table th:nth-child(3), .kategorien-table td:nth-child(3), .farben-table th:nth-child(3), .farben-table td:nth-child(3) {
    width: 260px !important;
    text-align: right !important;
}

.kategorien-table td:nth-child(3) .action-buttons, .farben-table td:nth-child(3) .action-buttons {
    justify-content: flex-end;
}

/* ---------- Toasts ---------- */

#toast-container {
    position: fixed;
    top: 25px;
    right: 25px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 99999;
}

.toast {
    min-width: 320px;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 18px;
    color: white;
    font-weight: 800;
    box-shadow: 0 18px 45px rgba(0,0,0,.28);
    animation: toastIn .32s ease;
}

.toast-text {
    line-height: 1.35;
}

.toast-success {
    background: #16a34a;
}

.toast-error {
    background: #dc2626;
}

.toast-warning {
    background: #d97706;
}

.toast-info {
    background: #2563eb;
}

.toast-hide {
    opacity: 0;
    transform: translateX(120px);
    transition: .4s ease;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(120px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ---------- Misc ---------- */

.progress-bar {
    width: 100%;
    height: 18px;
    background: var(--surface-2);
    border-radius: 999px;
    overflow: hidden;
    margin: 18px 0;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg,#16a34a,#22c55e);
    border-radius: 999px;
}

.progress-info {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
}

.danger-link {
    color: var(--danger) !important;
}

.full-width {
    width: 100%;
    justify-content: center;
}

/* ---------- Responsive ---------- */

@media (max-width:1200px) {
    .admin-dashboard-grid, .portal-stats {
        grid-template-columns: repeat(2,1fr);
    }

    .kasse-layout {
        grid-template-columns: 1fr;
    }

    .annahme-form, .portal-artikel-form {
        grid-template-columns: 1fr 1fr;
    }

    .payout-stats {
        grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    }
}

@media (max-width:1050px) {
    .portal-topnav {
        grid-template-columns: 1fr;
    }

    .portal-navlinks {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .portal-logout {
        justify-self: start;
    }
}

@media (max-width:900px) {
    .content {
        margin-left: 0;
        padding: 20px;
    }

    .sidebar {
        position: relative;
        width: auto;
        min-height: auto;
    }

    .admin-hero, .kasse-hero, .portal-header, .payout-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    .dashboard-two-columns, .settings-grid, .portal-stats, .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width:700px) {
    #toast-container {
        left: 16px;
        right: 16px;
        top: 16px;
    }

    .toast {
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .payout-stats {
        grid-template-columns: 1fr !important;
    }
}

.dashboard-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 26px;
    min-height: 150px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
}

.dashboard-stat-card .material-symbols-rounded {
    font-size: 30px;
    color: var(--primary-dark);
}

.dashboard-stat-card p {
    margin: 0;
    color: var(--text-soft);
    font-weight: 700;
}

.dashboard-stat-card h2 {
    margin: 0;
    font-size: 38px;
    color: var(--primary-dark);
}

.portal-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
}

@media (max-width:1200px) {
    .portal-dashboard-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

@media (max-width:700px) {
    .portal-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.auszahlung-card .status-offen {
    height: 34px;
}

.auszahlung-card-top .status-offen {
    flex-shrink: 0;
}

/* Gemeinsamer Stil */

.checkout-button, .storno-form button {
    width: 100%;
    height: 58px;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    transition: .2s ease;
    cursor: pointer;
}

/* Verkauf */

.checkout-button {
    background: #16a34a;
    color: #fff;
}

.checkout-button:hover {
    background: #15803d;
}

/* Warenkorb leeren */

.clear-cart-button {
    background: #334155;
    color: #fff;
}

.clear-cart-button:hover {
    background: #1e293b;
}

/* Verkauf stornieren */

.storno-form button {
    background: #ef4444;
    color: #fff;
}

.storno-form button:hover {
    background: #dc2626;
}

.portal-status-balken {
    width: 100%;
    min-height: 52px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    margin: 14px 0;
    border: 1px solid transparent;
}

.portal-status-ok {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.portal-status-error {
    background: #4a1f1f;
    color: #f8d7da;
    border-color: #ef4444;
}

body.dark-mode .portal-status-ok {
    background: #14532d;
    color: #bbf7d0;
    border: 1px solid #22c55e;
}

body.dark-mode .portal-status-error {
    background: #4a1f1f;
    color: #f8d7da;
    border-color: #ef4444;
}

/* Aktiv = Grün */

/* Inaktiv = Gelb */

.toast-icon {
    font-family: "Material Symbols Rounded";
    font-weight: normal;
    font-style: normal;
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
}

.search-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-actions .btn {
    white-space: nowrap;
}

.auszahlung-card-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
}

.auszahlung-card-top > div {
    min-width: 0;
}

.auszahlung-card-top h3 {
    margin: 0 0 8px;
    overflow-wrap: anywhere;
}

.auszahlung-card .status-offen {
    width: auto;
    min-width: 82px;
    min-height: 34px;
    margin: 0;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.auszahlung-card .status-ausgezahlt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 96px;
    min-height: 34px;
    padding: 0 12px;
    margin: 0;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}

body.dark-mode .auszahlung-card .status-ausgezahlt {
    background: #14532d;
    color: #bbf7d0;
    border-color: #22c55e;
}

.auszahlung-card {
    position: relative;
}

.delete-client-form {
    position: absolute;
    top: 16px;
    right: 16px;
}

.delete-client-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #ef4444;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
}

.delete-client-btn:hover {
    background: rgba(239,68,68,.12);
}

.delete-client-btn .material-symbols-rounded {
    font-size: 22px;
}

.reset-section {
    padding: 30px;
}

.reset-header {
    margin-bottom: 24px;
}

.reset-header h2 {
    margin: 0 0 8px;
}

.reset-header p {
    margin: 0;
    color: var(--text-soft);
}

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

.reset-card {
    min-width: 0;
    min-height: 330px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 20px;
}

.reset-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--surface);
    color: var(--primary-dark);
    border: 1px solid var(--border);
}

.reset-card-icon .material-symbols-rounded {
    font-size: 27px;
}

.reset-card-content {
    flex: 1;
}

.reset-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

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

.reset-card form {
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.reset-card form input {
    width: 100%;
}

.reset-confirm-label {
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.45;
}

.reset-confirm-label strong {
    color: var(--danger);
}

.reset-button {
    width: 100%;
    min-height: 50px;
}

.reset-card-warning {
    border-top: 4px solid #f59e0b;
}

.reset-card-danger {
    border-top: 4px solid #ef4444;
}

.reset-card-critical {
    border-top: 4px solid #991b1b;
}

body.dark-mode .reset-card {
    background: var(--surface-2);
}

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

    .reset-card {
        min-height: 0;
    }
}

/*
 * * =========================================================
 * * Börsensteuerung
 * * =========================================================
 */

.boersensteuerung-panel {
    padding: 30px;
}

.boersensteuerung-header {
    margin-bottom: 24px;
}

.boersensteuerung-header h2 {
    margin: 0 0 8px;
}

.boersensteuerung-liste {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.steuerungs-balken {
    min-height: 104px;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.steuerungs-info {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 18px;
}

.steuerungs-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    color: var(--primary-dark);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.steuerungs-icon .material-symbols-rounded {
    font-size: 28px;
}

.steuerungs-info h3 {
    margin: 0 0 7px;
    color: var(--text);
    font-size: 18px;
}

.steuerungs-info p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.45;
}

.steuerungs-schalter {
    min-width: 190px;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 18px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 15px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.steuerungs-schalter:hover {
    border-color: var(--primary);
}

.steuerungs-schalter input {
    width: 20px;
    height: 20px;
    min-height: 0;
    margin: 0;
    accent-color: var(--success);
    cursor: pointer;
}

.steuerungs-schalter.ist-aktiv {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

body.dark-mode .steuerungs-balken {
    background: var(--surface-2);
}

body.dark-mode .steuerungs-schalter {
    background: #111827;
    color: var(--text);
    border-color: var(--border);
}

body.dark-mode .steuerungs-schalter.ist-aktiv {
    background: #14532d;
    color: #bbf7d0;
    border-color: #22c55e;
}

@media (max-width:800px) {
    .steuerungs-balken {
        flex-direction: column;
        align-items: stretch;
    }

    .steuerungs-schalter {
        width: 100%;
    }
}

.portal-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: var(--bg);
}

.portal-login-card {
    width: 100%;
    max-width: 460px;
    padding: 34px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow-strong);
}

.portal-login-header {
    margin-bottom: 26px;
}

.portal-login-header h1 {
    margin: 0 0 8px;
}

.portal-login-header p {
    margin: 0;
    color: var(--text-soft);
}

.portal-login-form {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.portal-login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.portal-login-form label {
    font-weight: 800;
}

.portal-login-form input {
    width: 100%;
}

.portal-login-register {
    text-align: center;
}

/*
 * * =========================================================
 * * Einstellungen – Zusatzgestaltung
 * * Ganz unten an static/style.css anhängen
 * * =========================================================
 */

.settings-main-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-section {
    padding: 30px;
}

.settings-section-title {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.settings-section-title > .material-symbols-rounded, .settings-title-left > .material-symbols-rounded {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--surface-2);
    color: var(--primary-dark);
    border: 1px solid var(--border);
    font-size: 28px;
}

.settings-section-title h2 {
    margin: 0 0 6px;
}

.settings-section-title p {
    margin: 0;
    color: var(--text-soft);
}

.settings-section-title-actions {
    justify-content: space-between;
}

.settings-title-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.settings-times .setting-item, .settings-finance .setting-item, .settings-backup .settings-buttons, .settings-free-label .free-label-form {
    padding: 22px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.settings-times .setting-item {
    margin: 0;
}

.settings-times .setting-item > label {
    display: block;
    margin-bottom: 14px;
    font-size: 16px;
    font-weight: 800;
}

.settings-times .time-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-times .time-row input {
    flex: 1;
    min-width: 0;
}

.settings-times .time-row span {
    color: var(--text-soft);
    font-weight: 700;
}

.settings-finance .setting-item {
    display: grid;
    grid-template-columns: 1fr minmax(180px,260px);
    align-items: center;
    gap: 24px;
}

.settings-finance .setting-item label {
    font-size: 17px;
    font-weight: 800;
}

.settings-backup .settings-buttons {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 18px;
}

.settings-backup .settings-buttons > a, .settings-backup .settings-buttons > form {
    min-height: 150px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.settings-backup .settings-buttons > form {
    margin: 0;
    box-shadow: none;
}

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

.settings-print .auszahlung-card {
    position: relative;
    min-width: 0;
    padding: 22px;
    border-radius: 18px;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.settings-print .account-bottom-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.settings-print .account-bottom-actions form, .settings-print .account-bottom-actions button {
    width: 100%;
}

.settings-free-label .free-label-form {
    display: grid;
    grid-template-columns: minmax(240px,.8fr) minmax(320px,1.2fr);
    gap: 18px;
    margin: 0;
    box-shadow: none;
}

.settings-free-label .setting-item {
    margin: 0;
}

.settings-free-label textarea {
    width: 100%;
    min-height: 140px;
    resize: vertical;
}

.settings-free-label .btn {
    align-self: end;
    min-height: 50px;
}

.save-panel {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.save-button {
    min-width: 260px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.boersensteuerung-header p {
    margin: 8px 0 0;
    color: var(--text-soft);
}

.steuerungs-balken {
    transition: border-color .18s ease, background .18s ease;
}

.steuerungs-schalter {
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}

body.dark-mode .settings-times .setting-item, body.dark-mode .settings-finance .setting-item, body.dark-mode .settings-backup .settings-buttons, body.dark-mode .settings-free-label .free-label-form, body.dark-mode .settings-print .auszahlung-card {
    background: var(--surface-2);
}

@media (max-width:900px) {
    .settings-times .settings-grid, .settings-backup .settings-buttons, .settings-free-label .free-label-form {
        grid-template-columns: 1fr;
    }

    .settings-section-title-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-finance .setting-item {
        grid-template-columns: 1fr;
    }
}

@media (max-width:700px) {
    .settings-section {
        padding: 22px;
    }

    .settings-times .time-row {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-print .account-bottom-actions {
        grid-template-columns: 1fr;
    }
}

/* Datensicherung sauber ausrichten */

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

.settings-action-card {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
}

.settings-action-card .btn {
    width: 100%;
    min-height: 48px;
}

.settings-inline-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.settings-inline-form input[type="file"] {
    width: 100%;
    min-height: 46px;
    padding: 10px;
}

/* Drucksystem */

.settings-section-header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.druckclient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 420px));
    gap: 20px;
    justify-content: start;
}

.druckclient-card {
    width: 100%;
    min-height: 300px;
}

.druckclient-card .account-bottom-actions form, .druckclient-card .account-bottom-actions button {
    width: 100%;
}

/* Freies Etikett */

.free-label-form .setting-item {
    margin: 0;
}

.free-label-form select, .free-label-form textarea {
    width: 100%;
}

.free-label-form textarea {
    min-height: 150px;
    resize: vertical;
}

/* Responsive */

@media (max-width:900px) {
    .settings-card-grid-2, .free-label-form {
        grid-template-columns: 1fr;
    }

    .settings-section-header-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-section-header-actions .btn {
        width: 100%;
    }

    .free-label-submit {
        grid-column: auto;
    }
}

.free-label-form {
    display: grid;
    grid-template-columns: minmax(260px,.8fr) minmax(420px,1.2fr);
    gap: 22px;
    align-items: start;
    margin: 0;
    padding: 24px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.free-label-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.free-label-field label {
    font-weight: 800;
    color: var(--text);
}

.free-label-field select, .free-label-field textarea {
    width: 100%;
}

.free-label-field textarea {
    min-height: 150px;
    resize: vertical;
}

.free-label-hint {
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.4;
}

.free-label-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--text-soft);
    font-size: 13px;
}

.free-label-submit {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

@media (max-width:850px) {
    .free-label-form {
        grid-template-columns: 1fr;
    }

    .free-label-submit {
        grid-column: auto;
    }
}

.druckclient-card .account-bottom-actions {
    grid-template-columns: 1fr 1fr;
}

.druckclient-card .account-bottom-actions form {
    width: 100%;
}

.druckclient-card .account-bottom-actions .btn {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.status-badge {
    min-width: 64px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 20px;
}

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

.badge-red {
    background: #4b5563;
    color: #fff;
}

.empty-cart h2 {
    margin-top: 14px;
    margin-bottom: 10px;
    font-size: 34px;
}

.empty-cart p {
    max-width: 520px;
    margin: 0 auto 30px;
    color: var(--text-soft);
    line-height: 1.6;
}

.error-page-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.error-page-card {
    width: 100%;
    max-width: 760px;
    min-height: 430px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    text-align: center;
}

.error-page-icon {
    margin-bottom: 10px;
    font-size: 58px;
    color: #f59e0b;
}

.error-page-code {
    margin: 0 0 10px;
    font-size: 76px;
    line-height: 1;
    font-weight: 900;
    color: var(--primary);
}

.error-page-card h1 {
    margin: 0 0 12px;
    font-size: 34px;
    color: var(--text);
}

.error-page-card p {
    max-width: 520px;
    margin: 0 0 28px;
    color: var(--text-soft);
    line-height: 1.6;
}

@media (max-width:700px) {
    .error-page-content {
        padding: 18px;
    }

    .error-page-card {
        min-height: 360px;
        padding: 30px 22px;
    }

    .error-page-code {
        font-size: 60px;
    }

    .error-page-card h1 {
        font-size: 27px;
    }
}

.portal-error-card {
    min-height: 430px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    text-align: center;
}

.portal-error-icon {
    margin-bottom: 10px;
    font-size: 58px;
    color: #f59e0b;
}

.portal-error-code {
    margin-bottom: 12px;
    font-size: 76px;
    line-height: 1;
    font-weight: 900;
    color: var(--primary);
}

.portal-error-card h2 {
    margin: 0 0 12px;
    font-size: 30px;
}

.portal-error-card p {
    max-width: 520px;
    margin: 0 0 28px;
    color: var(--text-soft);
    line-height: 1.6;
}

@media (max-width:700px) {
    .portal-error-card {
        min-height: 360px;
        padding: 30px 22px;
    }

    .portal-error-code {
        font-size: 60px;
    }

    .portal-error-card h2 {
        font-size: 25px;
    }
}

.drucker-status .steuerungs-schalter {
    min-width: 260px;
    min-height: 56px;
    margin: 0;
}

.drucker-status .steuerungs-schalter input {
    width: 20px;
    height: 20px;
    margin: 0;
}

.action-buttons .btn-icon {
    transition: all .2s ease;
}

.action-buttons .btn-danger {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
}

.action-buttons .btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.drucker-status .auto-bon-schalter {
    min-width: 270px;
    min-height: 56px;
    margin: 0;
}

/*
 * * =========================================================
 * * Kasse – Zahlungsbereich aufgeräumt
 * * =========================================================
 */

.zahlung-panel {
    display: flex;
    flex-direction: column;
}

/* Das Formular mit Gegeben und Rückgeld soll keine eigene Karte sein */

.zahlung-panel .payment-form {
    margin: 22px 0 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.zahlung-panel .payment-form label {
    display: block;
    margin: 16px 0 8px;
    font-weight: 800;
}

.zahlung-panel .payment-form input {
    width: 100%;
    height: 50px;
}

/* Eine gemeinsame hervorgehobene Box für beide Aktionen */

.checkout-box {
    width: 100%;
    margin-top: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: none;
}

/* Globale Form-Karten innerhalb der Checkout-Box neutralisieren */

.checkout-box form, .zahlung-panel .checkout-box form, form[action="/kasse_clear"].checkout-form {
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    display: block;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.checkout-box .checkout-button, .checkout-box .clear-cart-button {
    width: 100%;
    min-height: 56px;
    margin: 0;
    border-radius: 14px;
}

/* Sauberer Abstand zur Stornierung */

.zahlung-panel .storno-box {
    margin-top: 30px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

/*
 * * =========================================================
 * * Einheitliche graue Buttons
 * * Muss ganz unten in style.css stehen
 * * =========================================================
 */

:root {
    --button-gray: #334155;
    --button-gray-hover: #1e293b;
    --button-gray-border: #475569;
    --button-gray-text: #ffffff;
}

body.dark-mode {
    --button-gray: #3b4a60;
    --button-gray-hover: #4b5d76;
    --button-gray-border: #64748b;
    --button-gray-text: #ffffff;
}

/* Alle normalen Buttons und Links mit Button-Darstellung */

.btn, button, .portal-button, .portal-logout, .start-button, .checkout-button, .clear-cart-button, .storno-form button, .portal-action, .delete-client-btn {
    background: var(--button-gray) !important;
    color: var(--button-gray-text) !important;
    border: 1px solid var(--button-gray-border) !important;
    box-shadow: none;
    transition: background .18s ease, border-color .18s ease, transform .18s ease, filter .18s ease;
}

/* Einheitlicher Hover */

.btn:hover, button:hover, .portal-button:hover, .portal-logout:hover, .start-button:hover, .checkout-button:hover, .clear-cart-button:hover, .storno-form button:hover, .portal-action:hover, .delete-client-btn:hover {
    background: var(--button-gray-hover) !important;
    color: #ffffff !important;
    border-color: var(--button-gray-hover) !important;
    filter: none;
    transform: translateY(-2px);
}

/* Beim Anklicken */

.btn:active, button:active, .portal-button:active, .portal-logout:active, .start-button:active, .checkout-button:active, .clear-cart-button:active, .storno-form button:active, .portal-action:active, .delete-client-btn:active {
    transform: translateY(0);
}

/* Primär-, Sekundär- und Statusbuttons ebenfalls grau */

.btn-primary, .btn-secondary, .btn-success, .btn-warning, .btn-danger {
    background: var(--button-gray) !important;
    color: #ffffff !important;
    border-color: var(--button-gray-border) !important;
}

/* Tabellenaktionen wie in annahme_person */

.action-buttons .btn, .action-buttons .btn-icon, .portal-actions .btn, .portal-actions .portal-action {
    background: var(--button-gray) !important;
    color: #ffffff !important;
    border: 1px solid var(--button-gray-border) !important;
}

/* Auch Löschen bleibt standardmäßig grau */

.action-buttons .btn-danger, .action-buttons .delete-action-button, .portal-action.delete {
    background: var(--button-gray) !important;
    color: #ffffff !important;
    border-color: var(--button-gray-border) !important;
}

/* Schnellwahl in der Kasse */

.money-buttons button {
    background: var(--button-gray) !important;
    color: #ffffff !important;
    border: 1px solid var(--button-gray-border) !important;
}

.money-buttons button:hover {
    background: var(--button-gray-hover) !important;
    color: #ffffff !important;
}

/* Runde Navigationsbuttons */

.theme-toggle, .settings-button, .portal-theme-toggle, .portal-profile-button {
    background: var(--button-gray) !important;
    color: #ffffff !important;
    border: 1px solid var(--button-gray-border) !important;
}

.theme-toggle:hover, .settings-button:hover, .portal-theme-toggle:hover, .portal-profile-button:hover {
    background: var(--button-gray-hover) !important;
    color: #ffffff !important;
}

/* Deaktivierte Buttons */

button:disabled, .btn-disabled {
    background: var(--button-gray) !important;
    color: #ffffff !important;
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

/* Portal Auszahlungsstatus – White Mode */

body:not(.dark-mode) .portal-status-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #ef4444;
}

body:not(.dark-mode) .portal-status-error .material-symbols-rounded {
    color: #dc2626;
}

/* Kategorien/Farben – Aktionen sauber zentrieren */

.kategorien-table th:last-child, .farben-table th:last-child {
    text-align: center !important;
    padding-left: 0;
    padding-right: 0;
}

.kategorien-table td:last-child, .farben-table td:last-child {
    text-align: center !important;
}

.kategorien-table td:last-child .action-buttons, .farben-table td:last-child .action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

/*
 * * ==========================================
 * * White Mode – Buttons heller
 * * ==========================================
 */

body:not(.dark-mode) .btn-secondary, body:not(.dark-mode) .btn-danger, body:not(.dark-mode) .btn-icon, body:not(.dark-mode) .clear-cart-button {
    background: #475569;
    color: #fff;
    border: 1px solid #64748b;
}

body:not(.dark-mode) .btn-secondary:hover, body:not(.dark-mode) .btn-danger:hover, body:not(.dark-mode) .btn-icon:hover, body:not(.dark-mode) .clear-cart-button:hover {
    background: #64748b;
    border-color: #64748b;
}

/*
 * * =========================================================
 * * White Mode – helle Buttons und neutrale Hero-Leisten
 * * Muss ganz unten in style.css stehen
 * * =========================================================
 */

/* Helle Buttons im White Mode */

body:not(.dark-mode) .btn, body:not(.dark-mode) button:not(.theme-toggle):not(.settings-button), body:not(.dark-mode) .portal-button, body:not(.dark-mode) .portal-logout, body:not(.dark-mode) .start-button, body:not(.dark-mode) .checkout-button, body:not(.dark-mode) .clear-cart-button, body:not(.dark-mode) .storno-form button, body:not(.dark-mode) .portal-action, body:not(.dark-mode) .delete-client-btn {
    background: #e2e8f0 !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
}

/* Hover im White Mode */

body:not(.dark-mode) .btn:hover, body:not(.dark-mode) button:hover, body:not(.dark-mode) .portal-button:hover, body:not(.dark-mode) .portal-logout:hover, body:not(.dark-mode) .start-button:hover, body:not(.dark-mode) .checkout-button:hover, body:not(.dark-mode) .clear-cart-button:hover, body:not(.dark-mode) .storno-form button:hover, body:not(.dark-mode) .portal-action:hover, body:not(.dark-mode) .delete-client-btn:hover {
    background: #cbd5e1 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

/* Aktionsbuttons ebenfalls hell */

body:not(.dark-mode) .action-buttons .btn, body:not(.dark-mode) .action-buttons .btn-icon, body:not(.dark-mode) .portal-actions .btn, body:not(.dark-mode) .portal-actions .portal-action {
    background: #e2e8f0 !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
}

/* Geldbuttons in der Kasse */

body:not(.dark-mode) .money-buttons button {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
}

body:not(.dark-mode) .money-buttons button:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

/* Hero-Leisten im White Mode ohne blauen Rand */

body:not(.dark-mode) .admin-hero, body:not(.dark-mode) .kasse-hero, body:not(.dark-mode) .portal-hero {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
    border-left: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 30px rgba(15,23,42,.08) !important;
}

/* Überschriften im Hero */

body:not(.dark-mode) .admin-hero h1, body:not(.dark-mode) .kasse-hero h1, body:not(.dark-mode) .portal-hero h1 {
    color: #1e3a5f !important;
}

/* Untertexte im Hero */

body:not(.dark-mode) .admin-hero p, body:not(.dark-mode) .kasse-hero p, body:not(.dark-mode) .portal-hero p {
    color: #475569 !important;
}

/*
 * * =========================================================
 * * White Mode – Sidebar Buttons
 * * =========================================================
 */

body:not(.dark-mode) .theme-toggle, body:not(.dark-mode) .settings-button {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
}

body:not(.dark-mode) .theme-toggle:hover, body:not(.dark-mode) .settings-button:hover {
    background: #cbd5e1 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

body:not(.dark-mode) .theme-toggle .material-symbols-rounded, body:not(.dark-mode) .settings-button .material-symbols-rounded {
    font-size: 26px;
    color: #1e293b !important;
}

body:not(.dark-mode) .theme-toggle:hover .material-symbols-rounded, body:not(.dark-mode) .settings-button:hover .material-symbols-rounded {
    color: #0f172a !important;
}

/* Auszahlung - Status Offen */

.auszahlung-card .status-offen {
    background: #fff7e6 !important;
    color: #c56a00 !important;
    border: 1px solid #f59e0b !important;
}

body.dark-mode .auszahlung-card .status-offen {
    background: #422006 !important;
    color: #fde68a !important;
    border-color: #f59e0b !important;
}

/* Druckclient Aktionen */

.druckclient-card .account-bottom-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.druckclient-card .account-bottom-actions form {
    margin: 0;
    padding: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.druckclient-card .account-bottom-actions .btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.druckclient-card .delete-client-form {
    position: absolute;
    top: 18px;
    right: 18px;
    margin: 0;
    padding: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/*
 * * =========================================================
 * * Interner Login
 * * =========================================================
 */

.login-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--surface-2);
    color: var(--primary-dark);
    border: 1px solid var(--border);
}

.login-icon .material-symbols-rounded {
    font-size: 32px;
}

.login-error {
    width: 100%;
    margin-bottom: 22px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #ef4444;
    font-weight: 800;
}

body.dark-mode .login-error {
    background: #451a1a;
    color: #fecaca;
    border-color: #ef4444;
}

.login-error .material-symbols-rounded {
    font-size: 23px;
}

.login-footer {
    margin-top: 22px;
    padding-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 700;
}

.login-footer .material-symbols-rounded {
    font-size: 20px;
}

/*
 * * =========================================================
 * * Portal Login – Feinschliff
 * * =========================================================
 */

.portal-login-card .login-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: var(--surface-2);
    color: var(--primary-dark);
    border: 1px solid var(--border);
}

.portal-login-card .login-icon .material-symbols-rounded {
    font-size: 34px;
}

.portal-login-header {
    text-align: center;
}

.portal-login-form .btn {
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.portal-login-form .btn .material-symbols-rounded {
    font-size: 22px;
}

.portal-login-register {
    margin: 22px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-soft);
    font-size: 14px;
}

.portal-login-register a {
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
}

.portal-login-register a:hover {
    text-decoration: underline;
}

.portal-closed-note {
    margin-top: 20px;
    padding-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid rgba(239,68,68,.25);
    font-size: 14px;
    font-weight: 700;
}

.portal-closed-note .material-symbols-rounded {
    font-size: 20px;
}

/*
 * * =========================================================
 * * Portal-Navigation – White Mode
 * * =========================================================
 */

body:not(.dark-mode) .portal-theme-toggle, body:not(.dark-mode) .portal-profile-button {
    background: #e2e8f0 !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
}

body:not(.dark-mode) .portal-theme-toggle:hover, body:not(.dark-mode) .portal-profile-button:hover {
    background: #cbd5e1 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

body:not(.dark-mode) .portal-theme-toggle .material-symbols-rounded, body:not(.dark-mode) .portal-profile-button .material-symbols-rounded {
    color: #1e293b !important;
}

body:not(.dark-mode) .portal-theme-toggle:hover .material-symbols-rounded, body:not(.dark-mode) .portal-profile-button:hover .material-symbols-rounded {
    color: #0f172a !important;
}

/*
 * * =========================================================
 * * Startseite
 * * =========================================================
 */

.landing-page {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #17243a;
    background: radial-gradient( circle at 10% 10%, rgba(255, 210, 57, 0.14), transparent 28% ), linear-gradient( 135deg, #f8fafc 0%, #edf2f7 100% );
}

.landing-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 20px;
}

.landing-card {
    width: 100%;
    max-width: 760px;
    padding: 44px 48px 34px;
    background: #ffffff;
    border: 1px solid #e3e9f0;
    border-radius: 30px;
    box-shadow: 0 28px 70px rgba(28, 46, 70, 0.12), 0 6px 18px rgba(28, 46, 70, 0.06);
    text-align: center;
}

.landing-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.landing-logo {
    display: block;
    width: min(100%, 300px);
    max-height: 118px;
    object-fit: contain;
}

.landing-heading {
    margin-bottom: 34px;
}

.landing-heading h1 {
    margin: 0;
    color: #17243a;
    font-size: clamp(40px, 6vw, 58px);
    line-height: 1.02;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.landing-heading h1 span {
    display: block;
}

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

.landing-option {
    min-height: 210px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    border-radius: 22px;
    text-align: left;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.landing-option:hover {
    transform: translateY(-5px);
}

.landing-option-primary {
    color: #ffffff;
    border: 1px solid #203857;
    background: linear-gradient( 145deg, #1b2d47 0%, #29496f 100% );
    box-shadow: 0 18px 34px rgba(31, 54, 85, 0.18);
}

.landing-option-primary:hover {
    box-shadow: 0 24px 42px rgba(31, 54, 85, 0.24);
}

.landing-option-secondary {
    color: #17243a;
    border: 1px solid #dce4ed;
    background: linear-gradient( 180deg, #ffffff 0%, #fbfcfe 100% );
}

.landing-option-secondary:hover {
    border-color: #cbd6e2;
    box-shadow: 0 20px 36px rgba(28, 46, 70, 0.10);
}

.landing-option-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 34px;
    border-radius: 17px;
}

.landing-option-icon .material-symbols-rounded {
    font-size: 30px;
}

.landing-option-primary .landing-option-icon {
    color: #ffd53d;
    background: rgba(255, 255, 255, 0.12);
}

.landing-option-secondary .landing-option-icon {
    color: #17243a;
    background: #edf2f7;
}

.landing-option-title {
    max-width: 210px;
    font-size: 21px;
    font-weight: 750;
    line-height: 1.25;
}

.landing-option-arrow {
    width: 42px;
    height: 42px;
    position: absolute;
    right: 22px;
    bottom: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.landing-option-arrow .material-symbols-rounded {
    font-size: 24px;
}

.landing-option-primary .landing-option-arrow {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.landing-option-secondary .landing-option-arrow {
    color: #17243a;
    background: #edf2f7;
}

.landing-footer {
    margin-top: 34px;
    color: #9aa5b4;
    font-size: 12px;
}

@media (max-width: 700px) {
    .landing-shell {
        align-items: flex-start;
        padding: 18px 14px;
    }

    .landing-card {
        padding: 32px 20px 28px;
        border-radius: 24px;
    }

    .landing-logo {
        width: min(100%, 250px);
        max-height: 100px;
    }

    .landing-heading h1 {
        font-size: 42px;
    }

    .landing-actions {
        grid-template-columns: 1fr;
    }

    .landing-option {
        min-height: 170px;
    }

    .landing-option-icon {
        margin-bottom: 26px;
    }
}

.portal-closed-icon .material-symbols-rounded {
    font-size: 34px;
    line-height: 1;
}

.empty-cart-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
}

.empty-cart-icon .material-symbols-rounded {
    font-size: 70px;
    color: #94a3b8;
}

.portal-action {
    display: flex;
    justify-content: center;
    align-items: center;
}

.portal-action .material-symbols-rounded {
    font-size: 22px;
    line-height: 1;
}

/*
 * * =========================================================
 * * Portal – Artikel bearbeiten
 * * =========================================================
 */

.portal-hero-edit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.portal-hero-content {
    min-width: 0;
}

.portal-hero-content h1 {
    margin-bottom: 10px;
}

.portal-hero-content p {
    margin: 0;
}

.portal-back-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.portal-back-button .material-symbols-rounded {
    font-size: 20px;
}

.portal-form-actions {
    display: flex;
    align-items: center;
    grid-column: 1 / -1;
}

.portal-form-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.portal-form-actions .material-symbols-rounded {
    font-size: 20px;
}

@media (max-width: 760px) {
    .portal-hero-edit {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-back-button {
        width: 100%;
    }
}

/*
 * * =========================================================
 * * Datensicherung
 * * =========================================================
 */

.backup-layout {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.backup-compact-card, .backup-auto-panel {
    border: 1px solid #d7e0eb;
    border-radius: 18px;
    background: #f4f7fb;
    padding: 20px;
}

.backup-compact-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.backup-compact-header {
    display: flex;
    align-items: center;
    gap: 13px;
}

.backup-compact-header h3 {
    margin: 0;
}

.backup-full-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    text-align: left;
    padding-left: 18px;
}

.backup-compact-restore-form input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #cfd9e5;
    border-radius: 11px;
    background: #ffffff;
    color: #102f5a;
}

.backup-auto-panel {
    min-width: 0;
}

.backup-auto-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.backup-status-badge {
    white-space: nowrap;
}

.backup-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: currentColor;
}

.backup-settings-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
}

.backup-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px;
    border: 1px solid #d7e0eb;
    border-radius: 13px;
    background: #ffffff;
}

.settings-toggle {
    position: relative;
    width: 50px;
    height: 28px;
    flex: 0 0 50px;
}

.settings-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.settings-toggle-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    border-radius: 999px;
    background: #c8d1dd;
    transition: 0.2s ease;
}

.settings-toggle-slider::before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    top: 3px;
    left: 3px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(20, 35, 55, 0.25);
    transition: 0.2s ease;
}

.settings-toggle input:checked + .settings-toggle-slider {
    background: #104584;
}

.settings-toggle input:checked + .settings-toggle-slider::before {
    transform: translateX(22px);
}

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

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

.backup-field label {
    font-weight: 700;
}

.backup-field select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #cfd9e5;
    border-radius: 11px;
    background: #ffffff;
    color: #102f5a;
}

.backup-safety-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border: 1px solid #d7e0eb;
    border-radius: 13px;
    background: #ffffff;
    cursor: pointer;
}

.backup-safety-option .material-symbols-rounded {
    color: #0f4b8d;
}

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

.backup-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border: 1px solid #d7e0eb;
    border-radius: 12px;
    background: #ffffff;
}

.backup-info-item span {
    color: #66758a;
    font-size: 0.82rem;
}

.backup-info-item strong {
    color: #103764;
}

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

.backup-auto-actions .btn {
    width: 100%;
    text-align: center;
}

/*
 * * =========================================================
 * * Datensicherung – Dark Mode
 * * Unterstützt die üblichen Dark-Mode-Klassen
 * * =========================================================
 */

/* Backup-Karten wie Drucksystem */

body.dark-mode .backup-compact-card, body.dark-mode .backup-auto-panel, html[data-theme="dark"] .backup-compact-card, html[data-theme="dark"] .backup-auto-panel, body[data-theme="dark"] .backup-compact-card, body[data-theme="dark"] .backup-auto-panel {
    background: #141d2d;
    border: 1px solid #36465c;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 2px 10px rgba(0,0,0,.18);
}

body.dark-mode .backup-switch-row, body.dark-mode .backup-safety-option, body.dark-mode .backup-info-item, html[data-theme="dark"] .backup-switch-row, html[data-theme="dark"] .backup-safety-option, html[data-theme="dark"] .backup-info-item, body[data-theme="dark"] .backup-switch-row, body[data-theme="dark"] .backup-safety-option, body[data-theme="dark"] .backup-info-item {
    background: #2a374b;
    border: 1px solid #465b75;
}

body.dark-mode .backup-field select, body.dark-mode .backup-compact-restore-form input[type=file], html[data-theme="dark"] .backup-field select, html[data-theme="dark"] .backup-compact-restore-form input[type=file], body[data-theme="dark"] .backup-field select, body[data-theme="dark"] .backup-compact-restore-form input[type=file] {
    background: #2a374b;
    border: 1px solid #465b75;
    color: #fff;
}

body.dark-mode .backup-compact-restore-form, html[data-theme="dark"] .backup-compact-restore-form, body[data-theme="dark"] .backup-compact-restore-form {
    background: #202c3d;
    border: 1px solid #40536b;
    border-radius: 16px;
    padding: 14px;
}

body.dark-mode .backup-info-item span, html[data-theme="dark"] .backup-info-item span, body[data-theme="dark"] .backup-info-item span {
    color: #aebbd0;
}

body.dark-mode .backup-info-item strong, html[data-theme="dark"] .backup-info-item strong, body[data-theme="dark"] .backup-info-item strong {
    color: #ffffff;
}

body.dark-mode .backup-compact-header h3, body.dark-mode .backup-field label, body.dark-mode .backup-switch-row strong, body.dark-mode .backup-safety-option strong, html[data-theme="dark"] .backup-compact-header h3, html[data-theme="dark"] .backup-field label, html[data-theme="dark"] .backup-switch-row strong, html[data-theme="dark"] .backup-safety-option strong, body[data-theme="dark"] .backup-compact-header h3, body[data-theme="dark"] .backup-field label, body[data-theme="dark"] .backup-switch-row strong, body[data-theme="dark"] .backup-safety-option strong {
    color: #ffffff;
}

body.dark-mode .backup-compact-restore-form input[type="file"]::file-selector-button, html[data-theme="dark"] .backup-compact-restore-form input[type="file"]::file-selector-button, body[data-theme="dark"] .backup-compact-restore-form input[type="file"]::file-selector-button {
    background: #35465d;
    color: #ffffff;
    border: 0;
    border-radius: 7px;
    padding: 7px 10px;
    margin-right: 10px;
    cursor: pointer;
}

@media (max-width: 950px) {
    .backup-layout {
        grid-template-columns: 1fr;
    }

    .backup-actions-column {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .backup-actions-column, .backup-settings-grid, .backup-info-grid, .backup-auto-actions {
        grid-template-columns: 1fr;
    }

    .backup-auto-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .backup-status-badge {
        align-self: flex-start;
    }
}

.backup-compact-restore-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Backup-Feinschliff */

.backup-layout {
    grid-template-columns: minmax(300px, 0.8fr) minmax(520px, 1.6fr);
    align-items: stretch;
}

.backup-actions-column {
    display: grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 18px;
    height: 100%;
}

.backup-compact-card {
    height: 100%;
    min-height: 0;
}

.backup-compact-card > .backup-full-button {
    margin-top: auto;
}

.backup-compact-restore-form {
    flex: 1;
}

.backup-compact-restore-form .backup-full-button {
    margin-top: auto;
}

.backup-download-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding-left: 18px;
}

.backup-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 118px;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
}

.backup-status-active {
    background: #dcfce7;
    border-color: #4ade80;
    color: #15803d;
}

.backup-status-inactive {
    background: #fee2e2;
    border-color: #f87171;
    color: #b91c1c;
}

body.dark-mode .backup-status-active, html[data-theme="dark"] .backup-status-active, body[data-theme="dark"] .backup-status-active {
    background: #14532d;
    border-color: #22c55e;
    color: #dcfce7;
}

body.dark-mode .backup-status-inactive, html[data-theme="dark"] .backup-status-inactive, body[data-theme="dark"] .backup-status-inactive {
    background: #7f1d1d;
    border-color: #ef4444;
    color: #fee2e2;
}

/*
 * * =========================================================
 * * Backup-Verwaltung
 * * =========================================================
 */

.backup-page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.backup-page-hero .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.backup-list-panel {
    margin-top: 20px;
}

.backup-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.backup-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid #cbd8e6;
    border-radius: 13px;
    background: #f3f7fb;
    color: #153e70;
    font-weight: 700;
}

.backup-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 220px;
    gap: 12px;
    margin-top: 24px;
}

.backup-search-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid #cdd9e6;
    border-radius: 13px;
    background: #ffffff;
}

.backup-search-field .material-symbols-rounded {
    color: #63748b;
}

.backup-search-field input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #12345f;
    font: inherit;
}

.backup-type-filter {
    width: 100%;
    min-height: 48px;
    padding: 0 13px;
    border: 1px solid #cdd9e6;
    border-radius: 13px;
    background: #ffffff;
    color: #12345f;
    font: inherit;
}

.backup-table-wrapper {
    overflow-x: auto;
    margin-top: 18px;
    border: 1px solid #d3deea;
    border-radius: 16px;
}

.backup-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

.backup-table th, .backup-table td {
    padding: 15px 17px;
    text-align: left;
    border-bottom: 1px solid #dce4ed;
    vertical-align: middle;
}

.backup-table th {
    background: #edf3f9;
    color: #425873;
    font-size: 0.84rem;
    font-weight: 700;
}

.backup-table tbody tr {
    background: #ffffff;
    transition: background 0.15s ease;
}

.backup-table tbody tr:hover {
    background: #f6f9fc;
}

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

.backup-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid;
    border-radius: 11px;
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.backup-type-badge .material-symbols-rounded {
    font-size: 18px;
}

.backup-type-auto {
    background: #e8f2ff;
    border-color: #91bdef;
    color: #13579c;
}

.backup-type-manual {
    background: #e8f9ef;
    border-color: #7ed9a1;
    color: #13723d;
}

.backup-type-reset {
    background: #fff4dd;
    border-color: #efbf65;
    color: #915a06;
}

.backup-type-restore {
    background: #f2eafe;
    border-color: #b89be8;
    color: #6535a4;
}

.backup-type-other {
    background: #eff2f5;
    border-color: #c3ccd7;
    color: #526174;
}

.backup-date {
    color: #143b69;
    white-space: nowrap;
}

.backup-filename {
    display: block;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #51637a;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.86rem;
}

.backup-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 39px;
    height: 39px;
    padding: 0;
    border: 1px solid #cbd7e4;
    border-radius: 10px;
    background: #f3f7fb;
    color: #194878;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.backup-action-button:hover {
    background: #e6eef7;
    border-color: #9fb4ca;
    transform: translateY(-1px);
}

.backup-restore-button {
    color: #6c4304;
}

.backup-delete-button {
    color: #b42318;
}

.backup-empty-filter, .backup-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 13px;
    min-height: 230px;
    margin-top: 18px;
    border: 1px dashed #cbd7e4;
    border-radius: 16px;
    color: #607187;
}

.backup-empty-filter .material-symbols-rounded, .backup-empty-state .material-symbols-rounded {
    font-size: 42px;
}

.backup-empty-filter[hidden] {
    display: none;
}

/* Informationsfenster */

.backup-modal[hidden] {
    display: none;
}

.backup-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.backup-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 18, 33, 0.62);
    backdrop-filter: blur(4px);
}

.backup-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    border: 1px solid #d2dce7;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(8, 25, 48, 0.25);
    overflow: hidden;
}

.backup-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 20px 22px;
    border-bottom: 1px solid #dce4ed;
}

.backup-modal-title {
    display: flex;
    align-items: center;
    gap: 11px;
}

.backup-modal-title h2 {
    margin: 0;
    font-size: 1.15rem;
}

.backup-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: #eef3f8;
    color: #173f6d;
    cursor: pointer;
}

.backup-modal-content {
    display: flex;
    flex-direction: column;
    padding: 8px 22px;
}

.backup-modal-info-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid #e2e8ef;
}

.backup-modal-info-row:last-child {
    border-bottom: 0;
}

.backup-modal-info-row span {
    color: #68788c;
}

.backup-modal-info-row strong {
    color: #153c69;
    overflow-wrap: anywhere;
}

.backup-modal-actions {
    display: flex;
    justify-content: flex-end;
    padding: 18px 22px;
    border-top: 1px solid #dce4ed;
    background: #f7f9fc;
}

body.backup-modal-open {
    overflow: hidden;
}

/* Dark Mode */

body.dark-mode .backup-count-badge, html[data-theme="dark"] .backup-count-badge, body[data-theme="dark"] .backup-count-badge {
    background: #263448;
    border-color: #40536b;
    color: #f4f7fb;
}

body.dark-mode .backup-search-field, body.dark-mode .backup-type-filter, html[data-theme="dark"] .backup-search-field, html[data-theme="dark"] .backup-type-filter, body[data-theme="dark"] .backup-search-field, body[data-theme="dark"] .backup-type-filter {
    background: #1d2a3b;
    border-color: #40536b;
    color: #ffffff;
}

body.dark-mode .backup-search-field input, html[data-theme="dark"] .backup-search-field input, body[data-theme="dark"] .backup-search-field input {
    color: #ffffff;
}

body.dark-mode .backup-table-wrapper, html[data-theme="dark"] .backup-table-wrapper, body[data-theme="dark"] .backup-table-wrapper {
    border-color: #40536b;
}

body.dark-mode .backup-table th, html[data-theme="dark"] .backup-table th, body[data-theme="dark"] .backup-table th {
    background: #243247;
    color: #b8c5d7;
}

body.dark-mode .backup-table tbody tr, html[data-theme="dark"] .backup-table tbody tr, body[data-theme="dark"] .backup-table tbody tr {
    background: #182437;
}

body.dark-mode .backup-table tbody tr:hover, html[data-theme="dark"] .backup-table tbody tr:hover, body[data-theme="dark"] .backup-table tbody tr:hover {
    background: #213047;
}

body.dark-mode .backup-table th, body.dark-mode .backup-table td, html[data-theme="dark"] .backup-table th, html[data-theme="dark"] .backup-table td, body[data-theme="dark"] .backup-table th, body[data-theme="dark"] .backup-table td {
    border-color: #35465d;
}

body.dark-mode .backup-date, html[data-theme="dark"] .backup-date, body[data-theme="dark"] .backup-date {
    color: #ffffff;
}

body.dark-mode .backup-filename, html[data-theme="dark"] .backup-filename, body[data-theme="dark"] .backup-filename {
    color: #b2bfd0;
}

body.dark-mode .backup-action-button, html[data-theme="dark"] .backup-action-button, body[data-theme="dark"] .backup-action-button {
    background: #27364b;
    border-color: #40536b;
    color: #ffffff;
}

body.dark-mode .backup-modal-dialog, html[data-theme="dark"] .backup-modal-dialog, body[data-theme="dark"] .backup-modal-dialog {
    background: #1c293b;
    border-color: #40536b;
}

body.dark-mode .backup-modal-header, body.dark-mode .backup-modal-info-row, body.dark-mode .backup-modal-actions, html[data-theme="dark"] .backup-modal-header, html[data-theme="dark"] .backup-modal-info-row, html[data-theme="dark"] .backup-modal-actions, body[data-theme="dark"] .backup-modal-header, body[data-theme="dark"] .backup-modal-info-row, body[data-theme="dark"] .backup-modal-actions {
    border-color: #40536b;
}

body.dark-mode .backup-modal-actions, html[data-theme="dark"] .backup-modal-actions, body[data-theme="dark"] .backup-modal-actions {
    background: #172335;
}

body.dark-mode .backup-modal-info-row strong, html[data-theme="dark"] .backup-modal-info-row strong, body[data-theme="dark"] .backup-modal-info-row strong {
    color: #ffffff;
}

body.dark-mode .backup-modal-info-row span, html[data-theme="dark"] .backup-modal-info-row span, body[data-theme="dark"] .backup-modal-info-row span {
    color: #acb9ca;
}

@media (max-width: 760px) {
    .backup-page-hero, .backup-list-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .backup-toolbar {
        grid-template-columns: 1fr;
    }

    .backup-modal-info-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

/*
 * * =========================================================
 * * Backup-Aktionen vereinheitlichen
 * * =========================================================
 */

/* Spaltenüberschrift exakt über den vier Buttons zentrieren */

.backup-actions-heading {
    text-align: center !important;
}

/* Aktionsbereich zentrieren */

.backup-row-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

/* Links, Buttons und Formular-Buttons identisch darstellen */

.backup-action-button, a.backup-action-button, button.backup-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 39px;
    height: 39px;
    min-width: 39px;
    min-height: 39px;
    padding: 0;
    margin: 0;
    border: 1px solid #cbd7e4;
    border-radius: 10px;
    background: #eef3f8;
    color: #123f70;
    font: inherit;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.backup-action-button .material-symbols-rounded {
    display: block;
    font-size: 21px;
    line-height: 1;
}

/* Formulare dürfen die Button-Größe nicht verändern */

.backup-row-actions form {
    padding: 0;
}

/* Alle vier Buttons auch beim Hover gleich */

.backup-action-button:hover, a.backup-action-button:hover, button.backup-action-button:hover {
    background: #e2eaf3;
    border-color: #9fb2c7;
    color: #123f70;
    transform: translateY(-1px);
}

/* Keine abweichenden Farben mehr für Wiederherstellen und Löschen */

.backup-restore-button, .backup-delete-button {
    color: #123f70;
}

/*
 * * =========================================================
 * * Backup-Aktionen – Dark Mode
 * * =========================================================
 */

body.dark-mode .backup-action-button, body.dark-mode a.backup-action-button, body.dark-mode button.backup-action-button, html[data-theme="dark"] .backup-action-button, html[data-theme="dark"] a.backup-action-button, html[data-theme="dark"] button.backup-action-button, body[data-theme="dark"] .backup-action-button, body[data-theme="dark"] a.backup-action-button, body[data-theme="dark"] button.backup-action-button {
    background: #26364b;
    border-color: #455a73;
    color: #ffffff;
}

body.dark-mode .backup-action-button:hover, body.dark-mode a.backup-action-button:hover, body.dark-mode button.backup-action-button:hover, html[data-theme="dark"] .backup-action-button:hover, html[data-theme="dark"] a.backup-action-button:hover, html[data-theme="dark"] button.backup-action-button:hover, body[data-theme="dark"] .backup-action-button:hover, body[data-theme="dark"] a.backup-action-button:hover, body[data-theme="dark"] button.backup-action-button:hover {
    background: #31445d;
    border-color: #607894;
    color: #ffffff;
}

/*
 * * =========================================================
 * * Backup-Typen – Dark Mode
 * * =========================================================
 */

body.dark-mode .backup-type-auto, html[data-theme="dark"] .backup-type-auto, body[data-theme="dark"] .backup-type-auto {
    background: #123f70;
    border-color: #2f79bd;
    color: #dcebff;
}

body.dark-mode .backup-type-manual, html[data-theme="dark"] .backup-type-manual, body[data-theme="dark"] .backup-type-manual {
    background: #14532d;
    border-color: #22c55e;
    color: #dcfce7;
}

body.dark-mode .backup-type-reset, html[data-theme="dark"] .backup-type-reset, body[data-theme="dark"] .backup-type-reset {
    background: #713f12;
    border-color: #d97706;
    color: #fef3c7;
}

body.dark-mode .backup-type-restore, html[data-theme="dark"] .backup-type-restore, body[data-theme="dark"] .backup-type-restore {
    background: #4c1d75;
    border-color: #a855f7;
    color: #f3e8ff;
}

body.dark-mode .backup-type-other, html[data-theme="dark"] .backup-type-other, body[data-theme="dark"] .backup-type-other {
    background: #334155;
    border-color: #64748b;
    color: #f1f5f9;
}

/*
 * * =========================================================
 * * Backup-Pagination
 * * =========================================================
 */

.backup-pagination-info {
    font-weight: 600;
}

a.backup-page-button:hover {
    background: #e5edf6;
    border-color: #9eb2c8;
    transform: translateY(-1px);
}

.backup-page-ellipsis {
    height: 39px;
}

/* Backup-Pagination – Dark Mode */

body.dark-mode .backup-pagination-info, html[data-theme="dark"] .backup-pagination-info, body[data-theme="dark"] .backup-pagination-info {
    color: #aebbd0;
}

body.dark-mode .backup-page-button, html[data-theme="dark"] .backup-page-button, body[data-theme="dark"] .backup-page-button {
    background: #26364b;
    border-color: #455a73;
    color: #ffffff;
}

body.dark-mode a.backup-page-button:hover, html[data-theme="dark"] a.backup-page-button:hover, body[data-theme="dark"] a.backup-page-button:hover {
    background: #31445d;
    border-color: #607894;
}

body.dark-mode .backup-page-button.active, html[data-theme="dark"] .backup-page-button.active, body[data-theme="dark"] .backup-page-button.active {
    background: #1262ad;
    border-color: #2c86d5;
    color: #ffffff;
}

body.dark-mode .backup-page-ellipsis, html[data-theme="dark"] .backup-page-ellipsis, body[data-theme="dark"] .backup-page-ellipsis {
    color: #aebbd0;
}

@media (max-width: 650px) {
    .backup-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .backup-pagination-nav {
        justify-content: flex-start;
    }
}

/*
 * * =========================================================
 * * Backup-Tabelle: Ausrichtung und identische Aktionsbuttons
 * * =========================================================
 */

/* Typ, Erstellt und Dateiname mittig */

.backup-table th:nth-child(1), .backup-table td:nth-child(1), .backup-table th:nth-child(2), .backup-table td:nth-child(2), .backup-table th:nth-child(3), .backup-table td:nth-child(3) {
    text-align: center;
}

/* Inhalte innerhalb der Zellen ebenfalls sauber zentrieren */

.backup-table td:nth-child(1) .backup-type-badge, .backup-table td:nth-child(2) .backup-date, .backup-table td:nth-child(3) .backup-filename {
    margin-left: auto;
    margin-right: auto;
}

/* Dateiname als zentrierter Block */

.backup-table td:nth-child(3) .backup-filename {
    display: block;
    width: fit-content;
    max-width: 100%;
}

/* Alle vier Aktionsbuttons wirklich identisch */

.backup-row-actions > a.backup-action-button, .backup-row-actions > button.backup-action-button, .backup-row-actions > form > button.backup-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    background: #edf3f8;
    border: 1px solid #c5d2df;
    border-radius: 10px;
    color: #174674;
    text-decoration: none;
    box-shadow: none;
    appearance: none;
}

/* Gleicher Hover für Link und Buttons */

.backup-row-actions > a.backup-action-button:hover, .backup-row-actions > button.backup-action-button:hover, .backup-row-actions > form > button.backup-action-button:hover {
    background: #dfe8f1;
    border-color: #a9bbcc;
    color: #174674;
}

/* Dark Mode: alle vier identisch */

body.dark-mode .backup-row-actions > a.backup-action-button, body.dark-mode .backup-row-actions > button.backup-action-button, body.dark-mode .backup-row-actions > form > button.backup-action-button, html[data-theme="dark"] .backup-row-actions > a.backup-action-button, html[data-theme="dark"] .backup-row-actions > button.backup-action-button, html[data-theme="dark"] .backup-row-actions > form > button.backup-action-button, body[data-theme="dark"] .backup-row-actions > a.backup-action-button, body[data-theme="dark"] .backup-row-actions > button.backup-action-button, body[data-theme="dark"] .backup-row-actions > form > button.backup-action-button {
    background: #34445a;
    border-color: #536982;
    color: #ffffff;
    box-shadow: none;
}

/* Dark-Mode-Hover ebenfalls identisch */

body.dark-mode .backup-row-actions > a.backup-action-button:hover, body.dark-mode .backup-row-actions > button.backup-action-button:hover, body.dark-mode .backup-row-actions > form > button.backup-action-button:hover, html[data-theme="dark"] .backup-row-actions > a.backup-action-button:hover, html[data-theme="dark"] .backup-row-actions > button.backup-action-button:hover, html[data-theme="dark"] .backup-row-actions > form > button.backup-action-button:hover, body[data-theme="dark"] .backup-row-actions > a.backup-action-button:hover, body[data-theme="dark"] .backup-row-actions > button.backup-action-button:hover, body[data-theme="dark"] .backup-row-actions > form > button.backup-action-button:hover {
    background: #40536b;
    border-color: #667d97;
    color: #ffffff;
}

/* Icons einheitlich */

.backup-row-actions .backup-action-button .material-symbols-rounded {
    font-size: 21px;
    line-height: 1;
}

/* Formulare dürfen die Buttongröße nicht beeinflussen */

.backup-row-actions form {
    display: inline-flex;
    margin: 0;
}

/*
 * * =========================================================
 * * Einlieferer-Seite
 * * =========================================================
 */

.einlieferer-search-form {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.einlieferer-search-field {
    position: relative;
    flex: 1;
    min-width: 0;
}

.einlieferer-search-field > .material-symbols-rounded {
    position: absolute;
    top: 50%;
    left: 15px;
    z-index: 1;
    color: #64748b;
    font-size: 21px;
    pointer-events: none;
    transform: translateY(-50%);
}

.einlieferer-search-field input {
    width: 100%;
    height: 44px;
    padding: 0 15px 0 45px;
    margin: 0;
    border: 1px solid #cbd7e4;
    border-radius: 11px;
    background: #f7f9fc;
    color: #17283d;
}

.einlieferer-search-form > .btn {
    min-height: 44px;
    margin: 0;
    white-space: nowrap;
}

.einlieferer-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.einlieferer-section-title > .material-symbols-rounded {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #cbd7e4;
    border-radius: 12px;
    font-size: 22px;
}

.einlieferer-section-title h2 {
    margin: 0;
}

.einlieferer-add-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
    gap: 10px;
    padding: 18px;
    border-radius: 14px;
    background: #f4f7fb;
}

.einlieferer-add-form input, .einlieferer-add-form button {
    min-width: 0;
    height: 44px;
    margin: 0;
}

.einlieferer-list-panel {
    overflow: hidden;
}

.einlieferer-list-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.einlieferer-list-header .einlieferer-section-title {
    margin-bottom: 20px;
}

.einlieferer-list-subtitle {
    display: block;
    margin-top: 4px;
    color: #69798e;
    font-size: 0.88rem;
}

.einlieferer-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid #bfd0e1;
    border-radius: 999px;
    background: #edf3f8;
    color: #174674;
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
}

.einlieferer-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #cad6e3;
    border-radius: 14px;
}

.einlieferer-table {
    width: 100%;
    min-width: 960px;
    border-collapse: collapse;
    table-layout: auto;
}

.einlieferer-table th, .einlieferer-table td {
    padding: 15px 16px;
    border-bottom: 1px solid #d9e2ec;
    vertical-align: middle;
}

.einlieferer-table th {
    background: #edf3f8;
    color: #334d6a;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

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

.einlieferer-row {
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.einlieferer-row:hover {
    background: #f2f6fa;
}

.einlieferer-row:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid #1d70b7;
    outline-offset: -2px;
}

.einlieferer-customer-number {
    color: #174674;
}

.einlieferer-contact-link {
    color: inherit;
    text-decoration: none;
}

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

.einlieferer-empty-value {
    color: #8896a8;
}

.einlieferer-actions-heading {
    text-align: center !important;
}

.einlieferer-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.einlieferer-row-actions form {
    display: inline-flex;
    margin: 0;
}

.einlieferer-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border: 1px solid #c5d2df;
    border-radius: 10px;
    background: #edf3f8;
    color: #174674;
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
    appearance: none;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.einlieferer-action-button:hover {
    background: #dfe8f1;
    border-color: #a9bbcc;
    transform: translateY(-1px);
}

.einlieferer-action-button .material-symbols-rounded {
    font-size: 21px;
    line-height: 1;
}

.einlieferer-delete-button:hover {
    border-color: #dc6b6b;
    background: #fde8e8;
    color: #b42323;
}

.einlieferer-empty-state {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 50px 24px;
    text-align: center;
}

.einlieferer-empty-state > .material-symbols-rounded {
    margin-bottom: 12px;
    font-size: 44px;
    color: #73849a;
}

.einlieferer-empty-state h3 {
    margin: 0 0 8px;
}

.einlieferer-empty-state p {
    margin: 0 0 20px;
    color: #69798e;
}

/*
 * * =========================================================
 * * Einlieferer-Seite – Dark Mode
 * * =========================================================
 */

body.dark-mode .einlieferer-search-field input, html[data-theme="dark"] .einlieferer-search-field input, body[data-theme="dark"] .einlieferer-search-field input {
    background: #29394f;
    border-color: #496078;
    color: #ffffff;
}

body.dark-mode .einlieferer-search-field > .material-symbols-rounded, html[data-theme="dark"] .einlieferer-search-field > .material-symbols-rounded, body[data-theme="dark"] .einlieferer-search-field > .material-symbols-rounded {
    color: #aebbd0;
}

body.dark-mode .einlieferer-add-form, html[data-theme="dark"] .einlieferer-add-form, body[data-theme="dark"] .einlieferer-add-form {
    background: #1a2535;
}

body.dark-mode .einlieferer-section-title > .material-symbols-rounded, html[data-theme="dark"] .einlieferer-section-title > .material-symbols-rounded, body[data-theme="dark"] .einlieferer-section-title > .material-symbols-rounded {
    background: #141d2d;
    border-color: #36465c;
    color: #ffffff;
}

body.dark-mode .einlieferer-count-badge, html[data-theme="dark"] .einlieferer-count-badge, body[data-theme="dark"] .einlieferer-count-badge {
    background: #15395a;
    border-color: #2876b5;
    color: #dceeff;
}

body.dark-mode .einlieferer-table-wrapper, html[data-theme="dark"] .einlieferer-table-wrapper, body[data-theme="dark"] .einlieferer-table-wrapper {
    border-color: #3d5067;
}

body.dark-mode .einlieferer-table th, html[data-theme="dark"] .einlieferer-table th, body[data-theme="dark"] .einlieferer-table th {
    background: #29394f;
    color: #c9d8ea;
}

body.dark-mode .einlieferer-table td, html[data-theme="dark"] .einlieferer-table td, body[data-theme="dark"] .einlieferer-table td {
    border-color: #34475d;
}

body.dark-mode .einlieferer-row:hover, html[data-theme="dark"] .einlieferer-row:hover, body[data-theme="dark"] .einlieferer-row:hover {
    background: #172235;
}

body.dark-mode .einlieferer-customer-number, html[data-theme="dark"] .einlieferer-customer-number, body[data-theme="dark"] .einlieferer-customer-number {
    color: #ffffff;
}

body.dark-mode .einlieferer-action-button, html[data-theme="dark"] .einlieferer-action-button, body[data-theme="dark"] .einlieferer-action-button {
    background: #34445a;
    border-color: #536982;
    color: #ffffff;
}

body.dark-mode .einlieferer-action-button:hover, html[data-theme="dark"] .einlieferer-action-button:hover, body[data-theme="dark"] .einlieferer-action-button:hover {
    background: #40536b;
    border-color: #667d97;
}

body.dark-mode .einlieferer-delete-button:hover, html[data-theme="dark"] .einlieferer-delete-button:hover, body[data-theme="dark"] .einlieferer-delete-button:hover {
    background: #541f2a;
    border-color: #bd4657;
    color: #ffd9df;
}

body.dark-mode .einlieferer-list-subtitle, body.dark-mode .einlieferer-empty-state p, html[data-theme="dark"] .einlieferer-list-subtitle, html[data-theme="dark"] .einlieferer-empty-state p, body[data-theme="dark"] .einlieferer-list-subtitle, body[data-theme="dark"] .einlieferer-empty-state p {
    color: #aebbd0;
}

/*
 * * =========================================================
 * * Einlieferer-Seite – Mobil
 * * =========================================================
 */

@media (max-width: 1050px) {
    .einlieferer-add-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .einlieferer-add-form button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .einlieferer-search-form {
        align-items: stretch;
        flex-direction: column;
    }

    .einlieferer-search-form > .btn {
        width: 100%;
    }

    .einlieferer-list-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .einlieferer-add-form {
        grid-template-columns: 1fr;
    }

    .einlieferer-add-form button {
        grid-column: auto;
    }
}

/* Suchbereich nur noch mit einer Hintergrundebene */

.einlieferer-search-panel {
    padding: 20px 24px;
}

.einlieferer-search-form {
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
}

.einlieferer-search-panel .search-form, .einlieferer-search-panel .einlieferer-search-form {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.einlieferer-row-actions {
    justify-content: center;
}

/*
 * * ==========================================================
 * * AUSZAHLUNG
 * * ==========================================================
 */

.auszahlung-search-panel {
    padding: 24px 28px;
}

.auszahlung-search-form {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.auszahlung-search-field {
    flex: 1;
    min-width: 320px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.auszahlung-search-field span {
    color: var(--text-secondary);
    font-size: 22px;
}

.auszahlung-search-field input {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 13px 16px;
    font-size: 15px;
    transition: .2s;
}

.auszahlung-search-field input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.auszahlung-section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.auszahlung-section-title span {
    font-size: 30px;
    color: var(--primary-color);
}

.auszahlung-section-title h2 {
    margin: 0;
}

.auszahlung-section-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Tabellen */

.auszahlung-table-wrapper {
    overflow-x: auto;
}

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

.auszahlung-table thead {
    background: var(--surface);
}

.auszahlung-table th {
    padding: 14px;
    text-align: center;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.auszahlung-table td {
    padding: 14px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.auszahlung-click-row {
    cursor: pointer;
    transition: .18s;
}

/*
 * * ==========================================================
 * * AUSZAHLUNG – STATUS WIE ARTIKELSTATUS
 * * ==========================================================
 */

.auszahlung-status-badge {
    min-width: 62px;
    box-shadow: none;
}

/* Offen – wie „Verkauft“, nur gelb/orange */

/* Ausgezahlt – wie „Verfügbar“ */

/* Alte Regeln zuverlässig überschreiben */

/* Links */

.auszahlung-contact-link {
    color: inherit;
    text-decoration: none;
}

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

/* Empty State */

.auszahlung-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 50px 20px;
}

.auszahlung-empty-state .material-symbols-rounded {
    font-size: 56px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.auszahlung-empty-state h3 {
    margin-bottom: 8px;
}

.auszahlung-empty-state p {
    color: var(--text-secondary);
    margin-bottom: 22px;
}

/* Mobile */

@media (max-width:900px) {
    .auszahlung-search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .auszahlung-search-field {
        min-width: unset;
        width: 100%;
    }
}

/*
 * * ==========================================================
 * * AUSZAHLUNG – FEINSCHLIFF
 * * ==========================================================
 */

/* Tabellenzeilen wie bei Einlieferer */

.auszahlung-click-row {
    position: relative;
}

.auszahlung-click-row:hover {
    background: rgba(59,130,246,.06);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15,23,42,.06);
}

.auszahlung-click-row:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

body.dark-mode .auszahlung-click-row:hover {
    background: rgba(255,255,255,.045);
    box-shadow: 0 6px 16px rgba(0,0,0,.22);
}

/* Erste und letzte Zelle sauber abrunden */

.auszahlung-table tbody tr td:first-child {
    border-radius: 10px 0 0 10px;
}

.auszahlung-table tbody tr td:last-child {
    border-radius: 0 10px 10px 0;
}

/* Etwas mehr Abstand zwischen Kopfzeile und Inhalt */

.auszahlung-table tbody tr:first-child td {
    border-top: 8px solid transparent;
}

/* Pagination – identisch und sauber ausgerichtet */

.backup-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.backup-pagination-info {
    color: var(--text-secondary);
    font-size: 14px;
}

.backup-pagination-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.backup-page-button {
    min-width: 38px;
    height: 38px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background .18s, border-color .18s, color .18s, transform .18s, box-shadow .18s;
}

.backup-page-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(15,23,42,.08);
}

.backup-page-button.active {
    pointer-events: none;
}

.backup-page-button.disabled {
    opacity: .4;
    cursor: not-allowed;
    pointer-events: none;
}

.backup-page-arrow {
    padding: 0;
}

.backup-page-arrow .material-symbols-rounded {
    font-size: 21px;
}

.backup-page-ellipsis {
    min-width: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Dark Mode Pagination */

body.dark-mode .backup-page-button:hover {
    background: rgba(255,255,255,.07);
    box-shadow: 0 5px 14px rgba(0,0,0,.22);
}

/* Mobil */

@media (max-width:700px) {
    .backup-pagination {
        flex-direction: column;
        align-items: center;
    }

    .backup-pagination-nav {
        justify-content: center;
    }

    .backup-pagination-info {
        text-align: center;
    }

    .auszahlung-table th, .auszahlung-table td {
        white-space: nowrap;
    }
}

/*
 * * ==========================================================
 * * AUSZAHLUNG – STATUS-BADGES FINAL
 * * ==========================================================
 */

.auszahlung-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 13px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    background: transparent;
}

/* Offen */

.auszahlung-status-badge.offen {
    background: rgba(245, 158, 11, .12);
    border-color: #f59e0b;
    color: #fbbf24;
}

/* Ausgezahlt */

.auszahlung-status-badge.ausgezahlt {
    background: rgba(34, 197, 94, .12);
    border-color: #22c55e;
    color: #4ade80;
}

/* Dark Mode */

body.dark-mode .auszahlung-status-badge.offen {
    background: rgba(245, 158, 11, .14);
    border-color: #f59e0b;
    color: #fcd34d;
}

body.dark-mode .auszahlung-status-badge.ausgezahlt {
    background: rgba(34, 197, 94, .14);
    border-color: #22c55e;
    color: #86efac;
}

/*
 * * ==========================================================
 * * AUSZAHLUNG – ÜBERSCHRIFTEN MIT ICON-KASTEN
 * * ==========================================================
 */

.einlieferer-section-heading h2 {
    font-size: 24px;
    line-height: 1.2;
}

/* Dark Mode */

/* Mobil */

@media (max-width:700px) {
    .einlieferer-section-heading {
        gap: 10px;
    }

    .einlieferer-section-heading h2 {
        font-size: 21px;
    }

    .einlieferer-section-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .einlieferer-section-icon .material-symbols-rounded {
        font-size: 21px;
    }
}

/*
 * * ==========================================================
 * * AUSZAHLUNG – ICON-KÄSTEN WIE BEI EINLIEFERER
 * * ==========================================================
 */

.einlieferer-section-heading {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.einlieferer-section-icon {
    box-shadow: none;
}

.einlieferer-section-icon .material-symbols-rounded {
    margin: 0;
    padding: 0;
    background: transparent;
}

/* Falls ältere Auszahlung-Regeln das Icon überschreiben */

.auszahlung-section-title > .material-symbols-rounded {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #3d5674;
    border-radius: 11px;
    font-size: 23px;
    color: #ffffff;
}

/*
 * * ==========================================================
 * * LIGHT MODE – ICONS UND PAGINATION SICHTBAR MACHEN
 * * ==========================================================
 */

/* Überschriften-Iconkasten */

.einlieferer-section-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #8aa0ba;
    border-radius: 11px;
    background: #ffffff;
    color: #18324f;
}

.einlieferer-section-icon .material-symbols-rounded {
    color: #18324f;
    font-size: 23px;
    line-height: 1;
}

/* Dark Mode unverändert dunkel/hell */

body.dark-mode .einlieferer-section-icon {
    background: transparent;
    border-color: #3d5674;
}

body.dark-mode .einlieferer-section-icon .material-symbols-rounded {
    color: #ffffff;
}

/* Pagination allgemein */

.backup-page-button {
    color: #25364a;
    background: #ffffff;
    border-color: #b8c7d8;
}

/* Aktive Seite im Light Mode */

.backup-page-button.active {
    background: #2f4664;
    border-color: #2f4664;
    color: #ffffff !important;
    font-weight: 700;
}

/* Pfeile */

.backup-page-button .material-symbols-rounded {
    color: inherit;
}

/* Deaktivierte Pfeile */

.backup-page-button.disabled {
    color: #9aa8b7;
    background: #edf2f7;
    border-color: #d4dee8;
}

/* Dark Mode */

body.dark-mode .backup-page-button {
    color: #e8eef6;
    background: rgba(255,255,255,.035);
    border-color: rgba(148,163,184,.28);
}

body.dark-mode .backup-page-button.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff !important;
}

body.dark-mode .backup-page-button.disabled {
    color: #65758a;
    background: rgba(255,255,255,.02);
}

/*
 * * ==========================================================
 * * KASSENBERICHT
 * * ==========================================================
 */

.kassenbericht-search-panel {
    padding: 24px 28px;
}

/* Suchleiste wie bei Einlieferer */

.kassenbericht-search-panel .einlieferer-search-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.kassenbericht-search-panel .einlieferer-search-field {
    flex: 1;
    min-width: 320px;
}

/*
 * * ==========================================================
 * * KASSENBERICHT – TABELLE
 * * ==========================================================
 */

.kassenbericht-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.kassenbericht-table th, .kassenbericht-table td {
    text-align: center;
    vertical-align: middle;
}

.kassenbericht-table td {
    padding: 15px 14px;
}

/* Artikelnummern dürfen umbrechen */

.kassenbericht-artikelnummern {
    max-width: 340px;
    white-space: normal;
    line-height: 1.4;
}

/* Keine Hoveranimation */

.kassenbericht-click-row {
    transform: none !important;
    box-shadow: none !important;
}

.kassenbericht-click-row:hover {
    transform: none !important;
    box-shadow: none !important;
}

/*
 * * ==========================================================
 * * VERKAUFSDETAIL – KOPFDATEN
 * * ==========================================================
 */

.verkauf-detail-grid {
    margin-top: 8px;
}

.verkauf-detail-item {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 88px;
}

.verkauf-detail-item strong {
    font-weight: 600;
}

/*
 * * ==========================================================
 * * VERKAUFSDETAIL – ARTIKELTABELLE
 * * ==========================================================
 */

.verkauf-artikel-table {
    width: 100%;
}

.verkauf-artikel-table th, .verkauf-artikel-table td {
    text-align: center;
    vertical-align: middle;
}

.verkauf-artikel-table td {
    padding: 14px;
}

/* Preis bewusst nicht fett */

.verkauf-artikel-table td:nth-child(6) {
    font-weight: 400;
}

/*
 * * ==========================================================
 * * DARK MODE
 * * ==========================================================
 */

body.dark-mode .verkauf-detail-item {
    background: rgba(255,255,255,.025);
    border-color: rgba(148,163,184,.22);
}

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

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

@media (max-width:700px) {
    .verkauf-detail-grid {
        grid-template-columns: 1fr;
    }

    .kassenbericht-search-panel .einlieferer-search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .kassenbericht-search-panel .einlieferer-search-field {
        min-width: unset;
        width: 100%;
    }

    .kassenbericht-table th, .kassenbericht-table td, .verkauf-artikel-table th, .verkauf-artikel-table td {
        white-space: nowrap;
    }
}

.verkauf-einlieferer-link {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

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

/*
 * * =========================================
 * * VERKAUFSDETAILS – HEADER
 * * =========================================
 */

.admin-hero-with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.admin-hero-with-action h1 {
    margin: 0;
}

.admin-hero-with-action .btn {
    flex-shrink: 0;
}

/*
 * * =========================================================
 * * KASSENBERICHT – KLICKBARER ZEILEN-HOVER
 * * =========================================================
 */

.kassenbericht-table tbody tr.kassenbericht-click-row {
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.kassenbericht-table tbody tr.kassenbericht-click-row:hover {
    background-color: rgba(59, 130, 246, 0.08);
}

/* Darkmode */

body.dark-mode .kassenbericht-table tbody tr.kassenbericht-click-row:hover {
    background-color: rgba(59, 130, 246, 0.10);
}

/*
 * * ==========================================================
 * * ANNAHME – ARTIKELLISTE
 * * ==========================================================
 */

.annahme-artikel-table {
    width: 100%;
}

.annahme-artikel-table th, .annahme-artikel-table td {
    text-align: center;
    vertical-align: middle;
}

.annahme-artikel-table td {
    padding: 14px;
}

/* Artikelnummer etwas hervorheben */

.annahme-artikel-table td:first-child {
    font-weight: 600;
}

/* Preis bewusst normal */

.annahme-artikel-table td:nth-child(6) {
    font-weight: 400;
}

/* Aktionen sauber mittig */

/*
 * * ==========================================================
 * * ANNAHME – ARTIKELANZAHL
 * * ==========================================================
 */

.artikel-person-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.artikel-person-header h2 {
    margin: 0;
}

.artikel-person-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 13px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.auszahlung-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.auszahlung-section-header h2 {
    margin: 0;
}

.abholung-progress {
    width: 100%;
    margin-top: 16px;
}

.abholung-progress-native {
    width: 100%;
    height: 10px;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    appearance: none;
}

.abholung-progress-native::-webkit-progress-bar {
    background: var(--bg-input);
    border-radius: 999px;
}

.abholung-progress-native::-webkit-progress-value {
    background: #22c55e;
    border-radius: 999px;
}

.abholung-progress-native::-moz-progress-bar {
    background: #22c55e;
    border-radius: 999px;
}

/*
 * * ==========================================================
 * * AUSZAHLUNG – FINAL LAYOUT OVERRIDES
 * * ==========================================================
 */

.auszahlung-search-panel .einlieferer-search-form, .abholung-scan-form {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 12px;
}

.abholung-scan-form {
    margin: 0;
}

.auszahlung-search-panel .einlieferer-search-field, .abholung-scan-form .einlieferer-search-field {
    min-width: 0;
}

.auszahlung-search-panel .einlieferer-search-field input, .abholung-scan-form .einlieferer-search-field input {
    width: 100%;
}

.einlieferer-section-heading {
    gap: 0;
}

.einlieferer-section-heading h2 {
    margin: 0;
}

.auszahlung-table-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.auszahlung-table-heading .einlieferer-section-heading {
    margin-bottom: 0;
}

.auszahlung-download-all {
    margin-left: auto;
    white-space: nowrap;
}

.auszahlung-process-grid {
    display: block;
}

.auszahlung-process-card {
    width: 100%;
}

.abholung-progress-fill {
    min-width: 0;
}

/* Status: bestehende Farblogik beibehalten, neue Stati semantisch ergänzen */

/* Offen = bisheriges Orange */

/* Abgeholt / vollständig = Grün */

/* Vermisst = Rot */

/* Alte native Progressbar dieser Seite deaktivieren, falls noch irgendwo vorhanden */

body.dark-mode .abholung-progress-native::-webkit-progress-bar {
    background: #111827;
}

@media (max-width:700px) {
    .auszahlung-search-panel .einlieferer-search-form {
        display: grid;
        grid-template-columns: minmax(0,1fr) auto auto;
        align-items: center;
        gap: 12px;
        margin: 0;
    }

    .auszahlung-table-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .auszahlung-download-all {
        margin-left: 0;
    }
}

/*
 * * ==========================================================
 * * AUSZAHLUNG – DETAILKARTEN FINAL
 * * ==========================================================
 */

.auszahlung-process-card {
    padding: 28px;
}

.auszahlung-process-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.auszahlung-process-title > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.auszahlung-process-title h2 {
    margin: 0;
    font-size: 24px;
    color: var(--primary-dark);
}

body.dark-mode .auszahlung-process-title h2 {
    color: var(--text);
}

/* ---------- Auszahlung Beträge ---------- */

.auszahlung-money-list {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.auszahlung-money-list > div {
    min-height: 92px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.auszahlung-money-list span {
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 700;
}

.auszahlung-money-list strong {
    color: var(--text);
    font-size: 25px;
    font-weight: 800;
}

.auszahlung-money-total {
    border-color: rgba(59,130,246,.4) !important;
}

.auszahlung-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.auszahlung-card-actions form {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* ---------- Artikelabholung ---------- */

.abholung-counter {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.abholung-counter strong {
    font-size: 28px;
    color: var(--text);
}

.abholung-counter span {
    color: var(--text-soft);
    font-weight: 700;
}

.abholung-rest {
    margin-top: 10px;
    color: var(--text-soft);
    font-weight: 600;
}

.abholung-rest strong {
    color: var(--text);
}

/* ---------- Fortschrittsbalken ---------- */

.abholung-progress-track {
    width: 100%;
    height: 12px;
    margin-top: 16px;
    overflow: hidden;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
}

.abholung-progress-fill {
    width: 0;
    height: 100%;
    background: #22c55e;
    border-radius: 999px;
    transition: width .25s ease;
}

body.dark-mode .abholung-progress-track {
    background: #111827;
    border-color: #475569;
}

body.dark-mode .abholung-progress-fill {
    background: #22c55e;
}

/* ---------- Status Vermisst ---------- */

/* ---------- Offen bleibt Orange ---------- */

/* ---------- Abgeholt ---------- */

@media (max-width:900px) {
    .auszahlung-money-list {
        grid-template-columns: 1fr;
    }
}

/* Auszahlung: Aktionsspalte nicht künstlich verbreitern */

.einlieferer-table th:last-child, .einlieferer-table td:last-child {
    width: auto;
    text-align: center;
}

.einlieferer-table th:last-child {
    min-width: 90px;
}

.einlieferer-table td:last-child {
    white-space: nowrap;
}

/*
 * * ==========================================================
 * * AUSZAHLUNG – SUCHE FINAL
 * * ==========================================================
 */

.auszahlung-search-panel .einlieferer-search-form {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.auszahlung-search-panel .einlieferer-search-field {
    flex: 1 1 auto;
    min-width: 0;
}

.auszahlung-search-panel .einlieferer-search-field input {
    width: 100%;
}

.auszahlung-search-panel .btn {
    width: auto !important;
    min-width: max-content;
    flex: 0 0 auto;
    margin: 0 !important;
}

/*
 * * ==========================================================
 * * EINHEITLICHES BARCODE-SCANNERFELD
 * * Auszahlung / Kasse / Annahme
 * * ==========================================================
 */

.scanner-form-modern {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0 !important;
    padding: 16px !important;
    background: var(--surface-2) !important;
    border: 0 !important;
    border-radius: 16px;
    box-shadow: none !important;
}

.scanner-field-modern {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 14px;
    background: var(--surface-3);
    border: 1px solid #58708f;
    border-radius: 12px;
}

.scanner-field-modern .material-symbols-rounded {
    flex: 0 0 auto;
    font-size: 22px;
    color: #93c5fd;
}

.scanner-field-modern input {
    width: 100%;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--text);
    box-shadow: none;
    outline: none;
}

.scanner-field-modern input:focus {
    outline: none;
    box-shadow: none;
}

.scanner-form-modern .btn {
    height: 46px;
    margin: 0;
    white-space: nowrap;
}

/* Dark Mode */

body.dark-mode .scanner-form-modern {
    background: #1f2a3a !important;
}

body.dark-mode .scanner-field-modern {
    background: #2b3d55;
    border-color: #58708f;
}

body.dark-mode .scanner-field-modern input {
    color: #f9fafb;
}

body.dark-mode .scanner-field-modern input::placeholder {
    color: #d1d5db;
}

/* Mobil */

@media (max-width:700px) {
    .scanner-form-modern {
        grid-template-columns: 1fr;
    }

    .scanner-form-modern .btn {
        width: 100%;
    }
}

.portal-login-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}

.portal-login-logo img {
    width: 145px;
    height: 145px;
    object-fit: contain;
    display: block;
}

.kasse-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    margin-bottom: 18px;
}

.kasse-section-title h2 {
    margin: 0;
}

.kasse-artikel-count {
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

/*
 * * =========================================================
 * * WOHNORT-STATISTIK
 * * =========================================================
 */

.wohnort-statistik-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 48px;
    align-items: center;
    margin-top: 28px;
}

.wohnort-chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.wohnort-donut {
    position: relative;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: #e5e7eb;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.wohnort-donut::after {
    content: "";
    position: absolute;
    width: 202px;
    height: 202px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--bg, #ffffff);
}

.wohnort-donut-center {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.wohnort-donut-center strong {
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.8px;
}

.wohnort-donut-center span {
    margin-top: 7px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.62;
}

/* Liste */

.wohnort-statistik-liste {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wohnort-statistik-zeile, .wohnort-statistik-gesamt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 50px;
    padding: 12px 16px;
    border: 1px solid var(--border, #d7dee8);
    border-radius: 10px;
    background: transparent;
    color: inherit;
}

.wohnort-statistik-zeile strong, .wohnort-statistik-gesamt strong {
    font-size: 16px;
}

.wohnort-statistik-gesamt {
    margin-top: 6px;
    background: rgba(127, 127, 127, 0.08);
    font-weight: 600;
}

/* Darkmode */

body.dark-mode .wohnort-statistik-gesamt, html.dark .wohnort-statistik-gesamt, [data-theme="dark"] .wohnort-statistik-gesamt {
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
}

/* Responsive */

@media (max-width: 850px) {
    .wohnort-statistik-layout {
        grid-template-columns: 1fr;
    }

    .wohnort-donut {
        width: 240px;
        height: 240px;
    }

    .wohnort-donut::after {
        width: 145px;
        height: 145px;
    }
}

body.dark-mode .wohnort-donut::after, html.dark .wohnort-donut::after, [data-theme="dark"] .wohnort-donut::after {
    background: #1f2b3a;
}

/*
 * * =========================================================
 * * Wohnort-Autocomplete
 * * =========================================================
 */

.ort-autocomplete {
    position: relative;
    width: 100%;
    min-width: 0;
}

.ort-autocomplete input {
    width: 100%;
}

.ort-autocomplete-liste {
    position: absolute;
    z-index: 1000;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    overscroll-behavior: contain;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-strong);
}

.ort-autocomplete-eintrag {
    background: transparent !important;
    color: var(--text) !important;
    border: 0 !important;
    border-radius: 10px;
    cursor: pointer;
    transform: none !important;
}

.ort-autocomplete-eintrag:hover, .ort-autocomplete-eintrag.ist-aktiv {
    background: var(--surface-2) !important;
    color: var(--text) !important;
    border: 0 !important;
    transform: none !important;
}

.ort-autocomplete-name {
    color: var(--text);
}

.ort-autocomplete-zusatz {
    color: var(--text-soft);
}

.ort-autocomplete-hinweis {
    padding: 13px 12px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.4;
}

.ort-autocomplete-laedt {
    color: var(--text-soft);
}

.ort-autocomplete-kein-ergebnis {
    color: var(--text-soft);
}

.ort-autocomplete-fehler {
    color: var(--danger);
}

.form-hinweis {
    display: block;
    margin-top: 7px;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.4;
}

/*
 * * * In article-edit-form stehen Label und Eingabefeld
 * * * normalerweise nebeneinander. Autocomplete muss dabei
 * * * den restlichen Platz erhalten.
 */

.article-edit-form .form-group .ort-autocomplete {
    flex: 1;
}

/* Dark Mode */

body.dark-mode .ort-autocomplete-liste {
    background: var(--surface);
    border-color: var(--border);
}

body.dark-mode .ort-autocomplete-eintrag:hover, body.dark-mode .ort-autocomplete-eintrag.ist-aktiv {
    background: var(--surface-3) !important;
}

/* Mobile */

@media (max-width:700px) {
    .ort-autocomplete-liste {
        max-height: 260px;
    }
}

/*
 * * ---------------------------------------------------------
 * * WOHNORTVERWALTUNG
 * * ---------------------------------------------------------
 */

.wohnort-verwaltung-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.wohnort-pruefen-box, .wohnort-hinzufuegen-box {
    padding: 22px;
    border: 1px solid var(--border, #d9e0ea);
    border-radius: 16px;
    background: var(--surface-2, #ffffff);
    color: var(--text, #17345d);
}

.wohnort-pruefen-box h3, .wohnort-hinzufuegen-box h3 {
    margin: 0 0 18px;
}

.wohnort-pruefen-box label, .wohnort-form-field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.wohnort-suche-zeile {
    display: flex;
    gap: 10px;
}

.wohnort-suche-zeile input {
    flex: 1;
    min-width: 0;
}

.wohnort-pruefen-ergebnis {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.wohnort-pruefen-treffer, .wohnort-pruefen-fehlt, .wohnort-pruefen-hinweis, .wohnort-pruefen-fehler {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
}

.wohnort-pruefen-treffer {
    background: #eef6ff;
    border: 1px solid #c9e0ff;
}

.wohnort-pruefen-fehlt {
    background: #fff8e8;
    border: 1px solid #f3d58a;
}

.wohnort-pruefen-hinweis {
    background: #f4f6f9;
}

.wohnort-pruefen-fehler {
    background: #fff0f0;
    border: 1px solid #efb4b4;
}

.wohnort-pruefen-fehlt div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wohnort-pruefen-fehlt span:not(.material-symbols-rounded) {
    font-size: 0.9rem;
    opacity: 0.75;
}

.wohnort-hinzufuegen-form {
    display: grid;
    gap: 18px;
}

.wohnort-form-grid {
    display: grid;
    gap: 14px;
}

.wohnort-form-field input {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 850px) {
    .wohnort-verwaltung-layout {
        grid-template-columns: 1fr;
    }

    .wohnort-suche-zeile {
        flex-direction: column;
    }
}

/*
 * * ---------------------------------------------------------
 * * EINLIEFERER HINZUFÜGEN – KOMPAKTE ZEILE
 * * ---------------------------------------------------------
 */

.einlieferer-add-form-kompakt {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) minmax(190px, 1.2fr) minmax(160px, 1fr) minmax(180px, 1fr) 46px;
    gap: 14px;
    align-items: end;
}

.einlieferer-add-form-kompakt .form-group {
    min-width: 0;
    margin: 0;
}

.einlieferer-add-form-kompakt .form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.einlieferer-add-form-kompakt .form-group input {
    width: 100%;
    box-sizing: border-box;
}

.einlieferer-add-form-kompakt .form-group-wohnort {
    position: relative;
}

.einlieferer-add-form-kompakt .ort-autocomplete {
    width: 100%;
}

.einlieferer-add-form-kompakt .ort-autocomplete-liste {
    z-index: 50;
}

.einlieferer-speichern-wrap {
    display: flex;
    align-items: flex-end;
}

.einlieferer-speichern-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid #bfd0e4;
    border-radius: 12px;
    background: #e7eef7;
    color: #0b2b53;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.einlieferer-speichern-icon:hover {
    background: #dbe8f6;
    border-color: #9fb9d6;
}

.einlieferer-speichern-icon:active {
    transform: scale(0.97);
}

.einlieferer-speichern-icon .material-symbols-rounded {
    font-size: 22px;
}

@media (max-width: 1250px) {
    .einlieferer-add-form-kompakt {
        grid-template-columns: repeat(2, minmax(180px, 1fr)) 46px;
    }

    .form-group-wohnort {
        grid-column: span 2;
    }
}

@media (max-width: 700px) {
    .einlieferer-add-form-kompakt {
        grid-template-columns: 1fr;
    }

    .form-group-wohnort {
        grid-column: auto;
    }

    .einlieferer-speichern-wrap {
        justify-content: flex-end;
    }
}

/*
 * * =========================================================
 * * Portal – Verkaufstabelle
 * * =========================================================
 */

.portal-verkauf-table {
    min-width: 960px;
    table-layout: auto;
}

.portal-verkauf-table th, .portal-verkauf-table td {
    vertical-align: middle;
}

.portal-verkauf-table th:nth-child(1), .portal-verkauf-table td:nth-child(1) {
    width: 150px;
}

.portal-verkauf-table th:nth-child(2), .portal-verkauf-table td:nth-child(2) {
    width: 150px;
}

.portal-verkauf-table th:nth-child(4), .portal-verkauf-table td:nth-child(4) {
    width: 110px;
}

.portal-verkauf-table th:nth-child(5), .portal-verkauf-table td:nth-child(5) {
    width: 120px;
}

.portal-verkauf-table th:nth-child(6), .portal-verkauf-table td:nth-child(6) {
    width: 120px;
}

.portal-verkauf-table th:nth-child(7), .portal-verkauf-table td:nth-child(7) {
    width: 150px !important;
    min-width: 150px;
    text-align: center;
}

.portal-verkauf-table td:nth-child(6) {
    white-space: nowrap;
}

.portal-verkauf-table td:nth-child(7) {
    white-space: nowrap;
}

/*
 * * =========================================================
 * * Portal – Artikelübersicht
 * * =========================================================
 */

.portal-artikel-form-kompakt {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(210px, 1.35fr) minmax(150px, 0.9fr) minmax(150px, 0.9fr) minmax(130px, 0.75fr) 46px;
    gap: 14px;
    align-items: end;
    margin: 0;
    padding: 18px;
    background: var(--surface-2);
    border: 0;
    border-radius: 16px;
    box-shadow: none;
}

.portal-artikel-form-kompakt .form-group {
    min-width: 0;
    margin: 0;
}

.portal-artikel-form-kompakt .form-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.portal-artikel-form-kompakt input, .portal-artikel-form-kompakt select {
    width: 100%;
    min-width: 0;
    height: 46px;
    margin: 0;
}

.portal-artikel-speichern-wrap {
    display: flex;
    align-items: flex-end;
}

.portal-artikel-speichern-icon {
    width: 46px;
    min-width: 46px;
    height: 46px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #bfd0e4;
    border-radius: 12px;
    background: #e7eef7;
    color: #0b2b53;
    cursor: pointer;
}

.portal-artikel-speichern-icon .material-symbols-rounded {
    font-size: 23px;
}

/* Tabelle */

.portal-artikel-table {
    min-width: 1080px;
    table-layout: auto;
}

.portal-artikel-table th, .portal-artikel-table td {
    vertical-align: middle;
}

.portal-artikel-table th:nth-child(1), .portal-artikel-table td:nth-child(1) {
    width: 140px;
}

.portal-artikel-table th:nth-child(2), .portal-artikel-table td:nth-child(2) {
    width: 145px;
}

.portal-artikel-table th:nth-child(4), .portal-artikel-table td:nth-child(4) {
    width: 105px;
}

.portal-artikel-table th:nth-child(5), .portal-artikel-table td:nth-child(5) {
    width: 115px;
}

.portal-artikel-table th:nth-child(6), .portal-artikel-table td:nth-child(6) {
    width: 110px;
    white-space: nowrap;
}

.portal-artikel-table th:nth-child(7), .portal-artikel-table td:nth-child(7) {
    width: 145px;
    text-align: center;
    white-space: nowrap;
}

.portal-artikel-table th:nth-child(8), .portal-artikel-table td:nth-child(8) {
    width: 120px !important;
    min-width: 120px;
    text-align: center;
    white-space: nowrap;
}

.portal-keine-aktion {
    color: var(--muted);
    font-weight: 700;
}

/* Responsive Formular */

@media (max-width: 1100px) {
    .portal-artikel-form-kompakt {
        grid-template-columns: repeat(2, minmax(0, 1fr)) 46px;
    }
}

@media (max-width: 700px) {
    .portal-artikel-form-kompakt {
        grid-template-columns: 1fr;
    }

    .portal-artikel-speichern-wrap {
        justify-content: flex-end;
    }
}

/*
 * * =========================================================
 * * Dashboard – kompakte Tabellen ohne horizontales Scrollen
 * * =========================================================
 */

.dashboard-two-columns {
    align-items: start;
}

.dashboard-two-columns .dashboard-panel {
    min-width: 0;
}

.dashboard-two-columns .einlieferer-table-wrapper {
    overflow-x: visible;
}

.dashboard-compact-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--surface);
    border: 1px solid #cad6e3;
    border-radius: 14px;
    overflow: hidden;
}

.dashboard-compact-table th, .dashboard-compact-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #d9e2ec;
    vertical-align: middle;
}

.dashboard-compact-table th {
    background: #edf3f8;
    color: #334d6a;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    white-space: nowrap;
}

.dashboard-compact-table tbody tr:nth-child(even) {
    background: var(--surface-2);
}

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

.dashboard-compact-table td {
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-compact-table strong {
    font-weight: 800;
}

.dashboard-empty-cell {
    padding: 26px 16px !important;
    text-align: center !important;
    color: var(--text-soft);
}

/* Letzte Verkäufe */

.dashboard-verkaeufe-table th:nth-child(6), .dashboard-verkaeufe-table td:nth-child(6) {
    width: 78px;
    text-align: right;
    white-space: nowrap;
}

/* Offene Auszahlungen */

.dashboard-auszahlungen-table th:nth-child(1), .dashboard-auszahlungen-table td:nth-child(1) {
    width: 95px;
}

.dashboard-auszahlungen-table th:nth-child(2), .dashboard-auszahlungen-table td:nth-child(2) {
    width: 220px;
}

.dashboard-auszahlungen-table th:nth-child(3), .dashboard-auszahlungen-table td:nth-child(3) {
    width: 90px;
    text-align: center;
}

.dashboard-auszahlungen-table th:nth-child(4), .dashboard-auszahlungen-table td:nth-child(4) {
    width: 120px;
    text-align: right;
    white-space: nowrap;
}

/* Dark Mode */

body.dark-mode .dashboard-compact-table {
    border-color: #3d5067;
}

body.dark-mode .dashboard-compact-table th {
    background: #29394f;
    color: #c9d8ea;
}

body.dark-mode .dashboard-compact-table th, body.dark-mode .dashboard-compact-table td {
    border-color: #34475d;
}

/* Responsive */

@media (max-width: 1200px) {
    .dashboard-two-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .dashboard-compact-table th, .dashboard-compact-table td {
        padding: 10px 8px;
        font-size: 0.82rem;
    }

    .dashboard-verkaeufe-table th:nth-child(1), .dashboard-verkaeufe-table td:nth-child(1) {
        display: none;
    }

    .dashboard-verkaeufe-table th:nth-child(5), .dashboard-verkaeufe-table td:nth-child(5) {
        display: none;
    }
}

.dashboard-verkaeufe-table th:nth-child(1), .dashboard-verkaeufe-table td:nth-child(1) {
    width: 90px;
}

.dashboard-verkaeufe-table th:nth-child(2), .dashboard-verkaeufe-table td:nth-child(2) {
    width: 110px;
}

.dashboard-verkaeufe-table th:nth-child(3), .dashboard-verkaeufe-table td:nth-child(3) {
    width: 155px;
}

.dashboard-verkaeufe-table th:nth-child(4), .dashboard-verkaeufe-table td:nth-child(4) {
    width: 220px;
}

.dashboard-verkaeufe-table th:nth-child(5), .dashboard-verkaeufe-table td:nth-child(5) {
    width: 90px;
}

/*
 * * =========================================================
 * * Anklickbarer Vermisst-Status
 * * =========================================================
 */

.status-vermisst-link {
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.status-vermisst-link:hover {
    transform: translateY(-1px);
    filter: brightness(0.96);
    box-shadow: 0 4px 10px rgba(185, 28, 28, 0.16);
}

.status-vermisst-link:focus-visible {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

/*
 * * =========================================================
 * * Vermisst-Dialog
 * * =========================================================
 */

.vermisst-modal-form select, .vermisst-modal-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 12px;
    background: var(--input-bg, #ffffff);
    color: inherit;
    font: inherit;
    padding: 12px 14px;
}

.vermisst-modal-form select:focus, .vermisst-modal-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.required {
    color: #dc2626;
}

@media (max-width: 600px) {
    .vermisst-modal {
        padding: 12px;
        align-items: flex-end;
    }

    .vermisst-modal-dialog {
        width: 100%;
        max-height: calc(100vh - 24px);
        border-radius: 20px 20px 12px 12px;
        padding: 22px 18px;
    }

    .vermisst-modal-actions {
        flex-direction: column-reverse;
    }

    .vermisst-modal-actions .btn {
        width: 100%;
    }
}

.vermisst-info-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 24px;
    align-items: start;
}

.vermisst-info-card {
    min-width: 0;
}

.vermisst-info-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.vermisst-info-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.vermisst-info-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(220, 38, 38, 0.10);
    color: #dc2626;
}

.vermisst-info-icon .material-symbols-rounded {
    font-size: 28px;
}

.vermisst-info-title h2 {
    margin: 0 0 4px;
}

.vermisst-info-title p {
    margin: 0;
    color: var(--text-muted, #64748b);
}

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

.vermisst-detail-item {
    min-width: 0;
}

.vermisst-detail-value {
    overflow-wrap: anywhere;
    font-weight: 700;
}

.vermisst-note {
    line-height: 1.55;
    font-weight: 500;
}

.vermisst-action-card h2 {
    margin-top: 0;
}

.vermisst-action-card > p {
    margin-top: -8px;
    margin-bottom: 22px;
    color: var(--text-muted, #64748b);
}

.vermisst-action-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.vermisst-action-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vermisst-action-form label {
    font-weight: 700;
}

.vermisst-action-form textarea {
    width: 100%;
    min-height: 120px;
    box-sizing: border-box;
    resize: vertical;
    padding: 12px 14px;
    border-radius: 12px;
    font: inherit;
}

.vermisst-action-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.vermisst-action-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.vermisst-action-buttons .btn {
    width: 100%;
    justify-content: center;
}

.btn-success {
    background: #15803d;
    color: #ffffff;
    border-color: #15803d;
}

.btn-success:hover {
    background: #166534;
    border-color: #166534;
}

.btn-warning {
    background: #b45309;
    color: #ffffff;
    border-color: #b45309;
}

.btn-warning:hover {
    background: #92400e;
    border-color: #92400e;
}

.vermisst-back-row {
    margin-top: 24px;
}

@media (max-width: 950px) {
    .vermisst-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .vermisst-details {
        grid-template-columns: 1fr;
    }

    .vermisst-detail-item.full {
        grid-column: auto;
    }

    .vermisst-info-header {
        flex-direction: column;
    }
}

.annahme-form {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    flex-wrap: nowrap;
}

.annahme-form .form-group {
    flex: 1;
    min-width: 0;
}

.annahme-form .form-group:first-child {
    flex: 0 0 280px;
}

.annahme-form .form-group:nth-child(3) {
    flex: 0 0 280px;
}

.annahme-form .form-group:nth-child(4) {
    flex: 0 0 200px;
}

.annahme-form .form-group:nth-child(5) {
    flex: 0 0 220px;
}

.annahme-save {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    min-width: 48px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
}

/*
 * * ======================================================
 * * Vermisster Artikel
 * * ======================================================
 */

.vermisst-detail-item {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
}

.vermisst-detail-label {
    display: block;
    margin-bottom: 8px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.vermisst-detail-value {
    display: block;
    color: var(--text);
    word-break: break-word;
}

.vermisst-note {
    white-space: pre-wrap;
}

.vermisst-detail-item.full {
    grid-column: 1 / -1;
}

.vermisst-action-form textarea {
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--border);
}

.vermisst-action-form textarea::placeholder {
    color: var(--text-secondary);
}

/*
 * * ======================================================
 * * PORTAL – MOBILE BOTTOM NAVIGATION
 * * ======================================================
 */

.portal-mobile-bottom-nav {
    display: none;
}

.portal-navlinks a.active {
    color: var(--primary, #2563eb);
}

/*
 * * ======================================================
 * * HANDYANSICHT
 * * ======================================================
 */

@media (max-width: 1100px) {
    body {
        padding-bottom: calc( 86px + env(safe-area-inset-bottom) );
    }

    /*
     * * ----------------------------------------------
     * * Obere Navigation
     * * ----------------------------------------------
     */

    .portal-topnav {
        min-height: 64px;
        padding: 10px 14px;
        gap: 10px;
    }

    .portal-brand {
        min-width: 0;
        flex: 1;
    }

    .portal-brand div {
        min-width: 0;
    }

    .portal-brand strong {
        display: block;
        font-size: 0.95rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .portal-brand span {
        display: block;
        margin-top: 1px;
        font-size: 0.72rem;
    }

    /* Desktop-Menüpunkte ausblenden */

    .portal-navlinks {
        display: none;
    }

    /* Aktionen oben rechts */

    .portal-nav-actions {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }

    .portal-theme-toggle, .portal-profile-button {
        width: 40px;
        height: 40px;
        min-width: 40px;
        padding: 0;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .portal-theme-toggle .material-symbols-rounded, .portal-profile-button .material-symbols-rounded {
        font-size: 22px;
    }

    .portal-logout {
        width: 40px;
        height: 40px;
        min-width: 40px;
        padding: 0;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .portal-logout-text {
        display: none;
    }

    .portal-logout-icon {
        display: inline-block;
        font-size: 22px;
    }

    /*
     * * ----------------------------------------------
     * * Navigation unten
     * * ----------------------------------------------
     */

    .portal-mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2000;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        min-height: 72px;
        padding: 7px 5px calc( 20px + env(safe-area-inset-bottom) );
        background: rgba(255, 255, 255, 0.97);
        border-top: 1px solid rgba(15, 23, 42, 0.12);
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .portal-mobile-nav-item {
        position: relative;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 3px 1px;
        color: #64748b;
        text-decoration: none;
        border-radius: 12px;
        transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
    }

    .portal-mobile-nav-item > .material-symbols-rounded {
        font-size: 24px;
    }

    .portal-mobile-nav-label {
        display: block;
        width: 100%;
        font-size: 0.66rem;
        font-weight: 600;
        line-height: 1.1;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .portal-mobile-nav-item.active {
        color: var(--primary, #2563eb);
    }

    .portal-mobile-nav-item.active > .material-symbols-rounded {
        font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 24;
    }

    /*
     * * ----------------------------------------------
     * * Dashboard in der Mitte hervorheben
     * * ----------------------------------------------
     */

    .portal-mobile-dashboard {
        margin-top: -18px;
    }

    .portal-mobile-dashboard-icon {
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        background: var(--primary, #2563eb);
        border-radius: 17px;
        border: 5px solid #ffffff;
        box-shadow: 0 8px 18px rgba(37, 99, 235, 0.3);
    }

    .portal-mobile-dashboard-icon .material-symbols-rounded {
        font-size: 26px;
        font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 24;
    }

    .portal-mobile-dashboard .portal-mobile-nav-label {
        margin-top: 1px;
    }
}

/*
 * * ======================================================
 * * MOBILE NAVIGATION – DARKMODE
 * * ======================================================
 */

@media (max-width: 1100px) {
    body.dark-mode .portal-mobile-bottom-nav {
        background: rgba(15, 23, 42, 0.97);
        border-top-color: rgba(148, 163, 184, 0.2);
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.3);
    }

    body.dark-mode .portal-mobile-nav-item {
        color: #94a3b8;
    }

    body.dark-mode .portal-mobile-nav-item.active {
        color: #60a5fa;
    }

    body.dark-mode .portal-mobile-dashboard-icon {
        color: #ffffff;
        background: #2563eb;
        border-color: #0f172a;
    }
}

/*
 * * ======================================================
 * * SEHR KLEINE HANDYS
 * * ======================================================
 */

@media (max-width: 390px) {
    .portal-topnav {
        padding-left: 10px;
        padding-right: 10px;
    }

    .portal-brand strong {
        font-size: 0.85rem;
    }

    .portal-brand span {
        font-size: 0.67rem;
    }

    .portal-theme-toggle, .portal-profile-button, .portal-logout {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .portal-mobile-nav-label {
        font-size: 0.6rem;
    }

    .portal-mobile-dashboard-icon {
        width: 46px;
        height: 46px;
    }
}

@media (max-width: 1100px) {
    .portal-navlinks {
        display: none !important;
    }

    .portal-mobile-bottom-nav {
        display: grid !important;
    }

    .portal-topnav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 64px;
        padding: 10px 16px;
    }

    .portal-nav-actions {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 7px;
    }

    .portal-theme-toggle, .portal-profile-button, .portal-logout {
        width: 40px;
        height: 40px;
        min-width: 40px;
        padding: 0;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .portal-logout-text {
        display: none;
    }

    .portal-logout-icon {
        display: inline-block;
    }

    body {
        padding-bottom: calc( 88px + env(safe-area-inset-bottom) );
    }
}

/*
 * * ======================================================
 * * PORTAL HERO – MOBILE
 * * ======================================================
 */

@media (max-width: 1100px) {
    .portal-hero {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 14px;
        padding: 24px;
    }

    .portal-hero h1 {
        margin: 0;
        font-size: 2rem;
        line-height: 1.15;
    }

    .portal-hero p {
        margin: 0;
        max-width: 100%;
        font-size: 1.1rem;
        line-height: 1.5;
    }
}

/*
 * * ======================================================
 * * MOBILE NAVIGATION – IPHONE-BEREICH UNTEN ABDECKEN
 * * ======================================================
 */

@media (max-width: 1100px) {
    .portal-mobile-bottom-nav {
        isolation: isolate;
        overflow: visible;
    }

    .portal-mobile-bottom-nav::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 160px;
        background: rgba(255, 255, 255, 0.99);
        pointer-events: none;
    }

    body.dark-mode .portal-mobile-bottom-nav::after {
        background: rgba(15, 23, 42, 0.99);
    }
}

/*
 * * ======================================================
 * * PORTAL VERKAUF – STATISTIKEN MOBILE
 * * ======================================================
 */

@media (max-width: 1100px) {
    .portal-dashboard-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .dashboard-stat-card {
        min-width: 0;
        padding: 16px;
        border-radius: 16px;
    }

    .dashboard-stat-card > .material-symbols-rounded {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .dashboard-stat-card p {
        margin: 0 0 6px;
        font-size: 0.8rem;
        line-height: 1.25;
    }

    .dashboard-stat-card h2 {
        margin: 0;
        font-size: 1.65rem;
        line-height: 1.1;
    }
}

@media (max-width: 380px) {
    .portal-dashboard-grid {
        gap: 8px;
    }

    .dashboard-stat-card {
        padding: 13px;
    }

    .dashboard-stat-card h2 {
        font-size: 1.4rem;
    }
}

/*
 * * =========================================================
 * * Portal-Dashboard
 * * =========================================================
 */

.portal-dashboard {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.portal-dashboard .portal-card, .portal-dashboard .portal-hero {
    margin-bottom: 0;
}

.portal-dashboard-hero {
    min-height: 170px;
}

.portal-dashboard-section {
    padding: 30px;
}

.portal-dashboard-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.portal-dashboard-heading h2 {
    margin: 0 0 5px;
    color: var(--primary-dark);
}

.portal-dashboard-heading p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.5;
}

.portal-dashboard-heading-icon {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: var(--surface-2);
    color: var(--primary-dark);
    border: 1px solid var(--border);
}

.portal-dashboard-heading-icon .material-symbols-rounded {
    font-size: 27px;
}

.portal-dashboard-heading-warning {
    color: #b45309;
    background: #fff7e6;
    border-color: #fcd34d;
}

/* Persönlicher Status */

.portal-personal-status {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.portal-status-step {
    min-width: 0;
    min-height: 84px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface-2);
}

.portal-status-step-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface);
    color: var(--muted);
    border: 1px solid var(--border);
}

.portal-status-step-icon .material-symbols-rounded {
    font-size: 23px;
}

.portal-status-step-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.portal-status-step-content strong {
    color: var(--text);
    font-size: 15px;
}

.portal-status-step-content span {
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.35;
}

.portal-status-step-erledigt {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.portal-status-step-erledigt .portal-status-step-icon {
    background: #dcfce7;
    color: #15803d;
    border-color: #86efac;
}

.portal-status-step-warnung {
    background: #fffbeb;
    border-color: #fde68a;
}

.portal-status-step-warnung .portal-status-step-icon {
    background: #fef3c7;
    color: #b45309;
    border-color: #fcd34d;
}

.portal-status-step-teilweise {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.portal-status-step-teilweise .portal-status-step-icon {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.portal-status-step-gesperrt {
    opacity: 0.65;
}

/* Timeline */

.portal-sale-timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    position: relative;
}

.portal-sale-timeline::before {
    content: "";
    position: absolute;
    top: 28px;
    left: 12.5%;
    right: 12.5%;
    height: 3px;
    background: var(--border);
    border-radius: 999px;
}

.portal-timeline-item {
    min-width: 0;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 14px;
    text-align: center;
}

.portal-timeline-marker {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border: 3px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--muted);
}

.portal-timeline-marker .material-symbols-rounded {
    font-size: 27px;
}

.portal-timeline-content {
    min-width: 0;
}

.portal-timeline-title-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
}

.portal-timeline-content h3 {
    margin: 0;
    color: var(--text);
    font-size: 17px;
}

.portal-timeline-content p {
    margin: 8px 0 0;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.45;
}

.portal-timeline-item-aktiv .portal-timeline-marker {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #3b82f6;
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.12);
}

.portal-timeline-item-erledigt .portal-timeline-marker {
    background: #dcfce7;
    color: #15803d;
    border-color: #22c55e;
}

.portal-timeline-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 0 9px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
}

.portal-timeline-badge-done {
    background: #dcfce7;
    color: #15803d;
}

/* Mitteilungen */

.portal-dashboard-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portal-dashboard-message {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 17px 18px;
    border: 1px solid #fcd34d;
    border-radius: 16px;
    background: #fffbeb;
}

.portal-dashboard-message-icon {
    width: 37px;
    height: 37px;
    flex: 0 0 37px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #fef3c7;
    color: #b45309;
}

.portal-dashboard-message-icon .material-symbols-rounded {
    font-size: 22px;
}

.portal-dashboard-message strong {
    display: block;
    margin-bottom: 4px;
    color: #92400e;
}

.portal-dashboard-message p {
    margin: 0;
    color: #78350f;
    line-height: 1.5;
}

/* FAQ */

.portal-faq-list {
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
}

.portal-faq-item {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.portal-faq-item:last-child {
    border-bottom: 0;
}

.portal-faq-item summary {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 19px;
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.portal-faq-item summary::-webkit-details-marker {
    display: none;
}

.portal-faq-item summary:hover {
    background: var(--surface-2);
}

.portal-faq-arrow {
    flex-shrink: 0;
    color: var(--muted);
    transition: transform 0.2s ease;
}

.portal-faq-item[open] .portal-faq-arrow {
    transform: rotate(180deg);
}

.portal-faq-answer {
    padding: 0 19px 19px;
    color: var(--text-soft);
    line-height: 1.6;
}

/* Dark Mode */

body.dark-mode .portal-status-step-erledigt {
    background: #143323;
    border-color: #166534;
}

body.dark-mode .portal-status-step-erledigt .portal-status-step-icon {
    background: #14532d;
    color: #bbf7d0;
    border-color: #22c55e;
}

body.dark-mode .portal-status-step-warnung {
    background: #35250c;
    border-color: #92400e;
}

body.dark-mode .portal-status-step-warnung .portal-status-step-icon {
    background: #422006;
    color: #fde68a;
    border-color: #f59e0b;
}

body.dark-mode .portal-status-step-teilweise {
    background: #172554;
    border-color: #1e40af;
}

body.dark-mode .portal-status-step-teilweise .portal-status-step-icon {
    background: #1e3a8a;
    color: #bfdbfe;
    border-color: #3b82f6;
}

body.dark-mode .portal-dashboard-heading-warning {
    background: #422006;
    color: #fde68a;
    border-color: #f59e0b;
}

body.dark-mode .portal-dashboard-message {
    background: #35250c;
    border-color: #92400e;
}

body.dark-mode .portal-dashboard-message-icon {
    background: #422006;
    color: #fde68a;
}

body.dark-mode .portal-dashboard-message strong {
    color: #fde68a;
}

body.dark-mode .portal-dashboard-message p {
    color: #fef3c7;
}

/* Tablet */

@media (max-width: 900px) {
    .portal-personal-status {
        grid-template-columns: 1fr;
    }

    .portal-sale-timeline {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .portal-sale-timeline::before {
        top: 29px;
        bottom: 150px;
        left: 28px;
        right: auto;
        width: 3px;
        height: auto;
    }

    .portal-timeline-item {
        min-height: 105px;
        display: grid;
        grid-template-columns: 58px minmax(0, 1fr);
        align-items: flex-start;
        gap: 17px;
        padding: 0;
        text-align: left;
    }

    .portal-timeline-marker {
        margin: 0;
    }

    .portal-timeline-content {
        padding: 7px 0 24px;
    }

    .portal-timeline-title-row {
        flex-direction: row;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .portal-timeline-content p {
        font-size: 14px;
    }
}

/* Spezielle Handyversion */

@media (max-width: 700px) {
    .portal-dashboard {
        gap: 16px;
    }

    .portal-dashboard-hero {
        min-height: auto;
        padding: 24px 20px;
    }

    .portal-dashboard-hero h1 {
        font-size: 28px;
    }

    .portal-dashboard-hero p {
        margin-top: 8px;
        font-size: 15px;
        line-height: 1.5;
    }

    .portal-dashboard-section {
        padding: 20px 16px;
        border-radius: 20px;
    }

    .portal-dashboard-heading {
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 18px;
    }

    .portal-dashboard-heading-icon {
        width: 43px;
        height: 43px;
        flex-basis: 43px;
        border-radius: 13px;
    }

    .portal-dashboard-heading-icon .material-symbols-rounded {
        font-size: 24px;
    }

    .portal-dashboard-heading h2 {
        font-size: 21px;
    }

    .portal-dashboard-heading p {
        font-size: 13px;
    }

    .portal-personal-status {
        gap: 9px;
    }

    .portal-status-step {
        min-height: 72px;
        gap: 12px;
        padding: 13px 14px;
        border-radius: 15px;
    }

    .portal-status-step-icon {
        width: 37px;
        height: 37px;
        flex-basis: 37px;
    }

    .portal-status-step-icon .material-symbols-rounded {
        font-size: 21px;
    }

    .portal-status-step-content strong {
        font-size: 14px;
    }

    .portal-status-step-content span {
        font-size: 13px;
    }

    .portal-sale-timeline::before {
        left: 22px;
        top: 23px;
        bottom: 150px;
    }

    .portal-timeline-item {
        min-height: 91px;
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 13px;
    }

    .portal-timeline-marker {
        width: 46px;
        height: 46px;
        border-width: 2px;
    }

    .portal-timeline-marker .material-symbols-rounded {
        font-size: 23px;
    }

    .portal-timeline-content {
        padding: 3px 0 20px;
    }

    .portal-timeline-content h3 {
        font-size: 16px;
    }

    .portal-timeline-content p {
        margin-top: 5px;
        font-size: 13px;
    }

    .portal-timeline-badge {
        min-height: 22px;
        font-size: 10px;
    }

    .portal-dashboard-message {
        gap: 11px;
        padding: 14px;
    }

    .portal-dashboard-message-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .portal-dashboard-message strong {
        font-size: 14px;
    }

    .portal-dashboard-message p {
        font-size: 13px;
    }

    .portal-faq-list {
        border-radius: 15px;
    }

    .portal-faq-item summary {
        min-height: 60px;
        padding: 14px;
        font-size: 14px;
        line-height: 1.4;
    }

    .portal-faq-answer {
        padding: 0 14px 16px;
        font-size: 13px;
        line-height: 1.55;
    }
}

/*
 * * =========================================================
 * * Portal-FAQ – Themengruppen
 * * =========================================================
 */

.portal-faq-groups {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.portal-faq-group {
    min-width: 0;
}

.portal-faq-group-title {
    margin: 0 0 12px;
    padding-left: 2px;
    color: var(--primary-dark);
    font-size: 18px;
    line-height: 1.3;
}

@media (max-width: 700px) {
    .portal-faq-groups {
        gap: 22px;
    }

    .portal-faq-group-title {
        margin-bottom: 9px;
        font-size: 16px;
    }
}

/*
 * * =========================================================
 * * Portal-FAQ – aufklappbare Oberkategorien
 * * =========================================================
 */

.portal-faq-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portal-faq-category {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.portal-faq-category > summary {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 20px;
    color: var(--text);
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
    transition: background 0.18s ease;
}

.portal-faq-category > summary::-webkit-details-marker {
    display: none;
}

.portal-faq-category > summary:hover {
    background: var(--surface-2);
}

.portal-faq-category[open] > summary {
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.portal-faq-category-arrow {
    flex-shrink: 0;
    color: var(--muted);
    transition: transform 0.2s ease;
}

.portal-faq-category[open] .portal-faq-category-arrow {
    transform: rotate(180deg);
}

.portal-faq-category-content {
    padding: 4px 22px;
}

.portal-faq-entry {
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
}

.portal-faq-entry:last-child {
    border-bottom: 0;
}

.portal-faq-entry h3 {
    margin: 0 0 9px;
    color: var(--text);
    font-size: 16px;
    line-height: 1.4;
}

.portal-faq-entry p {
    margin: 0 0 10px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
}

.portal-faq-entry p:last-child {
    margin-bottom: 0;
}

/* Handyversion */

@media (max-width: 700px) {
    .portal-faq-categories {
        gap: 9px;
    }

    .portal-faq-category {
        border-radius: 15px;
    }

    .portal-faq-category > summary {
        min-height: 60px;
        padding: 14px 15px;
        font-size: 15px;
        line-height: 1.4;
    }

    .portal-faq-category-content {
        padding: 0 15px;
    }

    .portal-faq-entry {
        padding: 18px 0;
    }

    .portal-faq-entry h3 {
        margin-bottom: 7px;
        font-size: 14px;
    }

    .portal-faq-entry p {
        margin-bottom: 9px;
        font-size: 13px;
        line-height: 1.55;
    }
}

/*
 * * =========================================================
 * * PORTAL-ANKÜNDIGUNGEN – EINSTELLUNGEN
 * * Passend zu den vorhandenen Einstellungen-Komponenten
 * * =========================================================
 */

.settings-announcements {
    margin-bottom: 30px;
}

/* Neue Ankündigung */

.announcement-create-card {
    padding: 22px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.announcement-create-header h3 {
    margin: 0 0 5px;
    color: var(--text);
    font-size: 18px;
}

.announcement-create-header p {
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
}

/* Globale Formular-Karten neutralisieren */

.announcement-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    margin: 18px 0 0 !important;
    padding: 20px !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px !important;
    box-shadow: none !important;
}

.announcement-edit-area .announcement-form {
    margin-top: 0 !important;
}

.announcement-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.announcement-field label {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.announcement-field input, .announcement-field textarea {
    width: 100%;
    min-width: 0;
    margin: 0;
}

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

.announcement-field-hint {
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.45;
}

.announcement-options-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 16px;
    align-items: stretch;
}

.announcement-publish-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 82px;
    padding: 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
}

.announcement-publish-card > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.announcement-publish-card .settings-toggle {
    position: relative;
    width: 50px;
    height: 28px;
    flex: 0 0 50px;
}

.announcement-publish-card .settings-toggle-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #c8d1dd;
    transition: .2s ease;
}

.announcement-publish-card .settings-toggle-slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(20,35,55,.25);
    transition: .2s ease;
}

.announcement-publish-card > input:checked ~ .settings-toggle .settings-toggle-slider {
    background: #104584;
}

.announcement-publish-card > input:checked ~ .settings-toggle .settings-toggle-slider::before {
    transform: translateX(22px);
}

.announcement-publish-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.announcement-publish-content strong {
    color: var(--text);
    font-size: 14px;
}

.announcement-publish-content small {
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.4;
}

.announcement-form-actions, .announcement-edit-actions {
    display: flex;
    justify-content: flex-end;
}

.announcement-form-actions .btn, .announcement-edit-actions .btn {
    gap: 8px;
}

.announcement-form-actions .material-symbols-rounded, .announcement-edit-actions .material-symbols-rounded {
    font-size: 20px;
}

/* Übersicht */

.announcement-list-section {
    margin-top: 28px;
}

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

.announcement-list-header h3 {
    margin: 0 0 5px;
    color: var(--text);
    font-size: 18px;
}

.announcement-list-header p {
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
}

.announcement-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.announcement-card {
    padding: 20px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.announcement-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.announcement-card-title {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.announcement-card-title .reset-card-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 13px;
}

.announcement-card-title .reset-card-icon .material-symbols-rounded {
    font-size: 24px;
}

.announcement-card-heading {
    min-width: 0;
    flex: 1;
}

.announcement-title-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.announcement-title-line h4 {
    margin: 0;
    color: var(--text);
    font-size: 17px;
}

.announcement-title-line .status-verfuegbar, .announcement-title-line .status-verkauft {
    padding: 5px 9px;
    font-size: 11px;
}

.announcement-card-text {
    margin: 9px 0 8px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.announcement-card-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
}

.announcement-card-meta .material-symbols-rounded {
    font-size: 18px;
}

.announcement-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
}

.announcement-card-actions form {
    display: flex;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.announcement-card-actions .btn {
    min-width: 145px;
    gap: 8px;
}

.announcement-card-actions .material-symbols-rounded {
    font-size: 20px;
}

/* Bearbeiten */

.announcement-edit-area {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.announcement-edit-area[hidden] {
    display: none !important;
}

.announcement-delete-form {
    display: flex;
    justify-content: flex-end;
    margin: 14px 0 0 !important;
    padding: 14px 0 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-top: 1px solid var(--border) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.announcement-delete-form .btn {
    gap: 8px;
}

.announcement-delete-form .material-symbols-rounded {
    font-size: 20px;
}

/* Leerer Zustand */

.announcement-empty-state {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px;
    background: var(--surface-2);
    border: 1px dashed var(--border);
    border-radius: 16px;
}

.announcement-empty-state > .material-symbols-rounded {
    font-size: 30px;
    color: var(--muted);
}

.announcement-empty-state h4 {
    margin: 0 0 4px;
    color: var(--text);
}

.announcement-empty-state p {
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
}

/* Dark Mode */

body.dark-mode .announcement-create-card, body.dark-mode .announcement-card, body.dark-mode .announcement-empty-state, body.dark-mode .announcement-publish-card {
    background: var(--surface-2);
}

body.dark-mode .announcement-form {
    background: var(--surface) !important;
}

body.dark-mode .announcement-publish-card .settings-toggle-slider {
    background: #475569;
}

body.dark-mode .announcement-publish-card > input:checked ~ .settings-toggle .settings-toggle-slider {
    background: var(--primary);
}

/* Responsive */

@media (max-width:900px) {
    .announcement-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .announcement-card-actions {
        width: 100%;
    }

    .announcement-card-actions form, .announcement-card-actions .btn {
        flex: 1;
        width: 100%;
    }
}

@media (max-width:700px) {
    .announcement-options-grid {
        grid-template-columns: 1fr;
    }

    .announcement-create-card, .announcement-card {
        padding: 16px;
    }

    .announcement-form {
        padding: 16px !important;
    }

    .announcement-card-title .reset-card-icon {
        display: none;
    }

    .announcement-card-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .announcement-card-actions form, .announcement-card-actions .btn, .announcement-form-actions .btn, .announcement-edit-actions .btn, .announcement-delete-form .btn {
        width: 100%;
    }

    .announcement-list-header {
        align-items: flex-start;
    }
}

/*
 * * =========================================================
 * * PORTAL – ANKÜNDIGUNGEN
 * * =========================================================
 */

.portal-announcements {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.portal-announcement-card-header h3 {
    line-height: 1.35;
}

.portal-announcement-card-text {
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.portal-announcement-card-meta {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

/* Dark Mode */

body.dark-mode .portal-announcement-card {
    background: var(--surface-2);
}

/* Mobile */

@media (max-width: 700px) {
    .portal-announcement-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .portal-announcement-card {
        padding: 16px;
        border-radius: 14px;
    }

    .portal-announcement-card-header h3 {
        font-size: 16px;
    }

    .portal-announcement-card-text {
        font-size: 13px;
    }
}

/*
 * * =========================================================
 * * PORTAL - ANKÜNDIGUNGEN
 * * =========================================================
 */

.portal-announcement-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.portal-announcement-card {
    padding: 20px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 16px;
    min-width: 0;
}

.portal-announcement-card-header {
    margin-bottom: 10px;
}

.portal-announcement-card-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.portal-announcement-date {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.portal-announcement-card-body {
    color: var(--text-soft);
    line-height: 1.6;
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/*
 * * =========================================================
 * * PORTAL - TIMELINE TERMINE
 * * =========================================================
 */

.portal-timeline-item-aktiv .portal-timeline-time-current {
    color: #2563eb;
}

@media (max-width: 760px) {
    .portal-timeline-time {
        justify-content: flex-start;
        font-size: 12px;
        text-align: left;
    }

    .portal-timeline-dates {
        align-items: flex-start;
    }
}

/*
 * * =========================================================
 * * PORTAL - TIMELINE TERMINE
 * * =========================================================
 */

.portal-timeline-dates {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin: 9px 0 11px;
}

.portal-timeline-time {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    width: 100%;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
}

.portal-timeline-time .material-symbols-rounded {
    flex: 0 0 auto;
    margin-top: 1px;
    font-size: 17px;
}

.portal-timeline-time-current {
    margin: 9px 0 11px;
    color: #2563eb;
}

.portal-timeline-time-current strong {
    font-weight: 700;
}

.portal-timeline-item-offen .portal-timeline-time {
    color: var(--text-soft);
}

@media (max-width: 760px) {
    .portal-timeline-dates {
        align-items: flex-start;
    }

    .portal-timeline-time {
        justify-content: flex-start;
        font-size: 12px;
        text-align: left;
    }
}

/*
 * * =========================================================
 * * PORTAL - TIMELINE PAUSE
 * * =========================================================
 */

.portal-timeline-badge-pause {
    background: #fff3cd;
    color: #8a6200;
}

.portal-timeline-item-pause .portal-timeline-marker {
    border-color: #eab308;
    background: #fffbea;
    color: #a16207;
}

.portal-timeline-item-pause .portal-timeline-time-pause {
    color: #8a6200;
}

.portal-timeline-time-pause {
    margin: 9px 0 11px;
}

/*
 * * =========================================================
 * * Annahme – kompakte Aktionsbuttons wie Einlieferer-Liste
 * * =========================================================
 */

.annahme-artikel-table .action-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.annahme-artikel-table .action-buttons form {
    display: inline-flex;
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.annahme-artikel-table .action-buttons .btn-icon {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex: 0 0 40px;
}

.annahme-artikel-table .action-buttons .btn-icon .material-symbols-rounded {
    font-size: 21px;
    line-height: 1;
}

/* Aktionsspalte passend zu vier kompakten Buttons */

.annahme-artikel-table th:last-child, .annahme-artikel-table td:last-child {
    width: 210px;
    min-width: 210px;
    text-align: center;
    white-space: nowrap;
}

/*
 * * ======================================================
 * * PORTAL TOPNAV – RUNDE BUTTONS AUF DEM HANDY
 * * ======================================================
 */

@media (max-width: 1100px) {
    .portal-theme-toggle, .portal-legal-button, .portal-profile-button, .portal-desktop-profile-button, .portal-logout {
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
        padding: 0 !important;
        margin: 0;
        border-radius: 50% !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 40px;
    }
}

@media (max-width: 390px) {
    .portal-theme-toggle, .portal-legal-button, .portal-profile-button, .portal-desktop-profile-button, .portal-logout {
        width: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
        flex-basis: 36px;
    }
}

/*
 * * ======================================================
 * * PORTAL TOPNAV – RECHTLICHES UND PROFIL
 * * ======================================================
 */

.portal-legal-button, .portal-desktop-profile-button {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.portal-legal-button:hover, .portal-desktop-profile-button:hover {
    transform: translateY(-2px);
}

.portal-legal-button .material-symbols-rounded, .portal-desktop-profile-button .material-symbols-rounded {
    font-size: 24px;
    line-height: 1;
}

/* White Mode */

body:not(.dark-mode) .portal-legal-button, body:not(.dark-mode) .portal-desktop-profile-button {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #cbd5e1;
}

body:not(.dark-mode) .portal-legal-button:hover, body:not(.dark-mode) .portal-desktop-profile-button:hover {
    background: #cbd5e1;
    color: #0f172a;
    border-color: #94a3b8;
}

/* Dark Mode */

body.dark-mode .portal-legal-button, body.dark-mode .portal-desktop-profile-button {
    background: var(--button-gray);
    color: #ffffff;
    border-color: var(--button-gray-border);
}

body.dark-mode .portal-legal-button:hover, body.dark-mode .portal-desktop-profile-button:hover {
    background: var(--button-gray-hover);
    border-color: var(--button-gray-hover);
}

/* Profil oben nur am Desktop anzeigen */

.portal-desktop-profile-button {
    display: inline-flex;
}

@media (max-width: 1100px) {
    .portal-desktop-profile-button {
        display: none !important;
    }
}

/*
 * * ===========================================
 * * Wohnort-Autocomplete
 * * ===========================================
 */

.ort-autocomplete-liste strong {
    display: block;
    margin-bottom: 4px;
}

.ort-autocomplete-liste small {
    display: block;
    line-height: 1.4;
}

/*
 * * ===========================================
 * * Wohnort-Autocomplete
 * * ===========================================
 */

.ort-autocomplete-liste > * {
    padding: 10px 14px;
    margin-bottom: 4px;
    line-height: 1.45;
    border-radius: 10px;
}

.ort-autocomplete-liste > *:last-child {
    margin-bottom: 0;
}

/*
 * * =========================================================
 * * Wohnort-Statistik – Kopfzeile und Excel-Button
 * * =========================================================
 */

.wohnort-statistik-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.wohnort-statistik-header .settings-section-title {
    margin-bottom: 0;
}

.wohnort-excel-button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 18px;
    white-space: nowrap;
}

.wohnort-excel-button .material-symbols-rounded {
    font-size: 22px;
}

@media (max-width: 700px) {
    .wohnort-statistik-header {
        align-items: stretch;
        flex-direction: column;
    }

    .wohnort-excel-button {
        width: 100%;
    }
}

/*
 * * =========================================================
 * * WOHNORT-AUTOCOMPLETE – KORREKTUR
 * * =========================================================
 */

.ort-autocomplete-liste {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 7px;
    max-height: 340px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Das hidden-Attribut muss die Liste vollständig ausblenden */

.ort-autocomplete-liste[hidden] {
    display: none !important;
}

/* Nur die tatsächlichen Vorschlags-Buttons verändern */

.ort-autocomplete-eintrag {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 58px !important;
    margin: 0 !important;
    padding: 10px 13px !important;
    gap: 3px !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    overflow: visible !important;
    line-height: normal !important;
    text-align: left !important;
}

/* Ortsname */

.ort-autocomplete-name {
    display: block !important;
    width: 100%;
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}

/* Gemeinde und Landkreis */

.ort-autocomplete-zusatz {
    display: block !important;
    width: 100%;
    margin: 0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}

/*
 * * =========================================================
 * * PORTAL-TIMELINE – DARKMODE KORREKTUR
 * * =========================================================
 */

/* Verbindungslinie */

body.dark-mode .portal-sale-timeline::before, html[data-theme="dark"] .portal-sale-timeline::before, body[data-theme="dark"] .portal-sale-timeline::before {
    background: #3b4a5f !important;
}

/* Noch offene Schritte */

body.dark-mode .portal-timeline-marker, html[data-theme="dark"] .portal-timeline-marker, body[data-theme="dark"] .portal-timeline-marker {
    background: #1b293b !important;
    border-color: #43526a !important;
    color: #b9c5d5 !important;
}

/* Aktueller Schritt */

body.dark-mode .portal-timeline-item-aktiv .portal-timeline-marker, html[data-theme="dark"] .portal-timeline-item-aktiv .portal-timeline-marker, body[data-theme="dark"] .portal-timeline-item-aktiv .portal-timeline-marker {
    background: #173a67 !important;
    border-color: #3b82f6 !important;
    color: #dbeafe !important;
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.18) !important;
}

/* Badge „Aktuell“ */

body.dark-mode .portal-timeline-badge, html[data-theme="dark"] .portal-timeline-badge, body[data-theme="dark"] .portal-timeline-badge {
    background: #173a67 !important;
    color: #dbeafe !important;
    border: 1px solid #3b82f6 !important;
}

/* Zeitangabe des aktuellen Schritts */

body.dark-mode .portal-timeline-time-current, html[data-theme="dark"] .portal-timeline-time-current, body[data-theme="dark"] .portal-timeline-time-current {
    color: #60a5fa !important;
}

/* Abgeschlossener Schritt */

body.dark-mode .portal-timeline-item-erledigt .portal-timeline-marker, html[data-theme="dark"] .portal-timeline-item-erledigt .portal-timeline-marker, body[data-theme="dark"] .portal-timeline-item-erledigt .portal-timeline-marker {
    background: #123d2b !important;
    border-color: #22c55e !important;
    color: #bbf7d0 !important;
}

/* Badge „Abgeschlossen“ */

body.dark-mode .portal-timeline-badge-done, html[data-theme="dark"] .portal-timeline-badge-done, body[data-theme="dark"] .portal-timeline-badge-done {
    background: #123d2b !important;
    color: #bbf7d0 !important;
    border-color: #22c55e !important;
}

/* Termine und Beschreibung */

body.dark-mode .portal-timeline-time, html[data-theme="dark"] .portal-timeline-time, body[data-theme="dark"] .portal-timeline-time {
    color: #c3cedc;
}

body.dark-mode .portal-timeline-content p, html[data-theme="dark"] .portal-timeline-content p, body[data-theme="dark"] .portal-timeline-content p {
    color: #d3dbe7;
}

/*
 * * =========================================================
 * * PORTAL ARTIKELTABELLE – OHNE HORIZONTALEN SCROLL
 * * =========================================================
 */

.portal-artikel-tabelle-wrapper, .portal-artikel-table-wrapper, .portal-table-wrapper {
    overflow-x: visible !important;
}

.portal-artikel-tabelle, .portal-artikel-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
}

.portal-artikel-tabelle th, .portal-artikel-tabelle td, .portal-artikel-table th, .portal-artikel-table td {
    padding-left: 10px !important;
    padding-right: 10px !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}

/* Spalten gezielt etwas kompakter verteilen */

.portal-artikel-tabelle th:nth-child(1), .portal-artikel-tabelle td:nth-child(1), .portal-artikel-table th:nth-child(1), .portal-artikel-table td:nth-child(1) {
    width: 15%;
}

.portal-artikel-tabelle th:nth-child(2), .portal-artikel-tabelle td:nth-child(2), .portal-artikel-table th:nth-child(2), .portal-artikel-table td:nth-child(2) {
    width: 14%;
}

.portal-artikel-tabelle th:nth-child(3), .portal-artikel-tabelle td:nth-child(3), .portal-artikel-table th:nth-child(3), .portal-artikel-table td:nth-child(3) {
    width: 16%;
}

.portal-artikel-tabelle th:nth-child(4), .portal-artikel-tabelle td:nth-child(4), .portal-artikel-table th:nth-child(4), .portal-artikel-table td:nth-child(4) {
    width: 10%;
}

.portal-artikel-tabelle th:nth-child(5), .portal-artikel-tabelle td:nth-child(5), .portal-artikel-table th:nth-child(5), .portal-artikel-table td:nth-child(5) {
    width: 10%;
}

.portal-artikel-tabelle th:nth-child(6), .portal-artikel-tabelle td:nth-child(6), .portal-artikel-table th:nth-child(6), .portal-artikel-table td:nth-child(6) {
    width: 11%;
}

.portal-artikel-tabelle th:nth-child(7), .portal-artikel-tabelle td:nth-child(7), .portal-artikel-table th:nth-child(7), .portal-artikel-table td:nth-child(7) {
    width: 15%;
}

.portal-artikel-tabelle th:nth-child(8), .portal-artikel-tabelle td:nth-child(8), .portal-artikel-table th:nth-child(8), .portal-artikel-table td:nth-child(8) {
    width: 9%;
}

/*
 * * =========================================================
 * * INTERNES DASHBOARD – UPGRADE
 * * Ganz unten an static/style.css anhängen
 * * =========================================================
 */

.dashboard-hero-upgrade {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.dashboard-hero-copy p, .dashboard-section-heading p, .dashboard-panel-heading-row p, .einlieferer-section-title p {
    margin: 6px 0 0;
    color: var(--text-muted, #607089);
}

.dashboard-eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2563eb;
}

.dashboard-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.dashboard-section-block {
    margin-top: 28px;
}

.dashboard-section-heading, .dashboard-panel-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.dashboard-section-heading {
    margin-bottom: 16px;
}

.dashboard-section-heading h2, .dashboard-panel-heading-row h2 {
    margin: 0;
}

.dashboard-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    background: #f0fdf4;
    color: #15803d;
    font-size: 13px;
    font-weight: 800;
}

.dashboard-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.13);
}

.dashboard-stat-link {
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-stat-link:hover {
    transform: translateY(-3px);
    border-color: #b8cae4;
    box-shadow: 0 16px 34px rgba(25, 48, 82, 0.12);
}

.dashboard-stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-stat-icon {
    font-size: 29px;
}

.dashboard-stat-arrow {
    font-size: 20px;
    opacity: 0;
    transform: translate(-4px, 4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.dashboard-stat-link:hover .dashboard-stat-arrow {
    opacity: 0.7;
    transform: translate(0, 0);
}

.dashboard-stat-card small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted, #607089);
    font-size: 12px;
    line-height: 1.35;
}

.dashboard-timeline-panel, .dashboard-progress-panel {
    margin-top: 28px;
}

.dashboard-panel-action {
    flex: 0 0 auto;
}

.dashboard-progress-value {
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    color: #16a34a;
}

.dashboard-text-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
}

.dashboard-text-link .material-symbols-rounded {
    font-size: 18px;
}

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

body.dark-mode .dashboard-live-badge, html[data-theme="dark"] .dashboard-live-badge, body[data-theme="dark"] .dashboard-live-badge {
    background: #123d2b;
    border-color: #248c55;
    color: #bbf7d0;
}

body.dark-mode .dashboard-eyebrow, html[data-theme="dark"] .dashboard-eyebrow, body[data-theme="dark"] .dashboard-eyebrow, body.dark-mode .dashboard-text-link, html[data-theme="dark"] .dashboard-text-link, body[data-theme="dark"] .dashboard-text-link {
    color: #60a5fa;
}

body.dark-mode .dashboard-progress-value, html[data-theme="dark"] .dashboard-progress-value, body[data-theme="dark"] .dashboard-progress-value {
    color: #4ade80;
}

@media (max-width: 1000px) {
    .dashboard-hero-upgrade, .dashboard-panel-heading-row, .dashboard-section-heading {
        align-items: flex-start;
    }

    .dashboard-hero-upgrade {
        flex-direction: column;
    }

    .dashboard-hero-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .dashboard-panel-heading-row, .dashboard-section-heading {
        flex-direction: column;
    }

    .dashboard-hero-actions .btn, .dashboard-panel-action {
        width: 100%;
        justify-content: center;
    }

    .dashboard-progress-value {
        font-size: 25px;
    }
}

/*
 * * =========================================================
 * * DASHBOARD – VISUELLE ÜBERARBEITUNG OHNE LINKS/BUTTONS
 * * =========================================================
 */

.dashboard-hero-clean {
    display: block;
}

.dashboard-hero-clean .dashboard-eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5f7695;
}

.dashboard-hero-clean p {
    margin: 8px 0 0;
    color: #607089;
}

.dashboard-stats-section {
    margin-top: 24px;
}

.dashboard-stats-grid {
    gap: 20px;
}

.dashboard-stat-card-clean {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-height: 150px;
    padding: 24px;
    overflow: hidden;
    border: 1px solid rgba(129, 151, 181, 0.22);
    box-shadow: 0 10px 30px rgba(36, 55, 82, 0.07);
}

.dashboard-stat-card-clean::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #2f6fed;
    border-radius: 999px;
}

.dashboard-stat-icon-box {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #edf4ff;
    color: #215ec9;
}

.dashboard-stat-icon-box .material-symbols-rounded {
    font-size: 25px;
}

.dashboard-stat-content {
    min-width: 0;
}

.dashboard-stat-content p {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #52647e;
}

.dashboard-stat-content h2 {
    margin: 0;
    font-size: clamp(28px, 2.3vw, 38px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #123866;
}

.dashboard-stat-content small {
    display: block;
    margin-top: 10px;
    line-height: 1.35;
    color: #7a889b;
}

.dashboard-stat-success::before {
    background: #18a957;
}

.dashboard-stat-success .dashboard-stat-icon-box {
    background: #e9f9ef;
    color: #128a46;
}

.dashboard-stat-warning::before {
    background: #e2a114;
}

.dashboard-stat-warning .dashboard-stat-icon-box {
    background: #fff6df;
    color: #b97900;
}

.dashboard-stat-money::before {
    background: #7a5de8;
}

.dashboard-stat-money .dashboard-stat-icon-box {
    background: #f1edff;
    color: #6247c9;
}

.dashboard-stat-value::before {
    background: #178ca5;
}

.dashboard-stat-value .dashboard-stat-icon-box {
    background: #e8f7fa;
    color: #13778d;
}

/* Darkmode */

body.dark-mode .dashboard-hero-clean .dashboard-eyebrow, html[data-theme="dark"] .dashboard-hero-clean .dashboard-eyebrow, body[data-theme="dark"] .dashboard-hero-clean .dashboard-eyebrow {
    color: #8da7ca;
}

body.dark-mode .dashboard-hero-clean p, html[data-theme="dark"] .dashboard-hero-clean p, body[data-theme="dark"] .dashboard-hero-clean p {
    color: #aebcd0;
}

body.dark-mode .dashboard-stat-card-clean, html[data-theme="dark"] .dashboard-stat-card-clean, body[data-theme="dark"] .dashboard-stat-card-clean {
    border-color: #34445a;
    box-shadow: none;
}

body.dark-mode .dashboard-stat-content p, html[data-theme="dark"] .dashboard-stat-content p, body[data-theme="dark"] .dashboard-stat-content p {
    color: #b7c4d5;
}

body.dark-mode .dashboard-stat-content h2, html[data-theme="dark"] .dashboard-stat-content h2, body[data-theme="dark"] .dashboard-stat-content h2 {
    color: #f2f6fb;
}

body.dark-mode .dashboard-stat-content small, html[data-theme="dark"] .dashboard-stat-content small, body[data-theme="dark"] .dashboard-stat-content small {
    color: #8f9eb1;
}

body.dark-mode .dashboard-stat-icon-box, html[data-theme="dark"] .dashboard-stat-icon-box, body[data-theme="dark"] .dashboard-stat-icon-box {
    background: #1c3354;
    color: #8bb7ff;
}

body.dark-mode .dashboard-stat-success .dashboard-stat-icon-box, html[data-theme="dark"] .dashboard-stat-success .dashboard-stat-icon-box, body[data-theme="dark"] .dashboard-stat-success .dashboard-stat-icon-box {
    background: #173c2a;
    color: #68d99a;
}

body.dark-mode .dashboard-stat-warning .dashboard-stat-icon-box, html[data-theme="dark"] .dashboard-stat-warning .dashboard-stat-icon-box, body[data-theme="dark"] .dashboard-stat-warning .dashboard-stat-icon-box {
    background: #45371a;
    color: #ffd16d;
}

body.dark-mode .dashboard-stat-money .dashboard-stat-icon-box, html[data-theme="dark"] .dashboard-stat-money .dashboard-stat-icon-box, body[data-theme="dark"] .dashboard-stat-money .dashboard-stat-icon-box {
    background: #302752;
    color: #b8a5ff;
}

body.dark-mode .dashboard-stat-value .dashboard-stat-icon-box, html[data-theme="dark"] .dashboard-stat-value .dashboard-stat-icon-box, body[data-theme="dark"] .dashboard-stat-value .dashboard-stat-icon-box {
    background: #173842;
    color: #75d1e5;
}

@media (max-width: 760px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .dashboard-stat-card-clean {
        min-height: 135px;
        padding: 18px;
        gap: 12px;
    }

    .dashboard-stat-icon-box {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .dashboard-stat-content h2 {
        font-size: 27px;
    }

    .dashboard-stat-content small {
        display: none;
    }
}

@media (max-width: 520px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }
}

/*
 * * =========================================================
 * * DASHBOARD – REDUZIERTE KENNZAHLEN
 * * =========================================================
 */

.dashboard-kpi-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.dashboard-kpi-group {
    padding: 24px;
    background: var(--card-bg, #ffffff);
    border: 1px solid rgba(129, 151, 181, 0.22);
    border-radius: 24px;
    box-shadow: 0 12px 34px rgba(36, 55, 82, 0.07);
}

.dashboard-kpi-group-header {
    margin-bottom: 18px;
}

.dashboard-kpi-group-header h2 {
    margin: 0;
    font-size: 18px;
    color: #163d6d;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.dashboard-kpi-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    min-height: 112px;
    padding: 18px;
    background: #f7f9fc;
    border: 1px solid #e1e8f1;
    border-radius: 18px;
}

.dashboard-kpi-icon {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #eaf1fb;
    color: #1e5eb8;
}

.dashboard-kpi-icon .material-symbols-rounded {
    font-size: 24px;
}

.dashboard-kpi-data {
    min-width: 0;
}

.dashboard-kpi-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
}

.dashboard-kpi-data strong {
    display: block;
    font-size: clamp(24px, 2.1vw, 34px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #123866;
    white-space: nowrap;
}

/* Timeline kompakter: nur Titel, Status und Termine */

.dashboard-timeline-panel .portal-dashboard-heading {
    margin-bottom: 22px;
}

.dashboard-timeline-panel .portal-timeline-content > p {
    display: none !important;
}

/* Verkaufsquote reduziert */

.dashboard-progress-clean {
    padding-top: 26px;
    padding-bottom: 26px;
}

.dashboard-progress-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.dashboard-progress-header h2 {
    margin: 0;
}

.dashboard-progress-header span {
    color: #65758d;
    font-weight: 600;
}

.dashboard-progress-clean #live-progress-text {
    display: block;
    margin-top: 12px;
    color: #173d6d;
}

/* Darkmode */

body.dark-mode .dashboard-kpi-group, html[data-theme="dark"] .dashboard-kpi-group, body[data-theme="dark"] .dashboard-kpi-group {
    background: #202c3b;
    border-color: #34445a;
    box-shadow: none;
}

body.dark-mode .dashboard-kpi-group-header h2, html[data-theme="dark"] .dashboard-kpi-group-header h2, body[data-theme="dark"] .dashboard-kpi-group-header h2 {
    color: #f2f6fb;
}

body.dark-mode .dashboard-kpi-card, html[data-theme="dark"] .dashboard-kpi-card, body[data-theme="dark"] .dashboard-kpi-card {
    background: #172231;
    border-color: #304057;
}

body.dark-mode .dashboard-kpi-icon, html[data-theme="dark"] .dashboard-kpi-icon, body[data-theme="dark"] .dashboard-kpi-icon {
    background: #243a59;
    color: #8bb7ff;
}

body.dark-mode .dashboard-kpi-label, html[data-theme="dark"] .dashboard-kpi-label, body[data-theme="dark"] .dashboard-kpi-label, body.dark-mode .dashboard-progress-header span, html[data-theme="dark"] .dashboard-progress-header span, body[data-theme="dark"] .dashboard-progress-header span {
    color: #9cabc0;
}

body.dark-mode .dashboard-kpi-data strong, html[data-theme="dark"] .dashboard-kpi-data strong, body[data-theme="dark"] .dashboard-kpi-data strong, body.dark-mode .dashboard-progress-clean #live-progress-text, html[data-theme="dark"] .dashboard-progress-clean #live-progress-text, body[data-theme="dark"] .dashboard-progress-clean #live-progress-text {
    color: #f2f6fb;
}

@media (max-width: 1050px) {
    .dashboard-kpi-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .dashboard-kpi-group {
        padding: 18px;
        border-radius: 20px;
    }

    .dashboard-kpi-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .dashboard-kpi-card {
        min-height: 100px;
        padding: 14px;
        gap: 10px;
    }

    .dashboard-kpi-icon {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .dashboard-kpi-data strong {
        font-size: 24px;
    }

    .dashboard-progress-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/*
 * * =========================================================
 * * Portal – Verkäufe: gemeinsamer Statistikblock
 * * Ganz unten an static/style.css anhängen
 * * =========================================================
 */

.portal-sales-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 28px 0 30px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.portal-sales-stat-item {
    min-width: 0;
    min-height: 124px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    border-right: 1px solid var(--border);
}

.portal-sales-stat-item:last-child {
    border-right: 0;
}

.portal-sales-stat-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    color: var(--primary-dark);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.portal-sales-stat-icon .material-symbols-rounded {
    font-size: 26px;
}

.portal-sales-stat-content {
    min-width: 0;
}

.portal-sales-stat-label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 700;
}

.portal-sales-stat-value {
    display: block;
    color: var(--primary-dark);
    font-size: clamp(25px, 2.2vw, 35px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

body.dark-mode .portal-sales-stats {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: none;
}

body.dark-mode .portal-sales-stat-icon {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border);
}

body.dark-mode .portal-sales-stat-value {
    color: var(--text);
}

@media (max-width: 1050px) {
    .portal-sales-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-sales-stat-item:nth-child(2) {
        border-right: 0;
    }

    .portal-sales-stat-item:nth-child(-n + 2) {
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 620px) {
    .portal-sales-stats {
        grid-template-columns: 1fr;
        padding: 8px;
        border-radius: 20px;
    }

    .portal-sales-stat-item, .portal-sales-stat-item:nth-child(2) {
        min-height: 96px;
        padding: 18px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .portal-sales-stat-item:last-child {
        border-bottom: 0;
    }

    .portal-sales-stat-icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        border-radius: 13px;
    }

    .portal-sales-stat-value {
        font-size: 28px;
    }
}

/*
 * * =========================================================
 * * Rechtliches + öffentliche Links
 * * Ganz unten an static/style.css anhängen
 * * =========================================================
 */

.portal-info-page {
    padding-top: 28px;
    padding-bottom: 48px;
}

.portal-info-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 22px;
    padding: 30px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.portal-info-kicker {
    display: block;
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.portal-info-header h1 {
    margin: 0 0 7px;
    font-size: clamp(28px, 4vw, 40px);
}

.portal-info-header p {
    margin: 0;
    color: var(--text-soft);
}

.portal-info-nav {
    position: sticky;
    top: 14px;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
    padding: 10px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.portal-info-nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.portal-info-nav a:hover {
    transform: translateY(-1px);
    background: var(--surface-3);
    border-color: var(--border);
}

.portal-info-nav .material-symbols-rounded {
    font-size: 21px;
}

.portal-info-section {
    scroll-margin-top: 95px;
    margin-bottom: 24px;
    padding: 30px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.portal-info-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.portal-info-section-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 27px;
}

.portal-info-section-heading h2 {
    margin: 0 0 5px;
    font-size: 24px;
}

.portal-info-section-heading p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.5;
}

.portal-info-terms {
    display: grid;
    gap: 12px;
}

.portal-info-terms article {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 15px;
    padding: 19px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.portal-info-terms article > span {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 900;
}

.portal-info-terms h3, .portal-legal-text h3 {
    margin: 2px 0 7px;
    color: var(--text);
    font-size: 17px;
}

.portal-info-terms p, .portal-legal-text p, .portal-legal-text li {
    color: var(--text-soft);
    line-height: 1.65;
}

.portal-info-terms p {
    margin: 0 0 9px;
}

.portal-info-terms p:last-child {
    margin-bottom: 0;
}

.portal-legal-text {
    max-width: 920px;
}

.portal-legal-text h3 {
    margin-top: 28px;
}

.portal-legal-text h3:first-child {
    margin-top: 0;
}

.portal-legal-text p {
    margin: 0 0 14px;
}

.portal-legal-text ul {
    margin: 0 0 16px;
    padding-left: 22px;
}

.portal-legal-text li {
    margin-bottom: 7px;
}

.portal-imprint-placeholder dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.portal-imprint-placeholder dl > div {
    display: grid;
    grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 13px;
    overflow: hidden;
}

.portal-imprint-placeholder dt, .portal-imprint-placeholder dd {
    margin: 0;
    padding: 13px 15px;
}

.portal-imprint-placeholder dt {
    color: var(--text);
    background: var(--surface-2);
    font-weight: 800;
}

.portal-imprint-placeholder dd {
    min-height: 48px;
    background: var(--surface);
}

.portal-legal-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 4px 0 5px;
    padding: 14px;
    color: var(--text-soft);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 13px;
    font-size: 13px;
    line-height: 1.5;
    cursor: pointer;
}

.portal-legal-checkbox input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 2px 0 0;
    accent-color: var(--primary);
}

.portal-legal-checkbox a, .portal-public-legal-links a {
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
}

.portal-legal-checkbox a:hover, .portal-public-legal-links a:hover {
    text-decoration: underline;
}

.portal-public-legal-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 20px;
    padding-top: 17px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    font-size: 12px;
}

body.dark-mode .portal-info-nav {
    background: rgba(31, 41, 55, .94);
}

body.dark-mode .portal-info-section-icon {
    color: #ffffff;
}

@media (max-width: 760px) {
    .portal-info-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 23px;
    }

    .portal-info-nav {
        position: static;
        grid-template-columns: 1fr;
    }

    .portal-info-section {
        padding: 22px;
        border-radius: 20px;
    }
}

@media (max-width: 540px) {
    .portal-info-terms article {
        grid-template-columns: 1fr;
    }

    .portal-imprint-placeholder dl > div {
        grid-template-columns: 1fr;
    }

    .portal-imprint-placeholder dt {
        padding-bottom: 7px;
    }

    .portal-imprint-placeholder dd {
        min-height: 40px;
        padding-top: 7px;
    }
}

/*
 * * =========================================================
 * * Portal – Kontaktanfragen
 * * Modal entsprechend dem vorhandenen Vermisst-Dialog
 * * =========================================================
 */

.portal-contact-section {
    scroll-margin-top: 24px;
}

.portal-contact-content {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.portal-contact-icon {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 17px;
    background: var(--surface-2);
    color: var(--primary-dark);
    border: 1px solid var(--border);
}

.portal-contact-icon .material-symbols-rounded {
    font-size: 31px;
}

.portal-contact-text h2 {
    margin: 0 0 7px;
}

.portal-contact-text p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.55;
}

.portal-contact-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* ---------- Kontakt-Modal ---------- */

.vermisst-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .58);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.vermisst-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
    padding: 28px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.vermisst-modal-header p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.45;
}

.vermisst-modal-close {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border) !important;
    border-radius: 12px;
    background: var(--surface-2) !important;
    color: var(--text) !important;
    cursor: pointer;
}

.vermisst-modal-close .material-symbols-rounded {
    font-size: 23px;
}

.vermisst-modal-close:hover {
    background: var(--border) !important;
    color: var(--text) !important;
}

.vermisst-modal-form {
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.vermisst-modal-form label {
    font-weight: 800;
}

.vermisst-modal-form input, .vermisst-modal-form select, .vermisst-modal-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 16px;
}

.vermisst-modal-form input, .vermisst-modal-form select {
    min-height: 48px;
}

.vermisst-modal-form textarea {
    min-height: 150px;
    padding: 12px 14px;
    resize: vertical;
}

.vermisst-modal-form input:focus, .vermisst-modal-form select:focus, .vermisst-modal-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.portal-contact-field-hint {
    color: var(--text-soft);
    font-size: 13px;
}

.portal-contact-textarea-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.4;
}

#kontaktZeichenZaehler {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ---------- Dark Mode ---------- */

body.dark-mode .vermisst-modal-dialog {
    box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}

/* ---------- Tablet ---------- */

@media (max-width:800px) {
    .portal-contact-content {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .portal-contact-action {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .portal-contact-button {
        width: 100%;
    }
}

/* ---------- Smartphone ---------- */

@media (max-width:600px) {
    .portal-contact-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .portal-contact-icon {
        width: 52px;
        height: 52px;
    }

    .portal-contact-action {
        grid-column: auto;
    }

    .vermisst-modal {
        align-items: flex-end;
        padding: 12px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    }

    .vermisst-modal-dialog {
        width: 100%;
        max-height: calc(100dvh - 24px);
        padding: 22px 18px;
        border-radius: 20px 20px 12px 12px;
    }

    .vermisst-modal-header {
        gap: 14px;
        margin-bottom: 20px;
    }

    .vermisst-modal-header h2 {
        font-size: 23px;
    }

    .vermisst-modal-actions {
        flex-direction: column-reverse;
    }

    .vermisst-modal-actions .btn {
        width: 100%;
        min-height: 50px;
    }

    .portal-contact-textarea-meta {
        flex-direction: column;
        gap: 5px;
    }
}

.portal-message {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 18px;
}

.portal-message-own {
    background: #eef6ff;
}

.portal-message-team {
    background: #f8f8f8;
}

body.dark-mode .portal-message-own {
    background: #1b3147;
}

body.dark-mode .portal-message-team {
    background: #232323;
}

.portal-message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-soft);
}

/*
 * * =========================================================
 * * Sidebar – untere Aktionsbuttons
 * * =========================================================
 */

.sidebar-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sidebar-bottom-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s, transform .2s;
}

.sidebar-bottom-button .material-symbols-rounded {
    font-size: 23px;
}

.sidebar-bottom-button:hover {
    transform: translateY(-1px);
}

.sidebar-bottom-logout:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #ffffff;
}

/*
 * * =========================================================
 * * ADMIN – KONTAKTANFRAGEN
 * * =========================================================
 */

.contact-admin-panel {
    padding: 24px;
}

.contact-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.contact-admin-header h2 {
    margin: 0;
}

.contact-admin-header p {
    margin: 5px 0 0;
    color: var(--text-muted);
}

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

.contact-request-card {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.contact-request-card:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
    box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

.contact-request-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--surface-2);
    color: var(--primary);
}

.contact-request-icon .material-symbols-rounded {
    font-size: 25px;
}

.contact-request-main {
    flex: 1;
    min-width: 0;
}

.contact-request-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.contact-request-title-row h3 {
    margin: 0;
    font-size: 17px;
}

.contact-request-subject {
    margin-top: 5px;
    font-weight: 700;
}

.contact-request-preview {
    margin-top: 4px;
    color: var(--text-muted);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.contact-request-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 13px;
}

.contact-request-arrow {
    color: var(--text-muted);
}

.contact-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.contact-status-offen {
    background: #fee2e2;
    color: #991b1b;
}

.contact-status-in_bearbeitung {
    background: #fef3c7;
    color: #92400e;
}

.contact-status-beantwortet {
    background: #dcfce7;
    color: #166534;
}

/* Modal */

.contact-admin-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.contact-admin-modal.ist-offen {
    display: flex;
}

.contact-admin-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.62);
    backdrop-filter: blur(4px);
}

.contact-admin-dialog {
    position: relative;
    z-index: 1;
    width: min(1180px, 100%);
    height: min(820px, calc(100vh - 48px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(0,0,0,.3);
}

.contact-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.contact-dialog-person {
    display: flex;
    align-items: center;
    gap: 13px;
}

.contact-dialog-person h2 {
    margin: 0;
    font-size: 19px;
}

.contact-dialog-person span {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 13px;
}

.contact-dialog-avatar {
    width: 45px;
    height: 45px;
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.contact-dialog-close {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
}

.contact-dialog-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
}

/* Messenger */

.contact-chat-area {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient( rgba(255,255,255,.86), rgba(255,255,255,.86) );
}

body.dark-mode .contact-chat-area {
    background: rgba(15,23,42,.35);
}

.contact-chat-subject {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.contact-chat-subject h3 {
    margin: 6px 0 0;
}

.contact-chat-category {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.contact-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
}

.contact-chat-message-row {
    display: flex;
}

.contact-chat-message-customer {
    justify-content: flex-start;
}

.contact-chat-message-team {
    justify-content: flex-end;
}

.contact-chat-bubble {
    max-width: min(72%, 620px);
    padding: 10px 12px 7px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}

.contact-chat-message-customer .contact-chat-bubble {
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom-left-radius: 5px;
}

.contact-chat-message-team .contact-chat-bubble {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 5px;
}

.contact-chat-sender {
    margin-bottom: 4px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.contact-chat-message-team .contact-chat-sender {
    color: rgba(255,255,255,.85);
}

.contact-chat-text {
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.contact-chat-time {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 11px;
}

.contact-chat-message-team .contact-chat-time {
    color: rgba(255,255,255,.75);
}

.contact-chat-time .material-symbols-rounded {
    font-size: 15px;
}

.contact-chat-compose {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.contact-chat-compose textarea {
    flex: 1;
    min-height: 44px;
    max-height: 140px;
    resize: none;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    line-height: 1.4;
}

.contact-chat-compose textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.contact-chat-send {
    width: 46px;
    height: 46px;
    min-width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
}

.contact-chat-send:hover {
    filter: brightness(.94);
}

/* Verwaltungsbereich */

.contact-admin-details {
    min-width: 0;
    overflow-y: auto;
    padding: 20px;
    border-left: 1px solid var(--border);
    background: var(--surface);
}

.contact-detail-section {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.contact-detail-section:last-child {
    margin-bottom: 0;
}

.contact-detail-section h3 {
    margin: 0 0 14px;
    font-size: 15px;
}

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

.contact-detail-list div {
    display: grid;
    gap: 3px;
}

.contact-detail-list span, .contact-field > span {
    color: var(--text-muted);
    font-size: 12px;
}

.contact-detail-list strong {
    font-size: 14px;
    overflow-wrap: anywhere;
}

.contact-admin-settings-form {
    display: block;
}

.contact-field {
    display: grid;
    gap: 7px;
}

.contact-field select, .contact-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
}

.contact-field textarea {
    resize: vertical;
}

.contact-settings-submit {
    width: 100%;
}

.contact-empty-state {
    padding: 50px 20px;
}

body.modal-open {
    overflow: hidden;
}

/* Mobile */

@media (max-width:900px) {
    .contact-admin-modal {
        padding: 0;
    }

    .contact-admin-dialog {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }

    .contact-dialog-layout {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .contact-chat-area {
        min-height: 620px;
    }

    .contact-admin-details {
        overflow: visible;
        border-left: 0;
        border-top: 1px solid var(--border);
    }
}

@media (max-width:600px) {
    .contact-admin-panel {
        padding: 16px;
    }

    .contact-request-card {
        align-items: flex-start;
        padding: 14px;
    }

    .contact-request-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }

    .contact-request-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .contact-request-arrow {
        display: none;
    }

    .contact-dialog-header {
        padding: 13px 14px;
    }

    .contact-chat-subject {
        padding: 14px;
    }

    .contact-chat-messages {
        padding: 14px;
    }

    .contact-chat-bubble {
        max-width: 86%;
    }

    .contact-chat-compose {
        padding: 10px;
    }
}

/*
 * * =========================================================
 * * PORTAL – KONTAKT-BUTTON IN DER NAVIGATION
 * * =========================================================
 */

.portal-contact-button {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 50%;
    background: var(--button-secondary-bg, #e8edf4);
    color: var(--text, #17345d);
    text-decoration: none;
    line-height: 1;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .2s;
}

.portal-contact-button:hover {
    background: var(--button-secondary-hover, #dde5ee);
    transform: translateY(-1px);
}

.portal-contact-button .material-symbols-rounded {
    display: block;
    margin: 0;
    padding: 0;
    font-size: 24px;
    line-height: 1;
}

body.dark-mode .portal-contact-button {
    background: var(--button-secondary-bg, #263449);
    border-color: var(--border, #3b4a61);
    color: var(--text, #f8fafc);
}

body.dark-mode .portal-contact-button:hover {
    background: var(--button-secondary-hover, #314158);
}

/*
 * * =========================================================
 * * PORTAL – KONTAKTANFRAGE / MESSENGER
 * * =========================================================
 */

.portal-contact-page {
    padding-bottom: 60px;
}

.portal-contact-chat-card {
    padding: 0;
    overflow: hidden;
}

.portal-contact-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border, #d8e0eb);
}

.portal-contact-chat-person {
    display: flex;
    align-items: center;
    gap: 13px;
}

.portal-contact-chat-avatar {
    width: 46px;
    height: 46px;
    min-width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--button-secondary-bg, #e8edf4);
    color: var(--text, #17345d);
}

.portal-contact-chat-avatar .material-symbols-rounded {
    font-size: 25px;
}

.portal-contact-chat-person h2 {
    margin: 0;
    font-size: 1.1rem;
}

.portal-contact-chat-person span {
    display: block;
    margin-top: 3px;
    color: var(--text-muted, #6b7c93);
    font-size: .83rem;
}

.portal-contact-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    border-radius: 999px;
    background: var(--button-secondary-bg, #e8edf4);
    color: var(--text, #17345d);
    font-size: .76rem;
    font-weight: 800;
}

.portal-contact-status-open {
    background: #fee2e2;
    color: #991b1b;
}

.portal-contact-status-working {
    background: #fef3c7;
    color: #92400e;
}

.portal-contact-status-answered {
    background: #dcfce7;
    color: #166534;
}

.portal-contact-topic {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border, #d8e0eb);
}

.portal-contact-category {
    display: block;
    color: var(--primary, #315fca);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.portal-contact-topic h3 {
    margin: 6px 0 0;
    font-size: 1.15rem;
}

.portal-contact-messages {
    min-height: 390px;
    max-height: 560px;
    display: flex;
    flex-direction: column;
    gap: 11px;
    overflow-y: auto;
    padding: 24px;
    background: linear-gradient( rgba(242,246,252,.78), rgba(242,246,252,.78) );
}

.portal-contact-message-row {
    display: flex;
    width: 100%;
}

.portal-contact-message-team {
    justify-content: flex-start;
}

.portal-contact-message-own {
    justify-content: flex-end;
}

.portal-contact-message-bubble {
    width: fit-content;
    max-width: min(72%, 640px);
    padding: 10px 13px 7px;
    border-radius: 17px;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(15,23,42,.08);
}

.portal-contact-message-team .portal-contact-message-bubble {
    background: var(--card-bg, #ffffff);
    color: var(--text, #17345d);
    border: 1px solid var(--border, #d8e0eb);
    border-bottom-left-radius: 5px;
}

.portal-contact-message-own .portal-contact-message-bubble {
    background: var(--button-primary-bg, #3f5879);
    color: #ffffff;
    border-bottom-right-radius: 5px;
}

.portal-contact-message-sender {
    margin-bottom: 4px;
    color: var(--primary, #315fca);
    font-size: .75rem;
    font-weight: 800;
}

.portal-contact-message-own .portal-contact-message-sender {
    color: rgba(255,255,255,.82);
}

.portal-contact-message-text {
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.portal-contact-message-time {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    margin-top: 5px;
    color: var(--text-muted, #6b7c93);
    font-size: .68rem;
}

.portal-contact-message-own .portal-contact-message-time {
    color: rgba(255,255,255,.74);
}

.portal-contact-message-time .material-symbols-rounded {
    font-size: 14px;
}

.portal-contact-compose {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin: 0;
    padding: 14px 18px;
    border-top: 1px solid var(--border, #d8e0eb);
    background: var(--card-bg, #ffffff);
}

.portal-contact-compose textarea {
    flex: 1;
    width: auto;
    min-width: 0;
    min-height: 46px;
    max-height: 150px;
    box-sizing: border-box;
    resize: none;
    padding: 12px 15px;
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 17px;
    background: var(--button-secondary-bg, #e8edf4);
    color: var(--text, #17345d);
    font: inherit;
    line-height: 1.4;
}

.portal-contact-compose textarea:focus {
    outline: none;
    border-color: var(--primary, #315fca);
}

.portal-contact-send {
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--button-primary-bg, #3f5879);
    color: #ffffff;
    cursor: pointer;
}

.portal-contact-send:hover {
    background: var(--button-primary-hover, #334a68);
}

.portal-contact-send .material-symbols-rounded {
    font-size: 23px;
}

/* Dark Mode */

body.dark-mode .portal-contact-chat-avatar {
    background: var(--button-secondary-bg, #263449);
    color: var(--text, #f8fafc);
}

body.dark-mode .portal-contact-messages {
    background: rgba(15,23,42,.44);
}

body.dark-mode .portal-contact-message-team .portal-contact-message-bubble {
    background: var(--panel-2, #172033);
    border-color: var(--border, #334155);
    color: var(--text, #f8fafc);
}

body.dark-mode .portal-contact-compose {
    background: var(--card-bg, #111827);
}

body.dark-mode .portal-contact-compose textarea {
    background: var(--button-secondary-bg, #263449);
    border-color: var(--border, #3b4a61);
    color: var(--text, #f8fafc);
}

/* Mobile */

@media (max-width:700px) {
    .portal-contact-chat-header {
        align-items: flex-start;
        padding: 14px;
    }

    .portal-contact-chat-person span {
        display: none;
    }

    .portal-contact-topic {
        padding: 14px;
    }

    .portal-contact-messages {
        min-height: 420px;
        max-height: calc(100vh - 390px);
        padding: 14px;
    }

    .portal-contact-message-bubble {
        max-width: 86%;
    }

    .portal-contact-compose {
        padding: 10px;
    }
}

/*
 * * =========================================================
 * * KONTAKTSTATUS – DARK MODE
 * * =========================================================
 */

body.dark-mode .portal-contact-status-open, body.dark-mode .contact-status-offen {
    background: #4a2025;
    color: #ffb4b4;
    border: 1px solid #6f3038;
}

body.dark-mode .portal-contact-status-working, body.dark-mode .contact-status-in_bearbeitung {
    background: #4b3a18;
    color: #ffd98a;
    border: 1px solid #705821;
}

body.dark-mode .portal-contact-status-answered, body.dark-mode .contact-status-beantwortet {
    background: #173f2b;
    color: #9ce2b8;
    border: 1px solid #286442;
}

/*
 * * =========================================================
 * * PORTAL – KONTAKTANFRAGE ALS MODAL
 * * =========================================================
 */

.portal-contact-modal[hidden] {
    display: none !important;
}

.portal-contact-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.portal-contact-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .62);
    backdrop-filter: blur(4px);
}

.portal-contact-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    height: min(760px, calc(100vh - 48px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border, #d8e0eb);
    border-radius: 22px;
    background: var(--card-bg, #ffffff);
    color: var(--text, #17345d);
    box-shadow: 0 30px 80px rgba(15, 23, 42, .32);
}

/* Kopfbereich */

.portal-contact-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border, #d8e0eb);
}

.portal-contact-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.portal-contact-modal-header p {
    margin: 4px 0 0;
    color: var(--text-muted, #64748b);
    font-size: .84rem;
}

.portal-contact-modal-close {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border, #d8e0eb);
    border-radius: 12px;
    background: var(--button-secondary-bg, #e8edf4);
    color: var(--text, #17345d);
    cursor: pointer;
}

.portal-contact-modal-close:hover {
    background: var(--button-secondary-hover, #dde5ee);
}

/* Betreff und Status */

.portal-contact-modal-topic {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 22px;
    border-bottom: 1px solid var(--border, #d8e0eb);
}

.portal-contact-modal-category {
    display: block;
    color: var(--primary, #2563eb);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.portal-contact-modal-topic h3 {
    margin: 6px 0 0;
    font-size: 1.05rem;
}

.portal-contact-modal-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 800;
    white-space: nowrap;
}

.portal-contact-modal-status-open {
    background: #fee2e2;
    color: #991b1b;
}

.portal-contact-modal-status-working {
    background: #fef3c7;
    color: #92400e;
}

.portal-contact-modal-status-answered {
    background: #dcfce7;
    color: #166534;
}

/* Nachrichtenbereich */

.portal-contact-modal-messages {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding: 22px;
    background: var(--surface-muted, #f2f6fc);
}

.portal-contact-modal-message-row {
    display: flex;
    width: 100%;
}

.portal-contact-modal-message-team {
    justify-content: flex-start;
}

.portal-contact-modal-message-own {
    justify-content: flex-end;
}

.portal-contact-modal-bubble {
    width: fit-content;
    min-width: 180px;
    max-width: min(70%, 600px);
    box-sizing: border-box;
    padding: 11px 13px 8px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}

.portal-contact-modal-message-team .portal-contact-modal-bubble {
    border: 1px solid var(--border, #d8e0eb);
    border-bottom-left-radius: 5px;
    background: var(--card-bg, #ffffff);
    color: var(--text, #17345d);
}

.portal-contact-modal-message-own .portal-contact-modal-bubble {
    border-bottom-right-radius: 5px;
    background: var(--button-primary-bg, #3f5879);
    color: #ffffff;
}

.portal-contact-modal-sender {
    display: block;
    margin-bottom: 7px;
    color: var(--primary, #2563eb);
    font-size: .75rem;
    font-weight: 800;
}

.portal-contact-modal-message-own .portal-contact-modal-sender {
    color: rgba(255, 255, 255, .86);
}

.portal-contact-modal-text {
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.portal-contact-modal-time {
    display: block;
    margin-top: 7px;
    color: var(--text-muted, #64748b);
    text-align: right;
    font-size: .68rem;
}

.portal-contact-modal-message-own .portal-contact-modal-time {
    color: rgba(255, 255, 255, .72);
}

/* Eingabebereich */

.portal-contact-modal-compose {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin: 0;
    padding: 14px 18px;
    border-top: 1px solid var(--border, #d8e0eb);
    background: var(--card-bg, #ffffff);
}

.portal-contact-modal-compose textarea {
    flex: 1;
    width: auto;
    min-width: 0;
    min-height: 46px;
    max-height: 140px;
    box-sizing: border-box;
    resize: none;
    padding: 12px 15px;
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 17px;
    background: var(--button-secondary-bg, #e8edf4);
    color: var(--text, #17345d);
    font: inherit;
    line-height: 1.4;
}

.portal-contact-modal-compose textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}

.portal-contact-modal-send {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 50%;
    background: var(--button-secondary-bg, #e8edf4);
    color: var(--text, #17345d);
    cursor: pointer;
}

.portal-contact-modal-send:hover {
    background: var(--button-secondary-hover, #dde5ee);
}

.portal-contact-modal-open {
    overflow: hidden;
}

/* Dark Mode */

body.dark-mode .portal-contact-modal-dialog {
    background: var(--card-bg, #111827);
    border-color: var(--border, #334155);
    color: var(--text, #f8fafc);
}

body.dark-mode .portal-contact-modal-header, body.dark-mode .portal-contact-modal-topic, body.dark-mode .portal-contact-modal-compose {
    border-color: var(--border, #334155);
}

body.dark-mode .portal-contact-modal-messages {
    background: #0f172a;
}

body.dark-mode .portal-contact-modal-message-team .portal-contact-modal-bubble {
    background: var(--panel-2, #172033);
    border-color: var(--border, #334155);
    color: var(--text, #f8fafc);
}

body.dark-mode .portal-contact-modal-message-own .portal-contact-modal-bubble {
    background: var(--button-primary-bg, #3f5879);
    color: #ffffff;
}

body.dark-mode .portal-contact-modal-compose {
    background: var(--card-bg, #111827);
}

body.dark-mode .portal-contact-modal-compose textarea, body.dark-mode .portal-contact-modal-close, body.dark-mode .portal-contact-modal-send {
    background: var(--button-secondary-bg, #263449);
    border-color: var(--border, #3b4a61);
    color: var(--text, #f8fafc);
}

body.dark-mode .portal-contact-modal-status-open {
    background: #4a2025;
    color: #ffb4b4;
    border: 1px solid #6f3038;
}

body.dark-mode .portal-contact-modal-status-working {
    background: #4b3a18;
    color: #ffd98a;
    border: 1px solid #705821;
}

body.dark-mode .portal-contact-modal-status-answered {
    background: #173f2b;
    color: #9ce2b8;
    border: 1px solid #286442;
}

/* Mobile */

@media (max-width:700px) {
    .portal-contact-modal {
        align-items: flex-end;
        padding: 0;
    }

    .portal-contact-modal-dialog {
        width: 100%;
        height: calc(100dvh - 18px);
        border-radius: 22px 22px 0 0;
    }

    .portal-contact-modal-header {
        padding: 14px 16px;
    }

    .portal-contact-modal-topic {
        align-items: flex-start;
        padding: 14px 16px;
    }

    .portal-contact-modal-messages {
        padding: 14px;
    }

    .portal-contact-modal-bubble {
        min-width: 130px;
        max-width: 86%;
    }

    .portal-contact-modal-compose {
        padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    }
}

/*
 * * =========================================================
 * * PORTAL – UNGELESENE KONTAKTNACHRICHT
 * * =========================================================
 */

.portal-contact-trigger {
    position: relative;
    overflow: visible;
}

.portal-contact-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 5px;
    border: 2px solid var(--card-bg, #ffffff);
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(220, 38, 38, .35);
    pointer-events: none;
}

.portal-contact-notification-badge[hidden] {
    display: none !important;
}

body.dark-mode .portal-contact-notification-badge {
    border-color: var(--card-bg, #111827);
}

/*
 * * =========================================================
 * * UNGELESENE KONTAKTANFRAGE
 * * =========================================================
 */

.contact-request-card-unread {
    border: 2px solid #ef4444 !important;
    background: #fff5f5;
    box-shadow: 0 0 0 4px rgba(239,68,68,.20), 0 10px 30px rgba(239,68,68,.25);
    animation: contactUnreadPulse 2s ease-in-out infinite;
}

.contact-request-card-unread:hover {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 5px rgba(239,68,68,.28), 0 14px 36px rgba(239,68,68,.32);
}

.contact-request-card-unread .contact-request-icon {
    background: #ef4444;
    color: white;
}

.contact-request-card-unread::after {
    display: none;
}

@keyframes contactUnreadPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239,68,68,.25), 0 10px 30px rgba(239,68,68,.20);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(239,68,68,.10), 0 10px 30px rgba(239,68,68,.28);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239,68,68,.25), 0 10px 30px rgba(239,68,68,.20);
    }
}

/* Dark Mode */

body.dark-mode .contact-request-card-unread {
    background: #2b1717;
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 4px rgba(255,107,107,.18), 0 10px 30px rgba(255,107,107,.18);
}

/*
 * * =========================================================
 * * PORTAL – KONTAKTBEREICH
 * * =========================================================
 */

.portal-contact-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.portal-contact-section-text {
    flex: 1;
    min-width: 0;
}

.portal-contact-section-text h2 {
    margin: 0 0 6px;
}

.portal-contact-section-text p {
    margin: 0;
    color: var(--text-muted);
}

.portal-contact-create-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    white-space: nowrap;
    text-decoration: none;
}

.portal-contact-create-button .material-symbols-rounded {
    font-size: 21px;
}

@media (max-width:700px) {
    .portal-contact-section {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-contact-create-button {
        width: 100%;
    }
}

/*
 * * =========================================================
 * * KONTAKTANFRAGEN – ANTWORT AUSSTEHEND
 * * MUSS GANZ AM ENDE DER STYLE.CSS STEHEN
 * * =========================================================
 */

button.contact-request-card.contact-request-card-unread {
    border: 2px solid #ef4444 !important;
    outline: 4px solid rgba(239, 68, 68, 0.18) !important;
    outline-offset: 0;
    background: #ffdede !important;
    box-shadow: 0 10px 28px rgba(220, 38, 38, 0.22) !important;
}

button.contact-request-card.contact-request-card-unread:hover {
    border-color: #dc2626 !important;
    outline-color: rgba(220, 38, 38, 0.26) !important;
    background: #fff0f0 !important;
}

/* Dark Mode */

body.dark-mode button.contact-request-card.contact-request-card-unread {
    box-shadow: 0 10px 28px rgba(255, 70, 70, 0.22) !important;
}

/*
 * * =========================================================
 * * SIDEBAR – KONTAKTANFRAGEN
 * * =========================================================
 */

/*
 * * =========================================================
 * * SIDEBAR – NEUE KONTAKTNACHRICHTEN
 * * =========================================================
 */

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-contact-alert {
    background: #fff1f1 !important;
    border: 1px solid rgba(239, 68, 68, .38) !important;
    color: #b91c1c !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .08);
}

.sidebar-contact-alert:hover {
    background: #ffe4e4 !important;
}

.sidebar-contact-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.sidebar-contact-badge[hidden] {
    display: none !important;
}

/* Dark Mode */

body.dark-mode .sidebar-contact-alert {
    background: #3a1f22 !important;
    border-color: #ef6464 !important;
    color: #ffb4b4 !important;
    box-shadow: 0 0 0 3px rgba(239, 100, 100, .10);
}

body.dark-mode .sidebar-contact-alert:hover {
    background: #472429 !important;
}

/*
 * * =========================================================
 * * PORTAL – PROFIL POLISH
 * * =========================================================
 */

.portal-profile-hero p {
    max-width: 680px;
    margin: 10px 0 0;
    line-height: 1.55;
}

.portal-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.portal-profile-section {
    min-width: 0;
}

.portal-profile-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.portal-profile-section-header h2, .portal-profile-contact-content h2 {
    margin: 0;
}

.portal-profile-section-header p, .portal-profile-contact-content p {
    margin: 7px 0 0;
    max-width: 720px;
    line-height: 1.55;
    color: var(--text-muted, #637083);
}

/* Persönliche Daten */

.portal-profile-data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.portal-profile-data-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 18px;
    border: 1px solid rgba(109, 126, 148, 0.18);
    border-radius: 14px;
    background: rgba(245, 248, 252, 0.72);
}

.portal-profile-data-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    color: var(--text-muted, #6c7888);
}

.portal-profile-data-value {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--text-primary, #26364a);
}

/* Passwort */

.portal-profile-password-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 14px;
    width: 100%;
    margin: 0;
}

.portal-profile-password-form label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.88rem;
    font-weight: 700;
}

.portal-profile-password-form input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    box-sizing: border-box;
}

/* Einheitlicher Hauptbutton */

.portal-profile-primary-button {
    min-height: 48px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    border: 1px solid var(--button-primary-border, #5d7596);
    border-radius: 12px;
    background: var(--button-primary-bg, #3f5879);
    color: #ffffff;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.portal-profile-primary-button:hover {
    background: var(--button-primary-hover, #334a68);
    color: #ffffff;
    transform: translateY(-1px);
}

.portal-profile-primary-button:active {
    transform: translateY(0);
}

/* Kontakt */

.portal-profile-contact-section {
    border-color: rgba(63, 88, 121, 0.2);
}

.portal-profile-contact-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.portal-profile-contact-content > div {
    min-width: 0;
}

/* Dark Mode */

body.dark-mode .portal-profile-data-field {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .portal-profile-data-label, body.dark-mode .portal-profile-section-header p, body.dark-mode .portal-profile-contact-content p {
    color: var(--text-muted, #a8b2c0);
}

body.dark-mode .portal-profile-data-value {
    color: var(--text-primary, #eef3f8);
}

body.dark-mode .portal-profile-primary-button {
    background: var(--button-primary-bg, #3f5879);
    border-color: var(--button-primary-border, #5d7596);
    color: #ffffff;
}

body.dark-mode .portal-profile-primary-button:hover {
    background: var(--button-primary-hover, #4a6385);
}

/* Tablet und Handy */

@media (max-width: 760px) {
    .portal-profile-data-grid {
        grid-template-columns: 1fr;
    }

    .portal-profile-password-form {
        grid-template-columns: 1fr;
    }

    .portal-profile-primary-button {
        width: 100%;
    }

    .portal-profile-contact-content {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
}

/*
 * * =========================================================
 * * PORTAL-DASHBOARD – KONTAKTBUTTON
 * * =========================================================
 */

.portal-contact-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.portal-contact-text {
    flex: 1 1 auto;
    min-width: 0;
}

.portal-contact-action {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
}

.portal-contact-dashboard-button {
    width: auto !important;
    min-width: 170px !important;
    min-height: 48px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 22px !important;
    border: 1px solid var(--button-primary-border, #5d7596) !important;
    border-radius: 12px !important;
    background: var(--button-primary-bg, #3f5879) !important;
    color: #ffffff !important;
    font: inherit !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: nowrap !important;
    box-shadow: none !important;
    cursor: pointer;
}

.portal-contact-dashboard-button:hover {
    background: var(--button-primary-hover, #334a68) !important;
    color: #ffffff !important;
}

body.dark-mode .portal-contact-dashboard-button {
    background: var(--button-primary-bg, #3f5879) !important;
    border-color: var(--button-primary-border, #5d7596) !important;
    color: #ffffff !important;
}

body.dark-mode .portal-contact-dashboard-button:hover {
    background: var(--button-primary-hover, #4a6385) !important;
}

@media (max-width: 700px) {
    .portal-contact-content {
        flex-direction: column;
        align-items: stretch;
    }

    .portal-contact-action {
        width: 100%;
    }

    .portal-contact-dashboard-button {
        width: 100% !important;
        min-width: 0 !important;
    }
}

/*
 * * =========================================================
 * * KONTAKTANFRAGEN – NEUE KUNDENNACHRICHT FINAL
 * * =========================================================
 */

body:not(.dark-mode) button.contact-request-card.contact-request-card-unread {
    background: #fee2e2 !important;
    border: 2px solid #ef4444 !important;
    outline: 3px solid rgba(239, 68, 68, 0.14) !important;
    outline-offset: 0 !important;
    color: #0f172a !important;
    box-shadow: 0 8px 22px rgba(220, 38, 38, 0.15) !important;
}

body:not(.dark-mode) button.contact-request-card.contact-request-card-unread:hover {
    background: #fecaca !important;
    border-color: #dc2626 !important;
    color: #0f172a !important;
}

body.dark-mode button.contact-request-card.contact-request-card-unread {
    background: #3b2024 !important;
    border: 2px solid #ef6464 !important;
    outline: 3px solid rgba(239, 100, 100, 0.16) !important;
    color: #ffffff !important;
}

/*
 * * =========================================================
 * * EINLIEFERER BEARBEITEN – MODAL
 * * =========================================================
 */

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

.einlieferer-edit-grid .form-group {
    min-width: 0;
    margin: 0;
}

.einlieferer-edit-grid input {
    width: 100%;
    box-sizing: border-box;
}

.einlieferer-edit-full {
    grid-column: 1 / -1;
}

#einliefererBearbeitenForm {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

#einliefererBearbeitenDialog .vermisst-modal-dialog {
    width: min(680px, 100%);
}

@media (max-width: 650px) {
    .einlieferer-edit-grid {
        grid-template-columns: 1fr;
    }

    .einlieferer-edit-full {
        grid-column: auto;
    }
}

/*
 * * =========================================================
 * * INTERNE ARTIKELBEARBEITUNG – MODAL
 * * =========================================================
 */

.artikel-edit-modal-dialog {
    width: min(720px, 100%);
}

.artikel-edit-modal-form {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.artikel-edit-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.artikel-edit-modal-grid .form-group {
    min-width: 0;
    margin: 0;
}

.artikel-edit-modal-grid input, .artikel-edit-modal-grid select {
    width: 100%;
    box-sizing: border-box;
}

.artikel-edit-modal-full {
    grid-column: 1 / -1;
}

@media (max-width: 650px) {
    .artikel-edit-modal-grid {
        grid-template-columns: 1fr;
    }

    .artikel-edit-modal-full {
        grid-column: auto;
    }
}

/*
 * * =========================================================
 * * BENUTZERVERWALTUNG – BEARBEITEN-MODAL
 * * =========================================================
 */

.account-edit-modal-dialog {
    width: min(680px, 100%);
}

.account-edit-modal-form {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.account-edit-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.account-edit-modal-grid .form-group {
    min-width: 0;
    margin: 0;
}

.account-edit-modal-grid input {
    width: 100%;
    box-sizing: border-box;
}

.form-hint {
    display: block;
    margin-top: 7px;
    color: var(--text-muted, #64748b);
    font-size: 0.82rem;
    line-height: 1.4;
}

@media (max-width: 650px) {
    .account-edit-modal-grid {
        grid-template-columns: 1fr;
    }
}

/*
 * * =========================================================
 * * EINSTELLUNGEN – VERANSTALTUNGSAUSWERTUNG
 * * Am Ende von static/style.css einfügen
 * * =========================================================
 */

.settings-evaluation {
    overflow: hidden;
}

.evaluation-download-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 24px;
    border: 1px solid var(--border-color, #dfe5ec);
    border-radius: 18px;
    background: var(--card-background, #ffffff);
}

.evaluation-download-content {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    min-width: 0;
}

.evaluation-download-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: rgba(23, 54, 93, 0.1);
    color: #17365d;
}

.evaluation-download-icon .material-symbols-rounded {
    font-size: 28px;
}

.evaluation-download-content h3 {
    margin: 0 0 7px;
}

.evaluation-download-content p {
    max-width: 760px;
    margin: 0;
    color: var(--text-secondary, #64748b);
    line-height: 1.55;
}

.evaluation-sheet-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.evaluation-sheet-list span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--background-soft, #f1f5f9);
    color: var(--text-secondary, #475569);
    font-size: 0.84rem;
    font-weight: 600;
}

.evaluation-download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 46px;
    white-space: nowrap;
}

@media (max-width: 850px) {
    .evaluation-download-card {
        align-items: stretch;
        flex-direction: column;
    }

    .evaluation-download-button {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .evaluation-download-card {
        padding: 18px;
    }

    .evaluation-download-content {
        gap: 13px;
    }

    .evaluation-download-icon {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
        border-radius: 13px;
    }

    .evaluation-download-icon .material-symbols-rounded {
        font-size: 25px;
    }
}

@media (prefers-color-scheme: dark) {
    .evaluation-download-card {
        border-color: rgba(255, 255, 255, 0.1);
    }

    .evaluation-download-icon {
        background: rgba(90, 169, 255, 0.14);
        color: #78b7ff;
    }

    .evaluation-sheet-list span {
        background: rgba(255, 255, 255, 0.07);
    }
}

/* Veranstaltungsauswertung */

.auswertung-karte {
    padding: 28px 32px;
}

.auswertung-karte__kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.auswertung-karte__titel {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: -8px;
}

.auswertung-karte__titel .material-symbols-rounded {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border: 1px solid #d9e2ec;
    border-radius: 14px;
    background: #f4f7fa;
    color: #123d6a;
    font-size: 26px;
}

.auswertung-karte__titel h2 {
    margin: 0;
    color: #123d6a;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.auswertung-download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    flex-shrink: 0;
    border: 1px solid #123d6a;
    border-radius: 12px;
    background: #123d6a;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.auswertung-download-button:hover {
    background: #0c3157;
    border-color: #0c3157;
    color: #ffffff;
    transform: translateY(-1px);
}

.auswertung-download-button:active {
    transform: translateY(0);
}

@media (max-width: 700px) {
    .auswertung-karte {
        padding: 22px;
    }

    .auswertung-karte__kopf {
        align-items: stretch;
        flex-direction: column;
    }

    .auswertung-download-button {
        width: 100%;
    }
}

/*
 * * ---------------------------------------------------------
 * * WOHNORTVERWALTUNG – DARK MODE
 * * ---------------------------------------------------------
 */

body.dark-mode .wohnort-pruefen-box, body.dark-mode .wohnort-hinzufuegen-box {
    background: var(--surface-2, #1b2636);
    border-color: var(--border, #334155);
    color: var(--text, #f8fafc);
}

body.dark-mode .wohnort-pruefen-box h3, body.dark-mode .wohnort-hinzufuegen-box h3, body.dark-mode .wohnort-pruefen-box label, body.dark-mode .wohnort-form-field label {
    color: var(--text, #f8fafc);
}

body.dark-mode .wohnort-suche-zeile input, body.dark-mode .wohnort-form-field input {
    background: var(--surface, #202c3d);
    border-color: var(--border, #3b4a61);
    color: var(--text, #f8fafc);
}

body.dark-mode .wohnort-suche-zeile input::placeholder, body.dark-mode .wohnort-form-field input::placeholder {
    color: var(--text-soft, #94a3b8);
}

body.dark-mode .wohnort-pruefen-hinweis {
    background: var(--surface-3, #263449);
    color: var(--text, #f8fafc);
}

body.dark-mode .wohnort-pruefen-treffer {
    background: #16324f;
    border-color: #285a85;
    color: #e2efff;
}

body.dark-mode .wohnort-pruefen-fehlt {
    background: #3d3219;
    border-color: #7a6328;
    color: #fff1bd;
}

body.dark-mode .wohnort-pruefen-fehler {
    background: #412329;
    border-color: #81404b;
    color: #ffd7dc;
}

/*
 * * =========================================================
 * * ARTIKEL ERFASSEN
 * * Gleiche Optik und gleiche Abstände wie Einlieferer hinzufügen
 * * =========================================================
 */

.artikel-erfassen-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 48px;
}

.artikel-erfassen-form .form-group {
    min-width: 0;
    width: 100%;
    margin: 0;
}

.artikel-erfassen-form .form-group label {
    display: block;
    margin: 0 0 8px;
    font-weight: 700;
}

.artikel-erfassen-form input, .artikel-erfassen-form select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.artikel-erfassen-form .einlieferer-speichern-wrap {
    width: 48px;
    min-width: 48px;
    align-self: end;
}

/* Tablet */

@media (max-width: 1200px) {
    .artikel-erfassen-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .artikel-erfassen-form .einlieferer-speichern-wrap {
        width: 100%;
        min-width: 0;
        grid-column: 1 / -1;
    }

    .artikel-erfassen-form .einlieferer-speichern-icon {
        width: 100%;
    }
}

/* Mobil */

@media (max-width: 700px) {
    .artikel-erfassen-form {
        grid-template-columns: 1fr;
    }
}

/*
 * * =========================================================
 * * KASSENBERICHT – VERKAUFSDETAILS
 * * =========================================================
 */

.kassenbericht-detail-dialog {
    width: min(1180px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
}

.kassenbericht-detail-inhalt {
    min-height: 180px;
    padding: 24px 28px;
    overflow-y: auto;
}

.kassenbericht-detail-artikel {
    margin-top: 28px;
}

.kassenbericht-detail-artikel h3 {
    margin: 0 0 16px;
    color: var(--text);
}

.kassenbericht-click-row {
    cursor: pointer;
}

.kassenbericht-click-row:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.35);
    outline-offset: -3px;
}

.kassenbericht-table th:last-child, .kassenbericht-table td:last-child {
    width: 90px;
    text-align: center;
}

/* Mobil */

@media (max-width: 800px) {
    .kassenbericht-detail-dialog {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
    }

    .kassenbericht-detail-inhalt {
        padding: 18px;
    }

    .verkauf-detail-grid {
        grid-template-columns: 1fr;
    }
}

.verkauf-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 36px;
    margin-bottom: 28px;
}

.verkauf-detail-item {
    padding: 16px 18px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.verkauf-detail-item span {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-soft);
}

.verkauf-detail-item strong {
    font-size: 20px;
    color: var(--text);
}

/*
 * * =========================================================
 * * KASSENBERICHT – DETAILKARTEN WIE IM DASHBOARD
 * * =========================================================
 */

.kassenbericht-detail-stat-grid .dashboard-stat-value-small {
    line-height: 1.3;
}

/* Tablet */

/* Mobil */

/*
 * * =========================================================
 * * KASSENBERICHT – KARTENINHALT WIE IM DASHBOARD
 * * =========================================================
 */

.kassenbericht-detail-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.kassenbericht-detail-stat-grid .dashboard-stat-card {
    min-height: 108px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 18px;
}

.kassenbericht-detail-stat-grid .dashboard-stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
}

.kassenbericht-detail-stat-grid .dashboard-stat-icon .material-symbols-rounded {
    font-size: 25px;
}

.kassenbericht-detail-stat-grid .dashboard-stat-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
}

.kassenbericht-detail-stat-grid .dashboard-stat-label {
    display: block;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.kassenbericht-detail-stat-grid .dashboard-stat-value {
    display: block;
    color: var(--text);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
}

.kassenbericht-detail-stat-grid .dashboard-stat-value-small {
    font-size: 17px;
}

/* Tablet */

@media (max-width: 1000px) {
    .kassenbericht-detail-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobil */

@media (max-width: 650px) {
    .kassenbericht-detail-stat-grid {
        grid-template-columns: 1fr;
    }
}

/*
 * * =========================================================
 * * PORTAL VERKÄUFE – DASHBOARD-KPIS
 * * =========================================================
 */

.portal-sales-dashboard-kpis {
    margin-bottom: 30px;
}

.portal-sales-dashboard-kpis .dashboard-kpi-grid {
    margin: 0;
}

.portal-sales-dashboard-kpis .dashboard-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Tablet */

@media (max-width: 1000px) {
    .portal-sales-dashboard-kpis .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobil */

@media (max-width: 600px) {
    .portal-sales-dashboard-kpis .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Status / Messages ---------- */

/* Online erfasst = Blau */

/* Verfügbar / Zum Verkauf / Offen = Orange */

/* Verkauft = Grün */

/* Abgeholt = Lila */

/* Vermisst = Rot */

/* Auszahlung erfolgt = Grün */

/* Drucksystem online = Grün */

/* Drucksystem offline = Rot */

/* ---------- Dark Mode ---------- */

/*
 * * =========================================================
 * * Statusfarben – zentrale, verbindliche Definition
 * * =========================================================
 */

.status-verkauft, .status-verfuegbar, .status-online, .status-offen, .status-abgeholt, .status-vermisst, .status-ausgezahlt, .status-drucker-online, .status-drucker-offline, .portal-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

/* Online erfasst = Blau */

.status-online, .portal-status.online {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

/* Verfügbar / Zum Verkauf / Offen = Orange */

.status-verfuegbar, .portal-status.available, .status-offen {
    background: #fff7e6;
    color: #b45309;
    border: 1px solid #f59e0b;
}

/* Verkauft = Grün */

.status-verkauft, .portal-status.sold, .status-ausgezahlt, .status-drucker-online {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

/* Abgeholt = Lila */

.status-abgeholt, .portal-status.collected {
    background: #f3e8ff;
    color: #7c3aed;
    border: 1px solid #c4b5fd;
}

/* Vermisst / Drucksystem offline = Rot */

.status-vermisst, .portal-status.missing, .status-drucker-offline {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

body.dark-mode .status-online, body.dark-mode .portal-status.online {
    background: #172554;
    color: #bfdbfe;
    border-color: #3b82f6;
}

body.dark-mode .status-verfuegbar, body.dark-mode .portal-status.available, body.dark-mode .status-offen {
    background: #422006;
    color: #fde68a;
    border-color: #f59e0b;
}

body.dark-mode .status-verkauft, body.dark-mode .portal-status.sold, body.dark-mode .status-ausgezahlt, body.dark-mode .status-drucker-online {
    background: #14532d;
    color: #bbf7d0;
    border-color: #22c55e;
}

body.dark-mode .status-abgeholt, body.dark-mode .portal-status.collected {
    background: #3b0764;
    color: #e9d5ff;
    border-color: #a855f7;
}

body.dark-mode .status-vermisst, body.dark-mode .portal-status.missing, body.dark-mode .status-drucker-offline {
    background: #451a1a;
    color: #fecaca;
    border-color: #ef4444;
}

/*
 * =========================================================
 * PORTAL – PROFIL BEARBEITEN
 * =========================================================
 */

.portal-profile-edit-form {
    margin-top: 24px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface-soft);
}

.portal-profile-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
}

.portal-profile-edit-grid .form-group {
    min-width: 0;
    margin: 0;
}

.portal-profile-edit-grid .form-group label {
    display: block;
    margin: 0 0 8px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 800;
}

.portal-profile-edit-grid .form-group input {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    box-sizing: border-box;
}

.portal-profile-edit-grid .form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.portal-profile-readonly {
    background: #eef2f7 !important;
    color: #5b6472 !important;
    border-color: #d7dee9 !important;
    cursor: not-allowed;
    opacity: 1;
}

.portal-profile-edit-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

.portal-profile-edit-actions .portal-profile-primary-button {
    min-width: 210px;
}

.portal-profile-password-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 14px;
    margin-top: 24px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface-soft);
}

.portal-profile-password-form .form-group {
    min-width: 0;
    margin: 0;
}

.portal-profile-password-form .form-group label {
    display: block;
    margin: 0 0 8px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 800;
}

.portal-profile-password-form input {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    box-sizing: border-box;
}

.portal-profile-password-form .portal-profile-primary-button {
    min-height: 50px;
    white-space: nowrap;
}

body.dark-mode .portal-profile-edit-form, body.dark-mode .portal-profile-password-form {
    background: var(--panel-2);
    border-color: var(--border);
}

body.dark-mode .portal-profile-edit-grid .form-group input, body.dark-mode .portal-profile-password-form input {
    background: var(--input-bg);
    border-color: var(--border);
    color: var(--text);
}

@media (max-width: 760px) {
    .portal-profile-edit-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .portal-profile-edit-form, .portal-profile-password-form {
        padding: 18px;
    }

    .portal-profile-edit-actions {
        justify-content: stretch;
    }

    .portal-profile-edit-actions .portal-profile-primary-button {
        width: 100%;
        min-width: 0;
    }

    .portal-profile-password-form {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .portal-profile-password-form .portal-profile-primary-button {
        width: 100%;
    }
}

body.dark-mode .portal-profile-readonly {
    background: #2b3443 !important;
    color: #cbd5e1 !important;
    border-color: #445066 !important;
}

/*
 * =========================================================
 * PORTAL – PROFIL MODERN
 * =========================================================
 */

.portal-profile-hero-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.portal-profile-hero-main {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.portal-profile-avatar {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfe0f5;
    border-radius: 20px;
    background: #eaf3ff;
    color: #1d5fbf;
}

.portal-profile-avatar .material-symbols-rounded {
    font-size: 34px;
}

.portal-profile-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-profile-hero-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: min(440px, 42%);
}

.portal-profile-hero-meta-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-soft);
}

.portal-profile-hero-meta-item > .material-symbols-rounded {
    flex: 0 0 auto;
    color: #2563eb;
    font-size: 23px;
}

.portal-profile-hero-meta-item div {
    min-width: 0;
}

.portal-profile-hero-meta-item small {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.portal-profile-hero-meta-item strong {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-profile-modern-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.85fr);
    align-items: start;
    gap: 28px;
}

.portal-profile-side-column {
    display: grid;
    gap: 28px;
}

.portal-profile-modern-card {
    margin: 0;
}

.portal-profile-modern-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.portal-profile-modern-header-compact {
    margin-bottom: 20px;
}

.portal-profile-section-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #edf4ff;
    color: #1f63c8;
}

.portal-profile-section-icon .material-symbols-rounded {
    font-size: 25px;
}

.portal-profile-modern-header h2 {
    margin: 0 0 5px;
    color: var(--text);
    font-size: 1.25rem;
}

.portal-profile-modern-header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.portal-profile-modern-form {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface-soft);
}

.portal-profile-modern-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 19px 22px;
}

.portal-profile-modern-grid .form-group, .portal-profile-password-modern .form-group {
    min-width: 0;
    margin: 0;
}

.portal-profile-modern-grid label, .portal-profile-password-modern label {
    display: block;
    margin: 0 0 8px;
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 800;
}

.portal-profile-input-wrap {
    position: relative;
}

.portal-profile-input-wrap > .material-symbols-rounded {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 1;
    color: var(--muted);
    font-size: 21px;
    pointer-events: none;
    transform: translateY(-50%);
}

.portal-profile-input-wrap input {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px 12px 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    box-sizing: border-box;
}

.portal-profile-input-wrap input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.portal-profile-input-wrap input.portal-profile-readonly {
    background: #e9eef5 !important;
    color: #64748b !important;
    border-color: #d3dce8 !important;
    cursor: not-allowed;
    opacity: 1;
}

.portal-profile-modern-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
}

.portal-profile-primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.portal-profile-primary-button .material-symbols-rounded {
    font-size: 21px;
}

.portal-profile-password-modern {
    display: grid;
    gap: 16px;
}

.portal-profile-help-card {
    background: linear-gradient(
            145deg,
            rgba(37, 99, 235, 0.05),
            rgba(37, 99, 235, 0)
        ),
        var(--surface);
}

body.dark-mode .portal-profile-avatar, html[data-theme="dark"] .portal-profile-avatar, body[data-theme="dark"] .portal-profile-avatar {
    background: #1d3150;
    color: #93c5fd;
    border-color: #36527b;
}

body.dark-mode .portal-profile-hero-meta-item, html[data-theme="dark"] .portal-profile-hero-meta-item, body[data-theme="dark"] .portal-profile-hero-meta-item, body.dark-mode .portal-profile-modern-form, html[data-theme="dark"] .portal-profile-modern-form, body[data-theme="dark"] .portal-profile-modern-form {
    background: var(--panel-2);
    border-color: var(--border);
}

body.dark-mode .portal-profile-section-icon, html[data-theme="dark"] .portal-profile-section-icon, body[data-theme="dark"] .portal-profile-section-icon {
    background: #203a61;
    color: #93c5fd;
}

body.dark-mode .portal-profile-input-wrap input.portal-profile-readonly, html[data-theme="dark"] .portal-profile-input-wrap input.portal-profile-readonly, body[data-theme="dark"] .portal-profile-input-wrap input.portal-profile-readonly {
    background: #253247 !important;
    color: #cbd5e1 !important;
    border-color: #3b4a61 !important;
}

@media (max-width: 1050px) {
    .portal-profile-hero-modern {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-profile-hero-meta {
        width: 100%;
        min-width: 0;
    }

    .portal-profile-modern-layout {
        grid-template-columns: 1fr;
    }

    .portal-profile-side-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .portal-profile-hero-main {
        align-items: flex-start;
    }

    .portal-profile-avatar {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
        border-radius: 16px;
    }

    .portal-profile-avatar .material-symbols-rounded {
        font-size: 29px;
    }

    .portal-profile-hero-meta {
        grid-template-columns: 1fr;
    }

    .portal-profile-modern-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .portal-profile-side-column {
        grid-template-columns: 1fr;
    }

    .portal-profile-modern-form {
        padding: 18px;
    }

    .portal-profile-modern-actions {
        justify-content: stretch;
    }

    .portal-profile-modern-actions .portal-profile-primary-button {
        width: 100%;
    }
}

/*
 * =========================================================
 * PORTAL – PROFIL OHNE ICONS
 * =========================================================
 */

.portal-profile-page {
    padding-bottom: 48px;
}

.portal-profile-hero-clean {
    display: block;
}

.portal-profile-hero-clean h1 {
    margin-bottom: 8px;
}

.portal-profile-hero-clean p {
    margin: 0;
    max-width: 760px;
}

.portal-profile-clean-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.85fr);
    align-items: stretch;
    gap: 28px;
}

.portal-profile-clean-side {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 28px;
}

.portal-profile-clean-card {
    margin: 0;
}

.portal-profile-main-card {
    height: 100%;
}

.portal-profile-clean-header {
    margin-bottom: 24px;
}

.portal-profile-clean-header h2 {
    margin: 0 0 7px;
    color: var(--text);
    font-size: 1.35rem;
}

.portal-profile-clean-header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.5;
}

.portal-profile-clean-form {
    display: flex;
    flex-direction: column;
    height: calc(100% - 78px);
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface-soft);
}

.portal-profile-clean-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 19px 22px;
}

.portal-profile-clean-grid .form-group, .portal-profile-password-clean .form-group {
    min-width: 0;
    margin: 0;
}

.portal-profile-clean-grid label, .portal-profile-password-clean label {
    display: block;
    margin: 0 0 8px;
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 800;
}

.portal-profile-clean-grid input, .portal-profile-password-clean input {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    box-sizing: border-box;
}

.portal-profile-clean-grid input:focus, .portal-profile-password-clean input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.portal-profile-readonly {
    background: #e9eef5 !important;
    color: #64748b !important;
    border-color: #d3dce8 !important;
    cursor: not-allowed;
    opacity: 1;
}

.portal-profile-clean-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 22px;
}

.portal-profile-password-clean {
    display: grid;
    gap: 16px;
}

.portal-profile-full-button {
    width: 100%;
    min-height: 50px;
}

.portal-profile-help-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

body.dark-mode .portal-profile-clean-form, html[data-theme="dark"] .portal-profile-clean-form, body[data-theme="dark"] .portal-profile-clean-form {
    background: var(--panel-2);
    border-color: var(--border);
}

body.dark-mode .portal-profile-readonly, html[data-theme="dark"] .portal-profile-readonly, body[data-theme="dark"] .portal-profile-readonly {
    background: #253247 !important;
    color: #cbd5e1 !important;
    border-color: #3b4a61 !important;
}

@media (max-width: 1050px) {
    .portal-profile-clean-layout {
        grid-template-columns: 1fr;
    }

    .portal-profile-clean-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
    }

    .portal-profile-main-card {
        height: auto;
    }

    .portal-profile-clean-form {
        height: auto;
    }
}

@media (max-width: 720px) {
    .portal-profile-clean-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .portal-profile-clean-side {
        grid-template-columns: 1fr;
    }

    .portal-profile-clean-form {
        padding: 18px;
    }

    .portal-profile-clean-actions {
        justify-content: stretch;
    }

    .portal-profile-clean-actions .portal-profile-primary-button {
        width: 100%;
    }
}

/*
 * =========================================================
 * PORTAL – ARTIKELTABELLE MIT 3 AKTIONEN
 * =========================================================
 */

.portal-artikel-table {
    width: 100%;
    table-layout: fixed;
}

.portal-artikel-table th:nth-child(1), .portal-artikel-table td:nth-child(1) {
    width: 12%;
}

.portal-artikel-table th:nth-child(2), .portal-artikel-table td:nth-child(2) {
    width: 12%;
}

.portal-artikel-table th:nth-child(3), .portal-artikel-table td:nth-child(3) {
    width: 15%;
}

.portal-artikel-table th:nth-child(4), .portal-artikel-table td:nth-child(4) {
    width: 8%;
}

.portal-artikel-table th:nth-child(5), .portal-artikel-table td:nth-child(5) {
    width: 9%;
}

.portal-artikel-table th:nth-child(6), .portal-artikel-table td:nth-child(6) {
    width: 10%;
}

.portal-artikel-table th:nth-child(7), .portal-artikel-table td:nth-child(7) {
    width: 14%;
}

.portal-artikel-table th:nth-child(8), .portal-artikel-table td:nth-child(8) {
    width: 20%;
}

.portal-artikel-table td {
    overflow-wrap: anywhere;
}

.portal-artikel-table .einlieferer-row-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.portal-artikel-table .einlieferer-row-actions form {
    margin: 0;
}

.portal-artikel-table .einlieferer-action-button {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
}

.portal-artikel-table-desktop {
    overflow-x: auto;
}

.portal-artikel-table {
    min-width: 1050px;
}

/*
 * =========================================================
 * PORTAL – ETIKETTEN DOWNLOAD
 * =========================================================
 */

.portal-etiketten-header {
    margin-bottom: 22px;
}

.portal-etiketten-header h2 {
    margin: 0 0 7px;
}

.portal-etiketten-header p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.portal-etiketten-download-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.portal-etiketten-download-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-soft);
}

.portal-etiketten-download-card h3 {
    margin: 0 0 8px;
    color: var(--text);
}

.portal-etiketten-download-card p {
    flex: 1;
    margin: 0 0 20px;
    color: var(--muted);
    line-height: 1.5;
}

.portal-etiketten-download-card .btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}

body.dark-mode .portal-etiketten-download-card, html[data-theme="dark"] .portal-etiketten-download-card, body[data-theme="dark"] .portal-etiketten-download-card {
    background: var(--panel-2);
    border-color: var(--border);
}

@media (max-width: 720px) {
    .portal-etiketten-download-grid {
        grid-template-columns: 1fr;
    }
}

/*
 * =========================================================
 * PORTAL – ETIKETTEN INFO-BEREICH
 * =========================================================
 */

.portal-etiketten-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

.portal-etiketten-info-card {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.portal-etiketten-info-card h2 {
    margin-top: 0;
    margin-bottom: 12px;
}

.portal-etiketten-info-card > p {
    margin-top: 0;
    margin-bottom: 22px;
    line-height: 1.55;
}

/* FORMAT-DATEN */

.portal-etiketten-format-data {
    display: grid;
    gap: 12px;
    margin-top: auto;
}

.portal-etiketten-format-data > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.portal-etiketten-format-data span {
    opacity: 0.75;
}

.portal-etiketten-format-data strong {
    text-align: right;
    white-space: nowrap;
}

/* DRUCKHINWEISE */

.portal-etiketten-info-card .portal-print-note {
    display: grid;
    gap: 14px;
    margin: 0;
}

.portal-etiketten-info-card .portal-print-note p {
    margin: 0;
    line-height: 1.55;
}

/* MOBILE */

@media (max-width: 760px) {
    .portal-etiketten-info-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }
}

/*
 * =========================================================
 * ANNAHME – DRUCKSYSTEM / DRUCKCLIENT
 * =========================================================
 */

.drucker-status {
    display: grid;
    grid-template-columns: minmax(260px, 1fr)
        auto
        minmax(220px, 300px);
    align-items: stretch;
    gap: 16px;
    margin-bottom: 20px;
}

/*
 * =========================================================
 * STATUS LINKS
 * =========================================================
 */

.drucker-status .drucker-ok, .drucker-status .drucker-fehler {
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 0 22px;
    border-radius: 15px;
}

/*
 * =========================================================
 * DRUCKCLIENT-AUSWAHL
 * =========================================================
 */

.annahme-druckclient-auswahl {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 15px;
    background: #ffffff;
    box-sizing: border-box;
}

.annahme-druckclient-auswahl label {
    flex: 0 0 auto;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #17345d;
    white-space: nowrap;
}

.annahme-druckclient-auswahl select {
    flex: 1 1 auto;
    min-width: 0;
    height: 38px;
    padding: 0 36px 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background-color: #f8fafc;
    color: #17345d;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-sizing: border-box;
}

.annahme-druckclient-auswahl select:hover {
    border-color: #94a3b8;
}

.annahme-druckclient-auswahl select:focus {
    outline: none;
    border-color: #7c9bc4;
    box-shadow: 0 0 0 3px
        rgba(124, 155, 196, 0.16);
}

.annahme-druckclient-auswahl select:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

/*
 * =========================================================
 * AUTO-PRINT RECHTS
 * =========================================================
 */

.drucker-status .auto-print-schalter {
    min-height: 56px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    white-space: nowrap;
}

/*
 * =========================================================
 * KEINE DRUCKCLIENTS
 * =========================================================
 */

.annahme-druckclient-auswahl select:has( option:only-child ) {
    color: #64748b;
}

/*
 * =========================================================
 * DARK MODE
 * =========================================================
 */

body.dark-mode .annahme-druckclient-auswahl, html[data-theme="dark"] .annahme-druckclient-auswahl, body[data-theme="dark"] .annahme-druckclient-auswahl {
    background: #18202b;
    border-color: #344154;
}

body.dark-mode .annahme-druckclient-auswahl label, html[data-theme="dark"] .annahme-druckclient-auswahl label, body[data-theme="dark"] .annahme-druckclient-auswahl label {
    color: #e7edf5;
}

body.dark-mode .annahme-druckclient-auswahl select, html[data-theme="dark"] .annahme-druckclient-auswahl select, body[data-theme="dark"] .annahme-druckclient-auswahl select {
    background-color: #202a37;
    border-color: #3d4a5c;
    color: #e7edf5;
}

body.dark-mode .annahme-druckclient-auswahl select:hover, html[data-theme="dark"] .annahme-druckclient-auswahl select:hover, body[data-theme="dark"] .annahme-druckclient-auswahl select:hover {
    border-color: #64748b;
}

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

@media (max-width: 1100px) {
    .drucker-status {
        grid-template-columns: minmax(220px, 1fr)
            minmax(210px, 280px);
    }

    .drucker-status .auto-print-schalter {
        grid-column: 1 / -1;
        width: 100%;
    }
}

@media (max-width: 760px) {
    .drucker-status {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .drucker-status .drucker-ok, .drucker-status .drucker-fehler, .annahme-druckclient-auswahl, .drucker-status .auto-print-schalter {
        width: 100%;
        min-height: 54px;
    }

    .annahme-druckclient-auswahl {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
        padding: 10px 14px;
    }

    .annahme-druckclient-auswahl select {
        width: 100%;
    }
}

/*
 * =========================================================
 * KASSE – MOBILER BARCODE-SCANNER
 * =========================================================
 */

.mobile-camera-hinweis, .mobile-scan-info {
    display: none;
}

/*
 * =========================================================
 * SCANNER OVERLAY
 * =========================================================
 */

.mobile-barcode-scanner {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    background: #0b0f14;
    color: #ffffff;
}

.mobile-barcode-scanner[hidden] {
    display: none;
}

.mobile-barcode-scanner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: max(16px, env(safe-area-inset-top))
        18px
        14px;
    background: #111820;
}

.mobile-barcode-scanner-header > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mobile-barcode-scanner-header strong {
    font-size: 18px;
    line-height: 1.2;
}

.mobile-barcode-scanner-header span:not(.material-symbols-rounded) {
    font-size: 13px;
    opacity: 0.72;
}

.mobile-barcode-close {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
}

.mobile-barcode-close .material-symbols-rounded {
    font-size: 25px;
}

/*
 * =========================================================
 * VIDEO
 * =========================================================
 */

.mobile-barcode-video-container {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: #000000;
}

.mobile-barcode-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/*
 * =========================================================
 * SCANBEREICH
 * =========================================================
 */

.mobile-barcode-target {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 50%;
    height: 150px;
    transform: translateY(-50%);
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 16px;
    box-shadow: 0 0 0 9999px
        rgba(0, 0, 0, 0.24);
    pointer-events: none;
}

.mobile-barcode-target::before, .mobile-barcode-target::after {
    content: "";
    position: absolute;
    width: 34px;
    height: 34px;
}

.mobile-barcode-target::before {
    top: -3px;
    left: -3px;
    border-top: 4px solid #ffffff;
    border-left: 4px solid #ffffff;
    border-radius: 14px 0 0 0;
}

.mobile-barcode-target::after {
    right: -3px;
    bottom: -3px;
    border-right: 4px solid #ffffff;
    border-bottom: 4px solid #ffffff;
    border-radius: 0 0 14px 0;
}

.mobile-barcode-target-line {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 50%;
    height: 2px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
}

/*
 * =========================================================
 * STATUS
 * =========================================================
 */

.mobile-barcode-status {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 20px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    backdrop-filter: blur(12px);
    box-sizing: border-box;
}

.mobile-barcode-status-neutral {
    background: rgba(17, 24, 32, 0.88);
    color: #ffffff;
}

.mobile-barcode-status-success {
    background: rgba(30, 120, 75, 0.94);
    color: #ffffff;
}

.mobile-barcode-status-warning {
    background: rgba(173, 112, 0, 0.94);
    color: #ffffff;
}

.mobile-barcode-status-error {
    background: rgba(170, 45, 45, 0.94);
    color: #ffffff;
}

/*
 * =========================================================
 * FOOTER
 * =========================================================
 */

.mobile-barcode-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px
        18px
        max(14px, env(safe-area-inset-bottom));
    background: #111820;
}

.mobile-barcode-counter {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    font-size: 14px;
    font-weight: 700;
}

.mobile-barcode-counter .material-symbols-rounded {
    font-size: 20px;
}

/*
 * =========================================================
 * BODY WÄHREND SCANNER
 * =========================================================
 */

body.mobile-scanner-open {
    overflow: hidden;
    touch-action: none;
}

/*
 * =========================================================
 * KASSE – MOBILE
 * =========================================================
 */

@media ( max-width: 900px ) and ( pointer: coarse ) {
    /*
     * -----------------------------------------------------
     * CONTENT
     * -----------------------------------------------------
     */

    .content {
        min-width: 0;
    }

    .kasse-hero {
        margin-bottom: 14px;
    }

    .kasse-hero h1 {
        font-size: 28px;
    }

    /*
     * -----------------------------------------------------
     * KASSENLAYOUT
     * -----------------------------------------------------
     */

    .kasse-layout {
        display: flex;
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }

    .kasse-panel, .zahlung-panel {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /*
     * -----------------------------------------------------
     * SCANNERFORMULAR
     * -----------------------------------------------------
     */

    .scanner-form-modern {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .scanner-field-modern {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .scanner-field-modern input {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .scanner-form-modern > .btn {
        width: 100%;
        min-height: 48px;
    }

    #barcodeInput.mobile-camera-input {
        cursor: pointer;
    }

    .mobile-camera-hinweis {
        display: inline-flex;
        margin-left: auto;
        flex: 0 0 auto;
        font-size: 23px;
        color: currentColor;
        pointer-events: none;
    }

    .mobile-scan-info {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 9px;
        padding: 10px 12px;
        border-radius: 10px;
        background: rgba(23, 52, 93, 0.07);
        font-size: 13px;
    }

    .mobile-scan-info[hidden] {
        display: none;
    }

    .mobile-scan-info .material-symbols-rounded {
        font-size: 20px;
    }

    /*
     * -----------------------------------------------------
     * WARENKORB-TITEL
     * -----------------------------------------------------
     */

    .kasse-section-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-top: 22px;
    }

    .kasse-section-title h2 {
        margin: 0;
    }

    /*
     * -----------------------------------------------------
     * DESKTOP-TABELLE -> MOBILE KARTEN
     * -----------------------------------------------------
     */

    .kasse-warenkorb-wrapper {
        overflow: visible;
    }

    .kasse-warenkorb-table, .kasse-warenkorb-table tbody, .kasse-warenkorb-table tr, .kasse-warenkorb-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .kasse-warenkorb-table thead {
        display: none;
    }

    .kasse-warenkorb-table tbody {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .kasse-warenkorb-table tr {
        padding: 14px;
        border: 1px solid #dce3ec;
        border-radius: 14px;
        background: #ffffff;
    }

    .kasse-warenkorb-table td {
        display: grid;
        grid-template-columns: minmax(100px, 0.4fr)
            minmax(0, 1fr);
        gap: 12px;
        padding: 7px 0;
        border: 0;
        text-align: right;
    }

    .kasse-warenkorb-table td::before {
        content: attr(data-label);
        font-size: 12px;
        font-weight: 700;
        color: #6b7788;
        text-align: left;
    }

    .kasse-warenkorb-table td:last-child {
        padding-bottom: 0;
    }

    .kasse-warenkorb-table td:last-child .table-form {
        display: flex;
        justify-content: flex-end;
    }

    .kasse-warenkorb-table td:last-child .btn {
        min-height: 42px;
    }

    /*
     * -----------------------------------------------------
     * ZAHLUNG
     * -----------------------------------------------------
     */

    .total-box {
        margin-bottom: 16px;
    }

    .money-buttons {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .money-buttons button {
        min-width: 0;
        min-height: 46px;
        padding-left: 4px;
        padding-right: 4px;
    }

    .payment-form input {
        width: 100%;
        min-height: 46px;
        box-sizing: border-box;
    }

    .checkout-box {
        display: flex;
        flex-direction: column;
        gap: 9px;
    }

    .checkout-button, .clear-cart-button {
        width: 100%;
        min-height: 50px;
    }

    /*
     * -----------------------------------------------------
     * STORNO
     * -----------------------------------------------------
     */

    .storno-form {
        display: flex;
        flex-direction: column;
        gap: 9px;
    }

    .storno-form input, .storno-form .btn {
        width: 100%;
        min-height: 46px;
        box-sizing: border-box;
    }
}

/*
 * =========================================================
 * SEHR KLEINE HANDYS
 * =========================================================
 */

@media ( max-width: 430px ) and ( pointer: coarse ) {
    .money-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-barcode-target {
        left: 6%;
        right: 6%;
        height: 130px;
    }

    .mobile-barcode-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .mobile-barcode-counter {
        justify-content: center;
    }

    .mobile-barcode-footer .btn {
        width: 100%;
    }
}

/*
 * =========================================================
 * MOBILE SCANNER – LIQUID GLASS
 * =========================================================
 */

.mobile-barcode-scanner-header {
    background: linear-gradient(
            to bottom,
            rgba(12, 16, 22, 0.78),
            rgba(12, 16, 22, 0.35)
        );
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.mobile-barcode-header-glass {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.mobile-barcode-header-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mobile-barcode-footer {
    background: linear-gradient(
            to top,
            rgba(12, 16, 22, 0.84),
            rgba(12, 16, 22, 0.42)
        );
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.mobile-barcode-footer-glass {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mobile-barcode-close {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(
            255,
            255,
            255,
            0.18
        );
    box-shadow: inset 0 1px 0
        rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.mobile-barcode-status {
    border: 1px solid rgba(
            255,
            255,
            255,
            0.16
        );
    box-shadow: 0 8px 32px
        rgba(0, 0, 0, 0.26),
        inset 0 1px 0
        rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px)
        saturate(145%);
    -webkit-backdrop-filter: blur(20px)
        saturate(145%);
}

.mobile-barcode-status-neutral {
    background: rgba(20, 27, 36, 0.74);
}

.mobile-barcode-status-success {
    background: rgba(23, 128, 73, 0.84);
}

.mobile-barcode-status-warning {
    background: rgba(174, 111, 0, 0.86);
}

.mobile-barcode-status-error {
    background: rgba(177, 42, 42, 0.86);
}

.mobile-barcode-stop {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

@media (max-width: 430px) {
    .mobile-barcode-footer-glass {
        flex-direction: column;
        align-items: stretch;
    }

    .mobile-barcode-counter {
        justify-content: center;
    }

    .mobile-barcode-stop {
        width: 100%;
    }
}

/*
 * =========================================================
 * MOBILE SCANNER – HEADER KORREKTUR
 * =========================================================
 */

.mobile-barcode-scanner-header {
    display: block !important;
    padding: max(14px, env(safe-area-inset-top))
        16px
        14px !important;
}

.mobile-barcode-header-glass {
    width: 100%;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px;
    box-sizing: border-box;
}

.mobile-barcode-header-text {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    flex: 1 1 auto;
    min-width: 0;
    text-align: left !important;
}

.mobile-barcode-header-text strong {
    font-size: 20px;
    font-weight: 750;
    line-height: 1.2;
    color: #ffffff;
}

.mobile-barcode-header-text span {
    margin-top: 3px;
    font-size: 14px;
    line-height: 1.3;
    color: rgba(
            255,
            255,
            255,
            0.68
        );
}

/* X wirklich rechts oben */

.mobile-barcode-close {
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
}

.mobile-barcode-close .material-symbols-rounded {
    font-size: 27px;
    line-height: 1;
}

/*
 * =========================================================
 * STATUS MIT MATERIAL ICON
 * =========================================================
 */

.mobile-barcode-status {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.mobile-barcode-status-icon {
    flex: 0 0 auto;
    font-size: 25px;
}

.mobile-barcode-status-text {
    min-width: 0;
    line-height: 1.35;
}

/* Erfolg */

.mobile-barcode-status-success .mobile-barcode-status-icon {
    font-variation-settings: "FILL" 1,
        "wght" 600,
        "GRAD" 0,
        "opsz" 24;
}

/* Warnung */

.mobile-barcode-status-warning .mobile-barcode-status-icon {
    font-variation-settings: "FILL" 1,
        "wght" 600,
        "GRAD" 0,
        "opsz" 24;
}

/* Fehler */

.mobile-barcode-status-error .mobile-barcode-status-icon {
    font-variation-settings: "FILL" 1,
        "wght" 600,
        "GRAD" 0,
        "opsz" 24;
}

/*
 * =========================================================
 * INTERN – MOBILE NAVIGATION
 * Bottom-Navigation nutzt 1:1 die Portal-Klassen.
 * =========================================================
 */

/*
 * =========================================================
 * MOBILE
 * =========================================================
 */

@media (max-width: 900px) {
    /*
     * -----------------------------------------------------
     * DESKTOP-SIDEBAR AUSBLENDEN
     * -----------------------------------------------------
     */

    .sidebar {
        display: none !important;
    }

    /*
     * -----------------------------------------------------
     * INTERNER SEITENINHALT
     * -----------------------------------------------------
     */

    .app-layout {
        display: block;
        min-height: 100vh;
    }

    .content {
        width: 100%;
        max-width: none;
        margin-left: 0 !important;
        padding-left: 14px;
        padding-right: 14px;
        padding-bottom: calc(
                100px
                + env(safe-area-inset-bottom)
            );
        box-sizing: border-box;
    }

    /*
     * =====================================================
     * INTERNE BOTTOM-NAV
     * KEINE eigene Optik!
     * Nur notwendige kleine Ergänzungen.
     * =====================================================
     */

    .internal-mobile-bottom-nav {
        z-index: 8000;
    }

    /*
     * * Mehr hat ein Badge.
     * * Dafür braucht nur dieses Element position: relative.
     */

    .internal-mobile-more-trigger {
        position: relative;
    }

    /*
     * =====================================================
     * KONTAKT-BADGE AUF "MEHR"
     * =====================================================
     */

    .internal-mobile-more-badge {
        position: absolute;
        top: 1px;
        right: calc(50% - 21px);
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        background: #dc2626;
        color: #ffffff;
        font-size: 10px;
        font-weight: 800;
        line-height: 1;
        box-sizing: border-box;
        box-shadow: 0 2px 5px
            rgba(
                15,
                23,
                42,
                0.18
            );
    }

    .internal-mobile-more-badge[hidden] {
        display: none;
    }

    /*
     * =====================================================
     * ADMIN – MEHR OVERLAY
     * =====================================================
     */

    .internal-more-sheet {
        position: fixed;
        inset: 0;
        z-index: 9000;
        display: block;
    }

    .internal-more-sheet[hidden] {
        display: none;
    }

    /*
     * =====================================================
     * BACKDROP
     * =====================================================
     */

    .internal-more-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(
                15,
                23,
                42,
                0.40
            );
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    /*
     * =====================================================
     * MEHR – PANEL
     * =====================================================
     */

    .internal-more-panel {
        position: absolute;
        left: 10px;
        right: 10px;
        bottom: calc(
                82px
                + env(safe-area-inset-bottom)
            );
        max-height: min(
                72vh,
                650px
            );
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border: 1px solid
            rgba(
                255,
                255,
                255,
                0.68
            );
        border-radius: 24px;
        background: rgba(
                255,
                255,
                255,
                0.94
            );
        box-shadow: 0 20px 60px
            rgba(
                15,
                23,
                42,
                0.24
            );
        backdrop-filter: blur(28px)
            saturate(160%);
        -webkit-backdrop-filter: blur(28px)
            saturate(160%);
        box-sizing: border-box;
    }

    /*
     * =====================================================
     * MEHR – HEADER
     * =====================================================
     */

    .internal-more-header {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 18px
            18px
            14px;
        border-bottom: 1px solid
            rgba(
                148,
                163,
                184,
                0.18
            );
    }

    .internal-more-header h2 {
        margin: 0;
        color: #17345d;
        font-size: 22px;
        line-height: 1.2;
    }

    .internal-more-header p {
        margin: 3px
            0
            0;
        color: #7b8797;
        font-size: 12px;
    }

    /*
     * =====================================================
     * X
     * =====================================================
     */

    .internal-more-close {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid
            rgba(
                148,
                163,
                184,
                0.24
            );
        border-radius: 50%;
        background: rgba(
                241,
                245,
                249,
                0.88
            );
        color: #17345d;
        cursor: pointer;
        box-shadow: none;
        -webkit-appearance: none;
        appearance: none;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .internal-more-close .material-symbols-rounded {
        font-size: 24px;
        line-height: 1;
    }

    /*
     * =====================================================
     * MEHR – LINKLISTE
     * =====================================================
     */

    .internal-more-links {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        padding: 8px
            10px
            12px;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .internal-more-link {
        min-height: 58px;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 8px
            9px;
        border-radius: 15px;
        color: #17345d;
        text-decoration: none;
        box-sizing: border-box;
        -webkit-tap-highlight-color: transparent;
    }

    .internal-more-link:active {
        background: rgba(
                37,
                99,
                235,
                0.07
            );
    }

    .internal-more-link.active {
        background: rgba(
                37,
                99,
                235,
                0.10
            );
        color: #2563eb;
    }

    /*
     * =====================================================
     * MEHR – ICON
     * =====================================================
     */

    .internal-more-icon {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        background: rgba(
                226,
                232,
                240,
                0.72
            );
        color: #17345d;
    }

    .internal-more-icon .material-symbols-rounded {
        font-size: 23px;
    }

    .internal-more-link.active .internal-more-icon {
        background: rgba(
                37,
                99,
                235,
                0.12
            );
        color: #2563eb;
    }

    /*
     * =====================================================
     * MEHR – TEXT
     * =====================================================
     */

    .internal-more-link-text {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 14px;
        font-weight: 700;
    }

    .internal-more-chevron {
        flex: 0 0 auto;
        color: #94a3b8;
        font-size: 21px;
    }

    /*
     * =====================================================
     * KONTAKTANFRAGEN-BADGE IM SHEET
     * =====================================================
     */

    .internal-more-contact-badge {
        min-width: 23px;
        height: 23px;
        padding: 0 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        background: #dc2626;
        color: #ffffff;
        font-size: 11px;
        font-weight: 800;
        line-height: 1;
        box-sizing: border-box;
    }

    .internal-more-contact-badge[hidden] {
        display: none;
    }

    /*
     * =====================================================
     * BODY BEI OFFENEM MEHR-MENÜ
     * =====================================================
     */

    body.internal-more-open {
        overflow: hidden;
    }

    /*
     * =====================================================
     * DARK MODE – MEHR
     * =====================================================
     */

    body.dark-mode .internal-more-panel {
        border-color: rgba(
                255,
                255,
                255,
                0.10
            );
        background: rgba(
                22,
                29,
                39,
                0.95
            );
    }

    body.dark-mode .internal-more-header {
        border-bottom-color: rgba(
                255,
                255,
                255,
                0.08
            );
    }

    body.dark-mode .internal-more-header h2 {
        color: #eef3f8;
    }

    body.dark-mode .internal-more-header p {
        color: #93a2b5;
    }

    body.dark-mode .internal-more-close {
        border-color: rgba(
                255,
                255,
                255,
                0.10
            );
        background: rgba(
                255,
                255,
                255,
                0.08
            );
        color: #eef3f8;
    }

    body.dark-mode .internal-more-link {
        color: #e5edf6;
    }

    body.dark-mode .internal-more-link.active {
        background: rgba(
                72,
                133,
                255,
                0.16
            );
        color: #79a7ff;
    }

    body.dark-mode .internal-more-icon {
        background: rgba(
                255,
                255,
                255,
                0.07
            );
        color: #cbd6e4;
    }
}

/*
 * =========================================================
 * EINLIEFERER – MOBILE KARTEN
 * =========================================================
 */

.einlieferer-mobile-list {
    display: none;
}

@media (max-width: 900px) {
    /*
     * =====================================================
     * DESKTOP-TABELLE MOBIL AUSBLENDEN
     * =====================================================
     */

    .einlieferer-desktop-list {
        display: none !important;
    }

    /*
     * =====================================================
     * LISTE
     * =====================================================
     */

    .einlieferer-mobile-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 14px;
    }

    /*
     * =====================================================
     * KARTE
     * =====================================================
     */

    .mobile-person-card {
        width: 100%;
        padding: 15px;
        border: 1px solid
            #d7e0ea;
        border-radius: 18px;
        background: #ffffff;
        box-sizing: border-box;
        box-shadow: 0 2px 7px
            rgba(
                15,
                23,
                42,
                0.03
            );
    }

    /*
     * =====================================================
     * KOPF
     * =====================================================
     */

    .mobile-person-card-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 17px;
    }

    .mobile-person-card-header > div {
        min-width: 0;
        flex: 1 1 auto;
    }

    .mobile-person-card-header h3 {
        margin: 0;
        color: #0f172a;
        font-size: 17px;
        font-weight: 800;
        line-height: 1.25;
    }

    .mobile-person-card-header > div > span {
        display: block;
        margin-top: 4px;
        color: #64748b;
        font-size: 12px;
        line-height: 1.2;
    }

    .mobile-person-open {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid
            #d4deea;
        border-radius: 12px;
        background: #edf3f9;
        color: #17345d;
        text-decoration: none;
    }

    .mobile-person-open .material-symbols-rounded {
        font-size: 23px;
    }

    /*
     * =====================================================
     * DATEN
     * =====================================================
     */

    .mobile-person-card-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr)
            minmax(0, 1fr);
        gap: 14px
            18px;
    }

    .mobile-person-field {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

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

    .mobile-person-label {
        color: #64748b;
        font-size: 10px;
        font-weight: 600;
        line-height: 1.1;
        text-transform: uppercase;
        letter-spacing: 0.035em;
    }

    .mobile-person-value {
        min-width: 0;
        overflow: hidden;
        color: #0f172a;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.35;
        text-overflow: ellipsis;
    }

    .mobile-person-contact {
        color: #17345d;
        text-decoration: none;
        word-break: break-word;
    }

    /*
     * =====================================================
     * AKTIONEN – PORTAL-ARTIG
     * =====================================================
     */

    .mobile-person-actions {
        display: grid;
        grid-template-columns: repeat(
                3,
                minmax(0, 1fr)
            );
        gap: 9px;
        margin-top: 18px;
    }

    .mobile-person-actions form {
        margin: 0;
        min-width: 0;
    }

    .mobile-person-action {
        width: 100%;
        min-width: 0;
        min-height: 67px;
        padding: 8px
            4px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        border: 1px solid
            #cad6e4;
        border-radius: 14px;
        background: #e8eef5;
        color: #0f172a;
        font: inherit;
        font-size: 11px;
        font-weight: 600;
        line-height: 1.1;
        text-decoration: none;
        text-align: center;
        cursor: pointer;
        box-sizing: border-box;
        -webkit-appearance: none;
        appearance: none;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-person-action .material-symbols-rounded {
        font-size: 24px;
    }

    .mobile-person-delete {
        color: #991b1b;
    }

    /*
     * =====================================================
     * ÄUSSERER PANEL MOBIL
     * =====================================================
     */

    .einlieferer-list-panel {
        padding: 18px 14px;
    }

    .einlieferer-list-header {
        margin-bottom: 2px;
    }

    .einlieferer-list-header h2 {
        font-size: 21px;
    }

    /*
     * =====================================================
     * DARKMODE
     * =====================================================
     */

    body.dark-mode .mobile-person-card {
        border-color: rgba(
                255,
                255,
                255,
                0.09
            );
        background: #18212c;
        box-shadow: none;
    }

    body.dark-mode .mobile-person-card-header h3, body.dark-mode .mobile-person-value {
        color: #edf3fa;
    }

    body.dark-mode .mobile-person-card-header > div > span, body.dark-mode .mobile-person-label {
        color: #93a3b7;
    }

    body.dark-mode .mobile-person-contact {
        color: #b9d0ef;
    }

    body.dark-mode .mobile-person-open {
        border-color: rgba(
                255,
                255,
                255,
                0.09
            );
        background: #253243;
        color: #dce7f4;
    }

    body.dark-mode .mobile-person-action {
        border-color: #3a485b;
        background: #293646;
        color: #edf3fa;
    }

    body.dark-mode .mobile-person-delete {
        color: #ffabab;
    }
}

/*
 * =========================================================
 * ANNAHME – MOBILE ARTIKELKARTEN
 * =========================================================
 */

.annahme-mobile-artikel-list {
    display: none;
}

@media (max-width: 900px) {
    /* Desktop-Tabelle weg */

    .annahme-artikel-desktop {
        display: none !important;
    }

    /* Liste */

    .annahme-mobile-artikel-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 14px;
    }

    /* Karte */

    .annahme-mobile-artikel-card {
        width: 100%;
        padding: 14px;
        border: 1px solid #d7e0ea;
        border-radius: 18px;
        background: #ffffff;
        box-sizing: border-box;
        box-shadow: 0 2px 7px
            rgba(15, 23, 42, 0.03);
    }

    /* Header */

    .annahme-mobile-artikel-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 16px;
    }

    .annahme-mobile-artikel-header h3 {
        margin: 0;
        color: #0f172a;
        font-size: 17px;
        font-weight: 800;
        line-height: 1.25;
    }

    .annahme-mobile-artikel-status {
        flex: 0 0 auto;
    }

    /* Daten */

    .annahme-mobile-artikel-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr)
            minmax(0, 1fr);
        gap: 13px
            18px;
    }

    .annahme-mobile-artikel-field {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

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

    .annahme-mobile-artikel-field > span {
        color: #64748b;
        font-size: 10px;
        font-weight: 600;
        line-height: 1.1;
        text-transform: uppercase;
        letter-spacing: 0.035em;
    }

    .annahme-mobile-artikel-field > strong {
        min-width: 0;
        color: #0f172a;
        font-size: 14px;
        font-weight: 650;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    /* Aktionen */

    .annahme-mobile-artikel-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 9px;
        margin-top: 18px;
    }

    .annahme-mobile-artikel-actions form {
        min-width: 0;
        margin: 0;
    }

    .annahme-mobile-artikel-action {
        width: 100%;
        min-width: 0;
        min-height: 67px;
        padding: 8px 4px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        border: 1px solid #cad6e4;
        border-radius: 14px;
        background: #e8eef5;
        color: #0f172a;
        font: inherit;
        font-size: 11px;
        font-weight: 600;
        line-height: 1.1;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
        box-sizing: border-box;
        appearance: none;
        -webkit-appearance: none;
        -webkit-tap-highlight-color: transparent;
    }

    .annahme-mobile-artikel-action .material-symbols-rounded {
        font-size: 24px;
    }

    .annahme-mobile-artikel-delete {
        color: #991b1b;
    }

    /* Panel etwas kompakter */

    .annahme-artikel-panel {
        padding: 18px
            14px;
    }

    /*
     * =====================================================
     * DARK MODE
     * =====================================================
     */

    body.dark-mode .annahme-mobile-artikel-card {
        border-color: rgba(255, 255, 255, 0.09);
        background: #18212c;
        box-shadow: none;
    }

    body.dark-mode .annahme-mobile-artikel-header h3, body.dark-mode .annahme-mobile-artikel-field > strong {
        color: #edf3fa;
    }

    body.dark-mode .annahme-mobile-artikel-field > span {
        color: #93a3b7;
    }

    body.dark-mode .annahme-mobile-artikel-action {
        border-color: #3a485b;
        background: #293646;
        color: #edf3fa;
    }

    body.dark-mode .annahme-mobile-artikel-delete {
        color: #ffabab;
    }
}

/*
 * =========================================================
 * ARTIKELÜBERSICHT – MOBILE KARTEN
 * =========================================================
 */

.artikel-mobile-list {
    display: none;
}

@media (max-width: 900px) {
    /*
     * =====================================================
     * DESKTOP-TABELLE AUSBLENDEN
     * =====================================================
     */

    .artikel-desktop-list {
        display: none !important;
    }

    /*
     * =====================================================
     * MOBILE LISTE
     * =====================================================
     */

    .artikel-mobile-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 14px;
    }

    /*
     * =====================================================
     * KARTE
     * =====================================================
     */

    .artikel-mobile-card {
        width: 100%;
        padding: 14px;
        border: 1px solid
            #d7e0ea;
        border-radius: 18px;
        background: #ffffff;
        box-sizing: border-box;
        box-shadow: 0 2px 7px
            rgba(
                15,
                23,
                42,
                0.03
            );
    }

    /*
     * =====================================================
     * HEADER
     * =====================================================
     */

    .artikel-mobile-card-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 16px;
    }

    .artikel-mobile-card-header h3 {
        margin: 0;
        color: #0f172a;
        font-size: 17px;
        font-weight: 800;
        line-height: 1.25;
    }

    .artikel-mobile-card-status {
        flex: 0 0 auto;
    }

    /*
     * =====================================================
     * DATEN
     * =====================================================
     */

    .artikel-mobile-card-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr)
            minmax(0, 1fr);
        gap: 13px
            18px;
    }

    .artikel-mobile-field {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

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

    .artikel-mobile-field > span {
        color: #64748b;
        font-size: 10px;
        font-weight: 600;
        line-height: 1.1;
        text-transform: uppercase;
        letter-spacing: 0.035em;
    }

    .artikel-mobile-field > strong, .artikel-mobile-owner {
        min-width: 0;
        color: #0f172a;
        font-size: 14px;
        font-weight: 650;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .artikel-mobile-owner {
        color: #17345d;
        text-decoration: none;
    }

    /*
     * =====================================================
     * AKTION
     * =====================================================
     */

    .artikel-mobile-card-actions {
        margin-top: 18px;
    }

    .artikel-mobile-open-button {
        width: 100%;
        min-height: 52px;
        padding: 8px
            12px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        border: 1px solid
            #cad6e4;
        border-radius: 14px;
        background: #e8eef5;
        color: #0f172a;
        font-size: 12px;
        font-weight: 650;
        text-decoration: none;
        box-sizing: border-box;
    }

    .artikel-mobile-open-button .material-symbols-rounded {
        font-size: 22px;
    }

    /*
     * =====================================================
     * PANEL
     * =====================================================
     */

    .artikel-list-panel {
        padding: 18px
            14px;
    }

    /*
     * =====================================================
     * FILTER MOBIL
     * =====================================================
     */

    .artikel-filter-form {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .artikel-filter-form .einlieferer-search-field {
        width: 100%;
    }

    .artikel-status-filter {
        width: 100%;
    }

    .artikel-filter-form .btn {
        width: 100%;
    }

    /*
     * =====================================================
     * DARK MODE
     * =====================================================
     */

    body.dark-mode .artikel-mobile-card {
        border-color: rgba(
                255,
                255,
                255,
                0.09
            );
        background: #18212c;
        box-shadow: none;
    }

    body.dark-mode .artikel-mobile-card-header h3, body.dark-mode .artikel-mobile-field > strong {
        color: #edf3fa;
    }

    body.dark-mode .artikel-mobile-field > span {
        color: #93a3b7;
    }

    body.dark-mode .artikel-mobile-owner {
        color: #b9d0ef;
    }

    body.dark-mode .artikel-mobile-open-button {
        border-color: #3a485b;
        background: #293646;
        color: #edf3fa;
    }
}

/*
 * =========================================================
 * KASSE + AUSZAHLUNG
 * MOBILE OPTIMIERUNG
 * DESKTOP BLEIBT UNVERÄNDERT
 * =========================================================
 */

@media (max-width: 900px) {
    /*
     * =====================================================
     * GEMEINSAM – PANELS
     * =====================================================
     */

    .kasse-page .kasse-panel, .kasse-page .zahlung-panel, .auszahlung-page .dashboard-panel {
        border-radius: 18px;
    }

    /*
     * =====================================================
     * SCANNER
     * =====================================================
     */

    .kasse-page .scanner-form-modern, .auszahlung-page .scanner-form-modern {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .kasse-page .scanner-field-modern, .auszahlung-page .scanner-field-modern {
        width: 100%;
        box-sizing: border-box;
    }

    .kasse-page .scanner-form-modern > .btn, .auszahlung-page .scanner-form-modern > .btn {
        width: 100%;
        min-height: 46px;
    }

    /*
     * =========================================================
     * KASSE
     * =========================================================
     */

    /*
     * -----------------------------------------------------
     * KASSENLAYOUT UNTEREINANDER
     * -----------------------------------------------------
     */

    .kasse-page .kasse-layout {
        display: flex !important;
        flex-direction: column;
        gap: 14px;
        width: 100%;
    }

    .kasse-page .kasse-panel, .kasse-page .zahlung-panel {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /*
     * -----------------------------------------------------
     * ÜBERSCHRIFT
     * -----------------------------------------------------
     */

    .kasse-page .kasse-hero {
        margin-bottom: 14px;
    }

    .kasse-page .kasse-hero h1 {
        font-size: 27px;
    }

    /*
     * =====================================================
     * WARENKORB ALS EINZELNE KARTEN
     * =====================================================
     */

    .kasse-page .kasse-warenkorb-wrapper {
        overflow: visible;
    }

    .kasse-page .kasse-warenkorb-table {
        display: block;
        width: 100%;
        border: 0;
    }

    .kasse-page .kasse-warenkorb-table thead {
        display: none;
    }

    .kasse-page .kasse-warenkorb-table tbody {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .kasse-page .kasse-warenkorb-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr)
            minmax(0, 1fr);
        gap: 13px
            16px;
        width: 100%;
        padding: 14px;
        border: 1px solid
            #d7e0ea;
        border-radius: 17px;
        background: #ffffff;
        box-sizing: border-box;
        box-shadow: 0 2px 7px
            rgba(
                15,
                23,
                42,
                0.03
            );
    }

    .kasse-page .kasse-warenkorb-table td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        min-width: 0;
        padding: 0 !important;
        border: 0 !important;
        text-align: left !important;
    }

    .kasse-page .kasse-warenkorb-table td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 10px;
        font-weight: 600;
        line-height: 1.1;
        text-transform: uppercase;
        letter-spacing: 0.035em;
    }

    /* Artikelbeschreibung volle Breite */

    .kasse-page .kasse-warenkorb-table td:nth-child(2) {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    /* Aktion rechts oben */

    .kasse-page .kasse-warenkorb-table td:nth-child(4) {
        align-items: stretch;
    }

    .kasse-page .kasse-warenkorb-table .table-form {
        width: 100%;
        margin: 0;
    }

    .kasse-page .kasse-warenkorb-table .table-form .btn {
        width: 100%;
        min-height: 40px;
    }

    /*
     * =====================================================
     * ZAHLUNGSBEREICH
     * =====================================================
     */

    .kasse-page .total-box {
        padding: 16px;
        border-radius: 16px;
    }

    .kasse-page .total-box strong {
        font-size: 25px;
    }

    /*
     * -----------------------------------------------------
     * GELDSCHEINE / MÜNZEN
     * -----------------------------------------------------
     */

    .kasse-page .money-buttons {
        display: grid;
        grid-template-columns: repeat(
                4,
                minmax(0, 1fr)
            );
        gap: 8px;
        width: 100%;
    }

    .kasse-page .money-buttons button {
        min-width: 0;
        min-height: 48px;
        padding: 8px
            3px;
        font-size: 14px;
        border-radius: 12px;
    }

    /*
     * -----------------------------------------------------
     * ZAHLUNGSFORMULAR
     * -----------------------------------------------------
     */

    .kasse-page .payment-form {
        width: 100%;
    }

    .kasse-page .payment-form > input {
        width: 100%;
        min-height: 48px;
        box-sizing: border-box;
        font-size: 17px;
    }

    .kasse-page .checkout-box {
        display: flex;
        flex-direction: column;
        gap: 9px;
        width: 100%;
    }

    .kasse-page .checkout-button, .kasse-page .clear-cart-button {
        width: 100%;
        min-height: 50px;
    }

    /*
     * =====================================================
     * STORNO
     * =====================================================
     */

    .kasse-page .storno-box {
        margin-top: 22px;
    }

    .kasse-page .storno-form {
        display: flex;
        flex-direction: column;
        gap: 9px;
    }

    .kasse-page .storno-form input, .kasse-page .storno-form .btn {
        width: 100%;
        min-height: 46px;
        box-sizing: border-box;
    }

    /*
     * =========================================================
     * AUSZAHLUNG
     * =========================================================
     */

    /*
     * -----------------------------------------------------
     * SUCHE
     * -----------------------------------------------------
     */

    .auszahlung-page .einlieferer-search-form {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 9px;
        width: 100%;
    }

    .auszahlung-page .einlieferer-search-field {
        width: 100%;
        box-sizing: border-box;
    }

    .auszahlung-page .einlieferer-search-form > .btn {
        width: 100%;
        min-height: 45px;
    }

    /*
     * =====================================================
     * PERSON
     * =====================================================
     */

    .auszahlung-page .payout-header {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .auszahlung-page .payout-header h2 {
        margin-bottom: 5px;
        font-size: 21px;
    }

    .auszahlung-page .payout-header p {
        line-height: 1.55;
        overflow-wrap: anywhere;
    }

    /*
     * =====================================================
     * ABHOLUNG / AUSZAHLUNG
     * =====================================================
     */

    .auszahlung-page .auszahlung-process-card {
        padding: 18px
            15px;
    }

    .auszahlung-page .auszahlung-process-title > div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .auszahlung-page .auszahlung-process-title h2 {
        margin: 0;
    }

    .auszahlung-page .abholung-counter {
        margin-top: 18px;
    }

    /*
     * =====================================================
     * GELD
     * =====================================================
     */

    .auszahlung-page .auszahlung-money-list {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin-top: 14px;
    }

    .auszahlung-page .auszahlung-money-list > div {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 15px;
        padding: 13px
            0;
        box-sizing: border-box;
    }

    .auszahlung-page .auszahlung-money-list strong {
        white-space: nowrap;
    }

    .auszahlung-page .auszahlung-money-total {
        margin-top: 4px;
        padding-top: 16px !important;
    }

    .auszahlung-page .auszahlung-money-total strong {
        font-size: 21px;
    }

    /*
     * =====================================================
     * AUSZAHLUNGS-AKTIONEN
     * =====================================================
     */

    .auszahlung-page .auszahlung-card-actions {
        display: flex;
        flex-direction: column;
        gap: 9px;
        width: 100%;
        margin-top: 17px;
    }

    .auszahlung-page .auszahlung-card-actions > a, .auszahlung-page .auszahlung-card-actions > form, .auszahlung-page .auszahlung-card-actions > form > button {
        width: 100%;
        box-sizing: border-box;
    }

    .auszahlung-page .auszahlung-card-actions .btn {
        min-height: 46px;
    }

    /*
     * =====================================================
     * TABELLEN -> KARTEN
     * =====================================================
     */

    .auszahlung-page .einlieferer-table-wrapper {
        overflow: visible;
    }

    .auszahlung-page .einlieferer-table {
        display: block;
        width: 100%;
        border: 0;
    }

    .auszahlung-page .einlieferer-table thead {
        display: none;
    }

    .auszahlung-page .einlieferer-table tbody {
        display: flex;
        flex-direction: column;
        gap: 11px;
        width: 100%;
    }

    .auszahlung-page .einlieferer-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr)
            minmax(0, 1fr);
        gap: 13px
            18px;
        width: 100%;
        padding: 14px;
        border: 1px solid
            #d7e0ea;
        border-radius: 18px;
        background: #ffffff;
        box-sizing: border-box;
        box-shadow: 0 2px 7px
            rgba(
                15,
                23,
                42,
                0.03
            );
        cursor: default;
    }

    /*
     * * Klickbare Auszahlungs-Personen dürfen
     * * weiterhin wie klickbare Karten wirken.
     */

    .auszahlung-page .einlieferer-table tr.auszahlung-click-row {
        cursor: pointer;
    }

    .auszahlung-page .einlieferer-table tbody td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        min-width: 0;
        padding: 0 !important;
        border: 0 !important;
        color: #0f172a;
        text-align: left !important;
        overflow-wrap: anywhere;
    }

    .auszahlung-page .einlieferer-table tbody td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 10px;
        font-weight: 600;
        line-height: 1.1;
        text-transform: uppercase;
        letter-spacing: 0.035em;
    }

    /* * Beschreibung darf mehr Platz bekommen. */

    .auszahlung-page .einlieferer-table tbody td[data-label="Beschreibung"] {
        grid-column: 1 / -1;
    }

    /*
     * * E-Mail ebenfalls volle Breite,
     * * weil die Adresse sonst schnell umbricht.
     */

    .auszahlung-page .einlieferer-table tbody td[data-label="E-Mail"] {
        grid-column: 1 / -1;
    }

    /*
     * -----------------------------------------------------
     * Status
     * -----------------------------------------------------
     */

    .auszahlung-page .einlieferer-table tbody td[data-label="Status"] {
        justify-content: flex-start;
    }

    /*
     * -----------------------------------------------------
     * Aktion
     * -----------------------------------------------------
     */

    .auszahlung-page .einlieferer-table tbody td[data-label="Aktion"] {
        align-items: stretch;
    }

    .auszahlung-page .einlieferer-table tbody td[data-label="Aktion"] form {
        width: 100%;
        margin: 0;
    }

    .auszahlung-page .einlieferer-table tbody td[data-label="Aktion"] button, .auszahlung-page .einlieferer-table tbody td[data-label="Aktion"] .btn {
        width: 100%;
        min-height: 42px;
        box-sizing: border-box;
    }

    /*
     * =====================================================
     * TABELLENÜBERSCHRIFTEN
     * =====================================================
     */

    .auszahlung-page .auszahlung-table-heading {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 14px;
    }

    .auszahlung-page .auszahlung-table-heading h2 {
        margin: 0;
        font-size: 20px;
    }

    /* Download aller Abrechnungen */

    .auszahlung-page .auszahlung-download-all {
        width: 100%;
        margin-top: 10px;
        box-sizing: border-box;
    }

    /*
     * * Bei "Offene Auszahlungen" steht zusätzlich
     * * der Downloadbutton im Header.
     */

    .auszahlung-page .auszahlung-table-heading:has( .auszahlung-download-all ) {
        flex-direction: column;
    }

    /*
     * =====================================================
     * PAGINATION
     * =====================================================
     */

    .auszahlung-page .backup-pagination {
        margin-top: 17px;
    }

    .auszahlung-page .backup-pagination-info {
        text-align: center;
    }

    .auszahlung-page .backup-pagination-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    /*
     * =====================================================
     * VERMISST DIALOG
     * =====================================================
     */

    .auszahlung-page .vermisst-modal {
        align-items: flex-end !important;
        padding: 10px !important;
    }

    .auszahlung-page .vermisst-modal-dialog {
        width: 100% !important;
        max-height: calc(
                100dvh
                - 20px
            ) !important;
        padding: 20px
            16px !important;
        border-radius: 22px
            22px
            12px
            12px !important;
    }

    .auszahlung-page .vermisst-modal-actions {
        flex-direction: column-reverse;
        gap: 9px;
    }

    .auszahlung-page .vermisst-modal-actions .btn {
        width: 100%;
    }

    /*
     * =========================================================
     * DARK MODE – KASSE
     * =========================================================
     */

    body.dark-mode.kasse-page .kasse-warenkorb-table tr {
        border-color: rgba(
                255,
                255,
                255,
                0.09
            );
        background: #18212c;
        box-shadow: none;
    }

    body.dark-mode.kasse-page .kasse-warenkorb-table td::before {
        color: #93a3b7;
    }

    /*
     * =========================================================
     * DARK MODE – AUSZAHLUNG
     * =========================================================
     */

    body.dark-mode.auszahlung-page .einlieferer-table tbody tr {
        border-color: rgba(
                255,
                255,
                255,
                0.09
            );
        background: #18212c;
        box-shadow: none;
    }

    body.dark-mode.auszahlung-page .einlieferer-table tbody td {
        color: #edf3fa;
    }

    body.dark-mode.auszahlung-page .einlieferer-table tbody td::before {
        color: #93a3b7;
    }
}

/*
 * =========================================================
 * SEHR KLEINE HANDYS
 * =========================================================
 */

@media (max-width: 390px) {
    .kasse-page .money-buttons {
        grid-template-columns: repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .auszahlung-page .einlieferer-table tbody tr {
        gap: 12px
            12px;
    }
}

/*
 * =========================================================
 * KASSENBERICHT – MOBILE
 * Desktop bleibt unverändert
 * =========================================================
 */

.kassenbericht-mobile-list, .kassenbericht-detail-mobile-list {
    display: none;
}

@media (max-width: 900px) {
    /*
     * =====================================================
     * SUCHE
     * =====================================================
     */

    .kassenbericht-page .kassenbericht-search-form {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 9px;
    }

    .kassenbericht-page .kassenbericht-search-form .einlieferer-search-field {
        width: 100%;
        box-sizing: border-box;
    }

    .kassenbericht-page .kassenbericht-search-form > .btn {
        width: 100%;
        min-height: 46px;
        box-sizing: border-box;
    }

    /*
     * =====================================================
     * DESKTOP-TABELLE AUS
     * =====================================================
     */

    .kassenbericht-page .kassenbericht-desktop-list {
        display: none !important;
    }

    /*
     * =====================================================
     * MOBILE LISTE
     * =====================================================
     */

    .kassenbericht-page .kassenbericht-mobile-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 14px;
    }

    /*
     * =====================================================
     * VERKAUFSKARTE
     * =====================================================
     */

    .kassenbericht-page .kassenbericht-mobile-card {
        width: 100%;
        padding: 14px;
        border: 1px solid
            #d7e0ea;
        border-radius: 18px;
        background: #ffffff;
        box-sizing: border-box;
        box-shadow: 0 2px 7px
            rgba(
                15,
                23,
                42,
                0.03
            );
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    /*
     * =====================================================
     * KOPF
     * =====================================================
     */

    .kassenbericht-page .kassenbericht-mobile-card-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 16px;
    }

    .kassenbericht-page .kassenbericht-mobile-eyebrow {
        display: block;
        margin-bottom: 3px;
        color: #64748b;
        font-size: 10px;
        font-weight: 600;
        line-height: 1.1;
        text-transform: uppercase;
        letter-spacing: 0.035em;
    }

    .kassenbericht-page .kassenbericht-mobile-card-header h3 {
        margin: 0;
        color: #0f172a;
        font-size: 18px;
        font-weight: 800;
        line-height: 1.2;
    }

    .kassenbericht-page .kassenbericht-mobile-open {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 1px solid
            #d4deea;
        border-radius: 12px;
        background: #edf3f9;
        color: #17345d;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
    }

    .kassenbericht-page .kassenbericht-mobile-open .material-symbols-rounded {
        font-size: 23px;
    }

    /*
     * =====================================================
     * DATEN
     * =====================================================
     */

    .kassenbericht-page .kassenbericht-mobile-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr)
            minmax(0, 1fr);
        gap: 13px
            18px;
    }

    .kassenbericht-page .kassenbericht-mobile-field {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

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

    .kassenbericht-page .kassenbericht-mobile-field > span {
        color: #64748b;
        font-size: 10px;
        font-weight: 600;
        line-height: 1.1;
        text-transform: uppercase;
        letter-spacing: 0.035em;
    }

    .kassenbericht-page .kassenbericht-mobile-field > strong {
        min-width: 0;
        color: #0f172a;
        font-size: 14px;
        font-weight: 650;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .kassenbericht-page .kassenbericht-mobile-summe > strong {
        font-size: 19px;
        font-weight: 800;
    }

    /*
     * =====================================================
     * DETAIL BUTTON
     * =====================================================
     */

    .kassenbericht-page .kassenbericht-mobile-detail-button {
        width: 100%;
        min-height: 52px;
        margin-top: 18px;
        padding: 8px
            12px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        border: 1px solid
            #cad6e4;
        border-radius: 14px;
        background: #e8eef5;
        color: #0f172a;
        font: inherit;
        font-size: 12px;
        font-weight: 650;
        cursor: pointer;
        box-sizing: border-box;
        appearance: none;
        -webkit-appearance: none;
    }

    .kassenbericht-page .kassenbericht-mobile-detail-button .material-symbols-rounded {
        font-size: 22px;
    }

    /*
     * =====================================================
     * PANEL
     * =====================================================
     */

    .kassenbericht-page .kassenbericht-list-panel {
        padding: 18px
            14px;
    }

    /*
     * =====================================================
     * PAGINATION
     * =====================================================
     */

    .kassenbericht-page .backup-pagination {
        margin-top: 18px;
    }

    .kassenbericht-page .backup-pagination-info {
        text-align: center;
    }

    .kassenbericht-page .backup-pagination-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    /*
     * =====================================================
     * DETAIL-MODAL ALS MOBILE BOTTOM-SHEET
     * =====================================================
     */

    .kassenbericht-page .vermisst-modal {
        align-items: flex-end;
        padding: 10px;
    }

    .kassenbericht-page .kassenbericht-detail-dialog {
        width: 100%;
        max-width: none;
        max-height: calc(
                100dvh
                - 20px
            );
        padding: 20px
            15px
            16px;
        border-radius: 22px
            22px
            12px
            12px;
    }

    .kassenbericht-page .vermisst-modal-header {
        margin-bottom: 18px;
    }

    .kassenbericht-page .vermisst-modal-header h2 {
        font-size: 21px;
    }

    .kassenbericht-page .vermisst-modal-actions {
        margin-top: 16px;
    }

    .kassenbericht-page .vermisst-modal-actions .btn {
        width: 100%;
    }

    /*
     * =====================================================
     * KPI-KARTEN IM DETAIL
     * =====================================================
     */

    .kassenbericht-page .kassenbericht-detail-kpis {
        grid-template-columns: repeat(
                2,
                minmax(0, 1fr)
            );
        gap: 9px;
    }

    .kassenbericht-page .kassenbericht-detail-kpis .dashboard-kpi-card {
        min-width: 0;
        padding: 11px;
        gap: 8px;
        border-radius: 14px;
    }

    .kassenbericht-page .kassenbericht-detail-kpis .dashboard-kpi-icon {
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
    }

    .kassenbericht-page .kassenbericht-detail-kpis .dashboard-kpi-icon .material-symbols-rounded {
        font-size: 20px;
    }

    .kassenbericht-page .kassenbericht-detail-kpis .dashboard-kpi-data {
        min-width: 0;
    }

    .kassenbericht-page .kassenbericht-detail-kpis .dashboard-kpi-data strong {
        display: block;
        min-width: 0;
        overflow-wrap: anywhere;
        font-size: 13px;
    }

    .kassenbericht-page .kassenbericht-detail-kpis .dashboard-kpi-label {
        font-size: 9px;
    }

    /*
     * =====================================================
     * DETAIL ARTIKEL
     * =====================================================
     */

    .kassenbericht-page .kassenbericht-detail-artikel {
        margin-top: 20px;
    }

    .kassenbericht-page .kassenbericht-detail-artikel > h3 {
        margin: 0
            0
            12px;
        font-size: 18px;
    }

    /* Desktoptabelle im Modal weg */

    .kassenbericht-page .kassenbericht-detail-desktop {
        display: none !important;
    }

    /* Karten an */

    .kassenbericht-page .kassenbericht-detail-mobile-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /*
     * =====================================================
     * DETAIL ARTIKELKARTE
     * =====================================================
     */

    .kassenbericht-page .kassenbericht-detail-mobile-card {
        padding: 13px;
        border: 1px solid
            #d7e0ea;
        border-radius: 16px;
        background: #ffffff;
    }

    .kassenbericht-page .kassenbericht-detail-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 14px;
    }

    .kassenbericht-page .kassenbericht-detail-mobile-header > span {
        color: #64748b;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.035em;
    }

    .kassenbericht-page .kassenbericht-detail-mobile-header > strong {
        color: #0f172a;
        font-size: 16px;
        font-weight: 800;
    }

    .kassenbericht-page .kassenbericht-detail-mobile-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr)
            minmax(0, 1fr);
        gap: 12px
            16px;
    }

    .kassenbericht-page .kassenbericht-detail-mobile-field {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .kassenbericht-page .kassenbericht-detail-mobile-full {
        grid-column: 1 / -1;
    }

    .kassenbericht-page .kassenbericht-detail-mobile-field > span {
        color: #64748b;
        font-size: 9px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.035em;
    }

    .kassenbericht-page .kassenbericht-detail-mobile-field > strong, .kassenbericht-page .kassenbericht-detail-mobile-field > a {
        min-width: 0;
        color: #0f172a;
        font-size: 13px;
        font-weight: 650;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .kassenbericht-page .kassenbericht-detail-mobile-field > a {
        color: #17345d;
        text-decoration: none;
    }

    /*
     * =====================================================
     * DARK MODE
     * =====================================================
     */

    body.dark-mode.kassenbericht-page .kassenbericht-mobile-card, body.dark-mode.kassenbericht-page .kassenbericht-detail-mobile-card {
        border-color: rgba(
                255,
                255,
                255,
                0.09
            );
        background: #18212c;
        box-shadow: none;
    }

    body.dark-mode.kassenbericht-page .kassenbericht-mobile-card-header h3, body.dark-mode.kassenbericht-page .kassenbericht-mobile-field > strong, body.dark-mode.kassenbericht-page .kassenbericht-detail-mobile-header > strong, body.dark-mode.kassenbericht-page .kassenbericht-detail-mobile-field > strong {
        color: #edf3fa;
    }

    body.dark-mode.kassenbericht-page .kassenbericht-mobile-eyebrow, body.dark-mode.kassenbericht-page .kassenbericht-mobile-field > span, body.dark-mode.kassenbericht-page .kassenbericht-detail-mobile-header > span, body.dark-mode.kassenbericht-page .kassenbericht-detail-mobile-field > span {
        color: #93a3b7;
    }

    body.dark-mode.kassenbericht-page .kassenbericht-mobile-open, body.dark-mode.kassenbericht-page .kassenbericht-mobile-detail-button {
        border-color: #3a485b;
        background: #293646;
        color: #edf3fa;
    }

    body.dark-mode.kassenbericht-page .kassenbericht-detail-mobile-field > a {
        color: #b9d0ef;
    }
}

/*
 * =========================================================
 * SEHR KLEINE HANDYS
 * =========================================================
 */

@media (max-width: 390px) {
    .kassenbericht-page .kassenbericht-detail-kpis {
        grid-template-columns: 1fr;
    }
}

/*
 * =========================================================
 * KONTAKTANFRAGEN + ACCOUNTS + EINSTELLUNGEN
 * MOBILE OPTIMIERUNG
 * Desktop bleibt unverändert
 * =========================================================
 */

@media (max-width: 900px) {
    /*
     * =====================================================
     * ALLGEMEIN
     * =====================================================
     */

    .kontaktanfragen-page .dashboard-panel, .accounts-page .dashboard-panel, .einstellungen-page .dashboard-panel {
        padding: 16px 14px;
        border-radius: 18px;
        box-sizing: border-box;
    }

    .kontaktanfragen-page input, .kontaktanfragen-page select, .kontaktanfragen-page textarea, .accounts-page input, .accounts-page select, .accounts-page textarea, .einstellungen-page input, .einstellungen-page select, .einstellungen-page textarea {
        max-width: 100%;
        box-sizing: border-box;
    }

    /*
     * =========================================================
     * KONTAKTANFRAGEN
     * =========================================================
     */

    /*
     * -----------------------------------------------------
     * HEADER
     * -----------------------------------------------------
     */

    .kontaktanfragen-page .contact-admin-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    /*
     * -----------------------------------------------------
     * ANFRAGEKARTEN
     * -----------------------------------------------------
     */

    .kontaktanfragen-page .contact-request-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .kontaktanfragen-page .contact-request-card {
        width: 100%;
        min-width: 0;
        padding: 14px;
        align-items: flex-start;
        border-radius: 17px;
        box-sizing: border-box;
        text-align: left;
    }

    .kontaktanfragen-page .contact-request-main {
        min-width: 0;
        flex: 1 1 auto;
    }

    .kontaktanfragen-page .contact-request-title-row {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 7px;
    }

    .kontaktanfragen-page .contact-request-title-row h3 {
        min-width: 0;
        margin: 0;
        font-size: 16px;
        overflow-wrap: anywhere;
    }

    .kontaktanfragen-page .contact-request-subject {
        margin-top: 8px;
        font-size: 14px;
        font-weight: 700;
        overflow-wrap: anywhere;
    }

    .kontaktanfragen-page .contact-request-preview {
        margin-top: 5px;
        font-size: 13px;
        line-height: 1.4;
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        line-clamp: 2;
        -webkit-line-clamp: 2;
    }

    .kontaktanfragen-page .contact-request-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 5px
            10px;
        margin-top: 10px;
        font-size: 11px;
    }

    .kontaktanfragen-page .contact-request-arrow {
        flex: 0 0 auto;
        margin-top: 3px;
    }

    /*
     * =====================================================
     * KONTAKT-DIALOG
     * =====================================================
     */

    .kontaktanfragen-page .contact-admin-modal {
        padding: 0;
    }

    .kontaktanfragen-page .contact-admin-dialog {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        height: min(92dvh, 900px);
        max-height: 92dvh;
        margin: 0;
        display: flex;
        flex-direction: column;
        border-radius: 22px
            22px
            0
            0;
        overflow: hidden;
        box-sizing: border-box;
    }

    .kontaktanfragen-page .contact-dialog-header {
        flex: 0 0 auto;
        padding: 15px
            15px
            12px;
        gap: 10px;
    }

    .kontaktanfragen-page .contact-dialog-person {
        min-width: 0;
    }

    .kontaktanfragen-page .contact-dialog-person h2 {
        margin: 0;
        font-size: 19px;
        overflow-wrap: anywhere;
    }

    .kontaktanfragen-page .contact-dialog-person span {
        font-size: 11px;
    }

    .kontaktanfragen-page .contact-dialog-close {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
    }

    /* Desktop 2-Spalten-Layout -> mobil untereinander */

    .kontaktanfragen-page .contact-dialog-layout {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /*
     * =====================================================
     * CHAT
     * =====================================================
     */

    .kontaktanfragen-page .contact-chat-area {
        min-width: 0;
        min-height: 520px;
        display: flex;
        flex-direction: column;
    }

    .kontaktanfragen-page .contact-chat-subject {
        padding: 13px
            14px;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
    }

    .kontaktanfragen-page .contact-chat-subject h3 {
        margin-top: 4px;
        font-size: 16px;
        overflow-wrap: anywhere;
    }

    .kontaktanfragen-page .contact-chat-messages {
        flex: 1 1 auto;
        min-height: 300px;
        max-height: 50dvh;
        padding: 14px
            11px;
        overflow-y: auto;
    }

    .kontaktanfragen-page .contact-chat-bubble {
        max-width: 86%;
        padding: 9px
            11px;
        border-radius: 15px;
    }

    .kontaktanfragen-page .contact-chat-text {
        font-size: 13px;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    .kontaktanfragen-page .contact-chat-compose {
        position: sticky;
        bottom: 0;
        z-index: 2;
        display: grid;
        grid-template-columns: minmax(0, 1fr)
            44px;
        align-items: end;
        gap: 8px;
        padding: 10px
            11px
            calc(
                10px
                + env(safe-area-inset-bottom)
            );
    }

    .kontaktanfragen-page .contact-chat-compose textarea {
        width: 100%;
        min-height: 44px;
        max-height: 120px;
        font-size: 16px;
    }

    .kontaktanfragen-page .contact-chat-send {
        width: 44px;
        height: 44px;
        padding: 0;
    }

    /*
     * =====================================================
     * VERWALTUNG IM KONTAKTDIALOG
     * =====================================================
     */

    .kontaktanfragen-page .contact-admin-details {
        width: 100%;
        min-width: 0;
        padding: 15px;
        box-sizing: border-box;
    }

    .kontaktanfragen-page .contact-detail-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .kontaktanfragen-page .contact-detail-list > div {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .kontaktanfragen-page .contact-field select, .kontaktanfragen-page .contact-field textarea {
        width: 100%;
    }

    .kontaktanfragen-page .contact-settings-submit {
        width: 100%;
        min-height: 46px;
    }

    /*
     * =========================================================
     * ACCOUNTS
     * =========================================================
     */

    /*
     * -----------------------------------------------------
     * NEUEN ACCOUNT ANLEGEN
     * -----------------------------------------------------
     */

    .accounts-page .portal-artikel-form {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .accounts-page .portal-artikel-form input, .accounts-page .portal-artikel-form select, .accounts-page .portal-artikel-form .btn {
        width: 100%;
        min-height: 46px;
        box-sizing: border-box;
    }

    /*
     * =====================================================
     * ACCOUNT-KARTEN
     * =====================================================
     */

    .accounts-page .auszahlung-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .accounts-page .auszahlung-card {
        width: 100%;
        min-width: 0;
        padding: 15px;
        border-radius: 18px;
        box-sizing: border-box;
    }

    .accounts-page .auszahlung-card-top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 15px;
    }

    .accounts-page .auszahlung-card-top h3 {
        margin: 0;
        font-size: 18px;
        overflow-wrap: anywhere;
    }

    .accounts-page .auszahlung-card-top p {
        margin: 4px
            0
            0;
    }

    .accounts-page .auszahlung-card form {
        width: 100%;
    }

    .accounts-page .auszahlung-card form select {
        width: 100%;
        min-height: 44px;
        margin-top: 6px;
    }

    .accounts-page .account-actions {
        display: flex;
        width: 100%;
    }

    .accounts-page .account-actions .btn {
        width: 100%;
    }

    .accounts-page .account-bottom-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr)
            minmax(0, 1fr);
        gap: 9px;
        width: 100%;
    }

    .accounts-page .account-bottom-actions form, .accounts-page .account-bottom-actions .btn {
        width: 100%;
        box-sizing: border-box;
    }

    /*
     * =====================================================
     * ACCOUNT BEARBEITEN MODAL
     * =====================================================
     */

    .accounts-page .vermisst-modal {
        align-items: flex-end;
        padding: 10px;
    }

    .accounts-page .account-edit-modal-dialog {
        width: 100%;
        max-width: none;
        max-height: calc(
                100dvh
                - 20px
            );
        padding: 19px
            15px;
        border-radius: 22px
            22px
            12px
            12px;
    }

    .accounts-page .account-edit-modal-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .accounts-page .account-edit-modal-grid input {
        width: 100%;
    }

    .accounts-page .vermisst-modal-actions {
        display: flex;
        flex-direction: column-reverse;
        gap: 9px;
    }

    .accounts-page .vermisst-modal-actions .btn {
        width: 100%;
    }

    /*
     * =========================================================
     * EINSTELLUNGEN
     * =========================================================
     */

    /*
     * -----------------------------------------------------
     * HERO
     * -----------------------------------------------------
     */

    .einstellungen-page .admin-hero {
        margin-bottom: 14px;
    }

    /*
     * =====================================================
     * SECTION HEADER
     * =====================================================
     */

    .einstellungen-page .settings-section-title {
        min-width: 0;
        gap: 9px;
    }

    .einstellungen-page .settings-section-title h2 {
        font-size: 19px;
        overflow-wrap: anywhere;
    }

    .einstellungen-page .settings-section-header, .einstellungen-page .settings-section-header-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .einstellungen-page .settings-section-header > .btn, .einstellungen-page .settings-section-header-actions > .btn {
        width: 100%;
        box-sizing: border-box;
    }

    /*
     * =====================================================
     * ZEITLICHER ABLAUF
     * =====================================================
     */

    .einstellungen-page .settings-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .einstellungen-page .setting-item {
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .einstellungen-page .setting-item > input, .einstellungen-page .setting-item > select {
        width: 100%;
        min-height: 44px;
    }

    .einstellungen-page .time-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr)
            auto
            minmax(0, 1fr);
        align-items: center;
        gap: 7px;
        width: 100%;
    }

    .einstellungen-page .time-row input {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /*
     * =====================================================
     * STEUERUNG
     * =====================================================
     */

    .einstellungen-page .steuerungs-balken {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 12px
            10px;
    }

    .einstellungen-page .steuerungs-info {
        min-width: 0;
        flex: 1 1 auto;
    }

    .einstellungen-page .steuerungs-info h3 {
        font-size: 14px;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .einstellungen-page .steuerungs-icon {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
    }

    .einstellungen-page .steuerungs-schalter {
        flex: 0 0 auto;
    }

    /*
     * =====================================================
     * SAVE
     * =====================================================
     */

    .einstellungen-page .save-panel .save-button {
        width: 100%;
        min-height: 48px;
    }

    /*
     * =====================================================
     * VERANSTALTUNGSAUSWERTUNG
     * =====================================================
     */

    .einstellungen-page .settings-section-header .save-button {
        width: 100%;
    }

    /*
     * =====================================================
     * WOHNORT-STATISTIK
     * =====================================================
     */

    .einstellungen-page .wohnort-statistik-layout {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    .einstellungen-page .wohnort-chart-container {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .einstellungen-page .wohnort-donut {
        width: min(230px, 70vw);
        height: min(230px, 70vw);
        flex: 0 0 auto;
    }

    .einstellungen-page .wohnort-statistik-liste {
        width: 100%;
    }

    /*
     * =====================================================
     * WOHNORTE VERWALTEN
     * =====================================================
     */

    .einstellungen-page .wohnort-verwaltung-layout {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .einstellungen-page .wohnort-pruefen-box, .einstellungen-page .wohnort-hinzufuegen-box {
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .einstellungen-page .wohnort-suche-zeile {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .einstellungen-page .wohnort-suche-zeile input, .einstellungen-page .wohnort-suche-zeile button {
        width: 100%;
        min-height: 44px;
    }

    .einstellungen-page .wohnort-form-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .einstellungen-page .wohnort-form-field input {
        width: 100%;
    }

    .einstellungen-page .wohnort-hinzufuegen-form > .btn {
        width: 100%;
        margin-top: 10px;
    }

    /*
     * =====================================================
     * ANKÜNDIGUNGEN
     * =====================================================
     */

    .einstellungen-page .announcement-create-card {
        padding: 14px;
        border-radius: 17px;
    }

    .einstellungen-page .announcement-form {
        width: 100%;
    }

    .einstellungen-page .announcement-field input, .einstellungen-page .announcement-field textarea, .einstellungen-page .announcement-field select {
        width: 100%;
        box-sizing: border-box;
    }

    .einstellungen-page .announcement-options-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .einstellungen-page .announcement-form-actions, .einstellungen-page .announcement-edit-actions {
        width: 100%;
    }

    .einstellungen-page .announcement-form-actions .btn, .einstellungen-page .announcement-edit-actions .btn {
        width: 100%;
    }

    .einstellungen-page .announcement-list-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
    }

    .einstellungen-page .announcement-card {
        padding: 14px;
        border-radius: 17px;
    }

    .einstellungen-page .announcement-card-header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 13px;
    }

    .einstellungen-page .announcement-card-title {
        min-width: 0;
        align-items: flex-start;
    }

    .einstellungen-page .announcement-card-heading {
        min-width: 0;
    }

    .einstellungen-page .announcement-title-line {
        flex-wrap: wrap;
        gap: 7px;
    }

    .einstellungen-page .announcement-title-line h4, .einstellungen-page .announcement-card-text {
        overflow-wrap: anywhere;
    }

    .einstellungen-page .announcement-card-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        width: 100%;
    }

    .einstellungen-page .announcement-card-actions form, .einstellungen-page .announcement-card-actions .btn {
        width: 100%;
        box-sizing: border-box;
    }

    /*
     * =====================================================
     * BACKUP
     * =====================================================
     */

    .einstellungen-page .backup-layout {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .einstellungen-page .backup-actions-column {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .einstellungen-page .backup-compact-card, .einstellungen-page .backup-auto-panel {
        width: 100%;
        min-width: 0;
        padding: 14px;
        box-sizing: border-box;
        border-radius: 17px;
    }

    .einstellungen-page .backup-compact-restore-form {
        display: flex;
        flex-direction: column;
        gap: 9px;
    }

    .einstellungen-page .backup-compact-restore-form input[type="file"] {
        width: 100%;
    }

    .einstellungen-page .backup-full-button {
        width: 100%;
        box-sizing: border-box;
    }

    .einstellungen-page .backup-auto-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 8px;
    }

    .einstellungen-page .backup-settings-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .einstellungen-page .backup-field select {
        width: 100%;
        min-height: 44px;
    }

    .einstellungen-page .backup-info-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr)
            minmax(0, 1fr);
        gap: 8px;
    }

    .einstellungen-page .backup-info-item {
        min-width: 0;
        padding: 10px;
        box-sizing: border-box;
    }

    .einstellungen-page .backup-info-item strong {
        overflow-wrap: anywhere;
    }

    .einstellungen-page .backup-auto-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .einstellungen-page .backup-auto-actions .btn {
        width: 100%;
        box-sizing: border-box;
    }

    /*
     * =====================================================
     * DRUCKSYSTEM
     * =====================================================
     */

    .einstellungen-page .settings-section-header-actions {
        align-items: stretch;
    }

    .einstellungen-page .druckclient-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .einstellungen-page .druckclient-card {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .einstellungen-page .druckclient-card p {
        overflow-wrap: anywhere;
    }

    .einstellungen-page .druckclient-card .account-bottom-actions {
        display: block;
    }

    .einstellungen-page .druckclient-card .account-bottom-actions form, .einstellungen-page .druckclient-card .account-bottom-actions .btn {
        width: 100%;
    }

    /*
     * =====================================================
     * FREIES ETIKETT
     * =====================================================
     */

    .einstellungen-page .free-label-form {
        width: 100%;
    }

    .einstellungen-page .free-label-field select, .einstellungen-page .free-label-field textarea {
        width: 100%;
        box-sizing: border-box;
    }

    .einstellungen-page .free-label-submit {
        width: 100%;
        min-height: 46px;
    }

    /*
     * =====================================================
     * RESET
     * =====================================================
     */

    .einstellungen-page .reset-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .einstellungen-page .reset-card {
        width: 100%;
        min-width: 0;
        padding: 15px;
        box-sizing: border-box;
        border-radius: 17px;
    }

    .einstellungen-page .reset-card form {
        width: 100%;
    }

    .einstellungen-page .reset-card input {
        width: 100%;
        min-height: 44px;
        box-sizing: border-box;
    }

    .einstellungen-page .reset-button {
        width: 100%;
        min-height: 46px;
        margin-top: 10px;
    }
}

/*
 * =========================================================
 * SEHR KLEINE HANDYS
 * =========================================================
 */

@media (max-width: 390px) {
    .accounts-page .account-bottom-actions {
        grid-template-columns: 1fr;
    }

    .einstellungen-page .backup-info-grid {
        grid-template-columns: 1fr;
    }

    .einstellungen-page .time-row {
        grid-template-columns: 1fr;
    }

    .einstellungen-page .time-row > span {
        text-align: center;
    }
}

/*
 * =========================================================
 * KATEGORIEN & FARBEN – MOBILE
 * Desktop bleibt unverändert
 * =========================================================
 */

.kategorien-mobile-list, .farben-mobile-list {
    display: none;
}

@media (max-width: 900px) {
    /*
     * =====================================================
     * FORMULARE
     * =====================================================
     */

    .kategorien-page .dashboard-panel > form {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 9px;
    }

    .kategorien-page .dashboard-panel > form > input, .kategorien-page .dashboard-panel > form > .btn {
        width: 100%;
        min-height: 46px;
        box-sizing: border-box;
    }

    /*
     * =====================================================
     * DESKTOP-TABELLEN AUS
     * =====================================================
     */

    .kategorien-page .kategorien-desktop-list, .kategorien-page .farben-desktop-list {
        display: none !important;
    }

    /*
     * =====================================================
     * MOBILE-LISTEN
     * =====================================================
     */

    .kategorien-page .kategorien-mobile-list, .kategorien-page .farben-mobile-list {
        display: flex;
        flex-direction: column;
        gap: 11px;
        margin-top: 14px;
    }

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

    .kategorien-page .kategorien-mobile-card, .kategorien-page .farben-mobile-card {
        width: 100%;
        padding: 14px;
        border: 1px solid #d7e0ea;
        border-radius: 18px;
        background: #ffffff;
        box-sizing: border-box;
        box-shadow: 0 2px 7px
            rgba(
                15,
                23,
                42,
                0.03
            );
    }

    .kategorien-page .kategorien-mobile-card-header, .kategorien-page .farben-mobile-card-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 15px;
    }

    .kategorien-page .kategorien-mobile-card-header h3, .kategorien-page .farben-mobile-card-header h3 {
        min-width: 0;
        margin: 0;
        color: #0f172a;
        font-size: 17px;
        font-weight: 800;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    /*
     * =====================================================
     * AKTIONEN
     * =====================================================
     */

    .kategorien-page .kategorien-mobile-actions, .kategorien-page .farben-mobile-actions {
        display: grid;
        grid-template-columns: repeat(
                2,
                minmax(0, 1fr)
            );
        gap: 9px;
    }

    .kategorien-page .kategorien-mobile-actions form, .kategorien-page .farben-mobile-actions form {
        width: 100%;
        margin: 0;
    }

    .kategorien-page .kategorien-mobile-action, .kategorien-page .farben-mobile-action {
        width: 100%;
        min-height: 62px;
        padding: 8px
            5px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        border: 1px solid #cad6e4;
        border-radius: 14px;
        background: #e8eef5;
        color: #0f172a;
        font: inherit;
        font-size: 11px;
        font-weight: 650;
        line-height: 1.1;
        text-align: center;
        cursor: pointer;
        box-sizing: border-box;
        appearance: none;
        -webkit-appearance: none;
    }

    .kategorien-page .kategorien-mobile-action .material-symbols-rounded, .kategorien-page .farben-mobile-action .material-symbols-rounded {
        font-size: 24px;
    }

    .kategorien-page .kategorien-mobile-delete, .kategorien-page .farben-mobile-delete {
        color: #991b1b;
    }

    /*
     * =====================================================
     * PANELS
     * =====================================================
     */

    .kategorien-page .dashboard-panel {
        padding: 16px 14px;
        border-radius: 18px;
    }

    /*
     * =====================================================
     * DARK MODE
     * =====================================================
     */

    body.dark-mode.kategorien-page .kategorien-mobile-card, body.dark-mode.kategorien-page .farben-mobile-card {
        border-color: rgba(
                255,
                255,
                255,
                0.09
            );
        background: #18212c;
        box-shadow: none;
    }

    body.dark-mode.kategorien-page .kategorien-mobile-card-header h3, body.dark-mode.kategorien-page .farben-mobile-card-header h3 {
        color: #edf3fa;
    }

    body.dark-mode.kategorien-page .kategorien-mobile-action, body.dark-mode.kategorien-page .farben-mobile-action {
        border-color: #3a485b;
        background: #293646;
        color: #edf3fa;
    }

    body.dark-mode.kategorien-page .kategorien-mobile-delete, body.dark-mode.kategorien-page .farben-mobile-delete {
        color: #ffabab;
    }
}

/*
 * =========================================================
 * MOBILE – KOMPAKTE AKTIONSBUTTONS
 * Für Einlieferer / Artikel / ähnliche Karten
 * =========================================================
 */

@media (max-width: 900px) {
    /*
     * =====================================================
     * EINLIEFERER
     * =====================================================
     */

    .mobile-person-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        margin-top: 14px;
    }

    .mobile-person-actions form {
        width: 100%;
        margin: 0;
        padding: 0;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .mobile-person-action {
        width: 100%;
        min-height: 48px !important;
        padding: 6px
            4px !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        border: 1px solid
            #cad6e4 !important;
        border-radius: 12px !important;
        background: #e8eef5 !important;
        color: #0f172a;
        font-size: 10px !important;
        font-weight: 600;
        line-height: 1.05;
        text-align: center;
        box-shadow: none !important;
        box-sizing: border-box;
    }

    .mobile-person-action .material-symbols-rounded {
        font-size: 20px !important;
    }

    /* Löschen ohne zweiten äußeren Kasten */

    .mobile-person-actions form:has(.mobile-person-delete) {
        background: transparent !important;
        border: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    .mobile-person-delete {
        color: #991b1b;
    }

    /*
     * =====================================================
     * ANNAHME – ARTIKELKARTEN
     * =====================================================
     */

    .annahme-mobile-artikel-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        margin-top: 14px;
    }

    .annahme-mobile-artikel-actions form {
        width: 100%;
        margin: 0;
        padding: 0;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .annahme-mobile-artikel-action {
        min-height: 48px !important;
        padding: 6px
            4px !important;
        gap: 3px;
        border-radius: 12px !important;
        font-size: 10px !important;
        line-height: 1.05;
    }

    .annahme-mobile-artikel-action .material-symbols-rounded {
        font-size: 20px !important;
    }

    /*
     * =====================================================
     * KATEGORIEN / FARBEN
     * =====================================================
     */

    .kategorien-mobile-actions, .farben-mobile-actions {
        gap: 7px;
    }

    .kategorien-mobile-actions form, .farben-mobile-actions form {
        margin: 0;
        padding: 0;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .kategorien-mobile-action, .farben-mobile-action {
        min-height: 48px !important;
        padding: 6px
            4px !important;
        gap: 3px;
        border-radius: 12px !important;
        font-size: 10px !important;
    }

    .kategorien-mobile-action .material-symbols-rounded, .farben-mobile-action .material-symbols-rounded {
        font-size: 20px !important;
    }

    /*
     * =====================================================
     * DARK MODE
     * =====================================================
     */

    body.dark-mode .mobile-person-action, body.dark-mode .annahme-mobile-artikel-action, body.dark-mode .kategorien-mobile-action, body.dark-mode .farben-mobile-action {
        background: #293646 !important;
        border-color: #3a485b !important;
        color: #edf3fa;
    }
}

/*
 * =========================================================
 * EINLIEFERER – SPEICHERN MOBILE VOLLE BREITE
 * =========================================================
 */

@media (max-width: 900px) {
    .einlieferer-page .einlieferer-form button[type="submit"] {
        width: 100% !important;
        min-height: 46px;
        box-sizing: border-box;
    }
}

/*
 * =========================================================
 * ANNAHME PERSON – 5 AKTIONEN IN EINER REIHE
 * =========================================================
 */

@media (max-width: 900px) {
    .annahme-mobile-artikel-actions {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 5px !important;
        width: 100% !important;
        margin-top: 12px !important;
    }

    .annahme-mobile-artikel-actions > form {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .annahme-mobile-artikel-actions > .annahme-mobile-artikel-action, .annahme-mobile-artikel-actions > form > .annahme-mobile-artikel-action {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 44px !important;
        padding: 5px 1px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
        border-radius: 10px !important;
        font-size: 8px !important;
        font-weight: 600 !important;
        line-height: 1 !important;
        box-sizing: border-box !important;
    }

    .annahme-mobile-artikel-actions .annahme-mobile-artikel-action .material-symbols-rounded {
        font-size: 18px !important;
        line-height: 1 !important;
    }
}

/*
 * =========================================================
 * EINLIEFERER – SPEICHERN MOBILE VOLLE BREITE
 * =========================================================
 */

@media (max-width: 900px) {
    .einlieferer-speichern-wrap {
        width: 100% !important;
        display: block !important;
        margin-top: 12px !important;
    }

    .einlieferer-speichern-icon {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 46px !important;
        height: auto !important;
        padding: 10px 14px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
    }

    .einlieferer-speichern-icon .material-symbols-rounded {
        font-size: 22px !important;
    }
}

/*
 * =========================================================
 * AUSZAHLUNG – MOBILE FINAL
 * Desktop bleibt unverändert
 * =========================================================
 */

.auszahlung-mobile-only {
    display: none;
}

/*
 * =========================================================
 * MODAL BASIS
 * =========================================================
 */

.vermisst-modal[hidden] {
    display: none !important;
}

.vermisst-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.vermisst-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(
            15,
            23,
            42,
            0.58
        );
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.vermisst-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(
            560px,
            100%
        );
    max-height: calc(
            100vh
            - 48px
        );
    overflow-y: auto;
    padding: 28px;
    border: 1px solid
        var(
            --border-color,
            #dbe3ef
        );
    border-radius: 22px;
    background: var(
            --card-bg,
            #ffffff
        );
    color: var(
            --text-color,
            #0f172a
        );
    box-shadow: 0 24px 70px
        rgba(
            15,
            23,
            42,
            0.28
        );
    box-sizing: border-box;
}

.vermisst-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.vermisst-modal-header h2 {
    margin: 0
        0
        6px;
}

.vermisst-modal-header p {
    margin: 0;
    color: var(
            --text-muted,
            #64748b
        );
}

.vermisst-modal-close {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid
        var(
            --border-color,
            #dbe3ef
        );
    border-radius: 12px;
    background: var(
            --card-bg,
            #ffffff
        );
    color: inherit;
    cursor: pointer;
}

.vermisst-modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vermisst-modal-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vermisst-modal-form label {
    font-weight: 700;
}

.vermisst-modal-form select, .vermisst-modal-form textarea {
    width: 100%;
    padding: 12px
        14px;
    border: 1px solid
        var(
            --border-color,
            #cbd5e1
        );
    border-radius: 12px;
    background: var(
            --input-bg,
            #ffffff
        );
    color: inherit;
    font: inherit;
    box-sizing: border-box;
}

.vermisst-modal-form textarea {
    min-height: 130px;
    resize: vertical;
}

.vermisst-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 4px;
}

.vermisst-modal-open {
    overflow: hidden;
}

/*
 * =========================================================
 * MOBILE
 * =========================================================
 */

@media (max-width: 900px) {
    /*
     * =====================================================
     * DESKTOP / MOBILE
     * =====================================================
     */

    .auszahlung-page .auszahlung-desktop-only {
        display: none !important;
    }

    .auszahlung-page .auszahlung-mobile-only {
        display: block !important;
    }

    /*
     * =====================================================
     * PANELS
     * =====================================================
     */

    .auszahlung-page .dashboard-panel {
        min-width: 0;
        padding: 16px
            14px;
        border-radius: 18px;
        box-sizing: border-box;
    }

    /*
     * =====================================================
     * SUCHE
     * =====================================================
     */

    .auszahlung-page .auszahlung-search-form {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 9px;
    }

    .auszahlung-page .auszahlung-search-form .einlieferer-search-field {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .auszahlung-page .auszahlung-search-form > .btn {
        width: 100%;
        min-height: 46px;
        box-sizing: border-box;
    }

    /*
     * =====================================================
     * SCANNER
     * =====================================================
     */

    .auszahlung-page .scanner-form-modern {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 9px;
    }

    .auszahlung-page .scanner-field-modern {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .auszahlung-page .scanner-field-modern input {
        min-width: 0;
    }

    .auszahlung-page .scanner-form-modern > .btn {
        width: 100%;
        min-height: 46px;
    }

    /*
     * =====================================================
     * PERSONENKOPF
     * =====================================================
     */

    .auszahlung-page .payout-header h2 {
        margin-bottom: 5px;
        font-size: 21px;
    }

    .auszahlung-page .payout-header p {
        margin: 0;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .auszahlung-page .payout-done {
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    /*
     * =====================================================
     * PROZESSKARTEN
     * =====================================================
     */

    .auszahlung-page .auszahlung-process-card {
        padding: 16px
            14px;
    }

    .auszahlung-page .auszahlung-process-title > div {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .auszahlung-page .auszahlung-process-title h2 {
        margin: 0;
        font-size: 20px;
    }

    .auszahlung-page .abholung-counter {
        margin-top: 17px;
    }

    .auszahlung-page .progress-bar {
        width: 100%;
    }

    /*
     * =====================================================
     * GELD
     * =====================================================
     */

    .auszahlung-page .auszahlung-money-list {
        width: 100%;
        margin-top: 13px;
    }

    .auszahlung-page .auszahlung-money-list > div {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 15px;
        padding: 12px
            0;
        box-sizing: border-box;
    }

    .auszahlung-page .auszahlung-money-list strong {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .auszahlung-page .auszahlung-money-total {
        padding-top: 15px !important;
    }

    .auszahlung-page .auszahlung-money-total strong {
        font-size: 21px;
    }

    /*
     * =====================================================
     * AUSZAHLUNGS-AKTIONEN
     * =====================================================
     */

    .auszahlung-page .auszahlung-card-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 16px;
    }

    .auszahlung-page .auszahlung-card-actions > a, .auszahlung-page .auszahlung-card-actions > form, .auszahlung-page .auszahlung-card-actions > form > button {
        width: 100%;
        box-sizing: border-box;
    }

    .auszahlung-page .auszahlung-card-actions .btn {
        min-height: 46px;
    }

    /*
     * =====================================================
     * SECTION HEADER
     * =====================================================
     */

    .auszahlung-page .auszahlung-table-heading {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 14px;
    }

    .auszahlung-page .auszahlung-table-heading h2 {
        min-width: 0;
        margin: 0;
        font-size: 20px;
        line-height: 1.25;
    }

    .auszahlung-page .artikel-person-count {
        flex: 0 0 auto;
    }

    /*
     * =====================================================
     * ARTIKELLISTE
     * =====================================================
     */

    .auszahlung-page .auszahlung-mobile-artikel-list, .auszahlung-page .auszahlung-mobile-person-list {
        display: flex;
        flex-direction: column;
        gap: 11px;
    }

    /*
     * =====================================================
     * ARTIKELKARTE
     * =====================================================
     */

    .auszahlung-page .auszahlung-mobile-artikel-card {
        width: 100%;
        min-width: 0;
        padding: 14px;
        border: 1px solid
            #d7e0ea;
        border-radius: 18px;
        background: #ffffff;
        box-sizing: border-box;
        box-shadow: 0 2px 7px
            rgba(
                15,
                23,
                42,
                0.03
            );
    }

    .auszahlung-page .auszahlung-mobile-artikel-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 9px;
        margin-bottom: 15px;
    }

    .auszahlung-page .auszahlung-mobile-artikel-header h3 {
        min-width: 0;
        margin: 0;
        color: #0f172a;
        font-size: 17px;
        font-weight: 800;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    /*
     * =====================================================
     * GRID
     * =====================================================
     */

    .auszahlung-page .auszahlung-mobile-grid, .auszahlung-page .auszahlung-mobile-person-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr)
            minmax(0, 1fr);
        gap: 13px
            16px;
    }

    .auszahlung-page .auszahlung-mobile-field {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

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

    .auszahlung-page .auszahlung-mobile-field > span {
        color: #64748b;
        font-size: 9px;
        font-weight: 600;
        line-height: 1.1;
        text-transform: uppercase;
        letter-spacing: 0.035em;
    }

    .auszahlung-page .auszahlung-mobile-field > strong {
        min-width: 0;
        color: #0f172a;
        font-size: 14px;
        font-weight: 650;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .auszahlung-page .auszahlung-mobile-money {
        font-size: 16px !important;
        font-weight: 800 !important;
    }

    /*
     * =====================================================
     * ARTIKELAKTION
     * =====================================================
     */

    .auszahlung-page .auszahlung-mobile-artikel-actions {
        margin-top: 14px;
    }

    .auszahlung-page .auszahlung-mobile-artikel-actions form {
        width: 100%;
        margin: 0;
        padding: 0;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .auszahlung-page .auszahlung-mobile-action {
        width: 100%;
        min-height: 45px;
        padding: 7px
            10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        border: 1px solid
            #cad6e4;
        border-radius: 12px;
        background: #e8eef5;
        color: #0f172a;
        font: inherit;
        font-size: 11px;
        font-weight: 650;
        line-height: 1.1;
        text-align: center;
        cursor: pointer;
        box-sizing: border-box;
        appearance: none;
        -webkit-appearance: none;
    }

    .auszahlung-page .auszahlung-mobile-action .material-symbols-rounded {
        font-size: 20px;
    }

    /*
     * =====================================================
     * PERSONENKARTEN
     * =====================================================
     */

    .auszahlung-page .auszahlung-mobile-person-card {
        width: 100%;
        min-width: 0;
        padding: 14px;
        display: block;
        border: 1px solid
            #d7e0ea;
        border-radius: 18px;
        background: #ffffff;
        color: #0f172a;
        text-decoration: none;
        box-sizing: border-box;
        box-shadow: 0 2px 7px
            rgba(
                15,
                23,
                42,
                0.03
            );
        -webkit-tap-highlight-color: transparent;
    }

    .auszahlung-page .auszahlung-mobile-person-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 15px;
    }

    .auszahlung-page .auszahlung-mobile-person-header > div {
        min-width: 0;
        flex: 1 1 auto;
    }

    .auszahlung-page .auszahlung-mobile-person-header h3 {
        min-width: 0;
        margin: 0;
        color: #0f172a;
        font-size: 17px;
        font-weight: 800;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .auszahlung-page .auszahlung-mobile-person-header > div > span {
        display: block;
        margin-top: 4px;
        color: #64748b;
        font-size: 11px;
    }

    .auszahlung-page .auszahlung-mobile-chevron {
        flex: 0 0 auto;
        color: #64748b;
        font-size: 24px;
    }

    .auszahlung-page .auszahlung-mobile-person-open {
        width: 100%;
        min-height: 38px;
        margin-top: 14px;
        padding-top: 10px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 3px;
        border-top: 1px solid
            #e2e8f0;
        color: #17345d;
        font-size: 12px;
        font-weight: 700;
    }

    .auszahlung-page .auszahlung-mobile-person-open .material-symbols-rounded {
        font-size: 20px;
    }

    /*
     * =====================================================
     * ALLE ABRECHNUNGEN
     * =====================================================
     */

    .auszahlung-page .auszahlung-main-list-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .auszahlung-page .auszahlung-download-all {
        width: 100%;
        min-height: 45px;
        box-sizing: border-box;
    }

    /*
     * =====================================================
     * PAGINATION
     * =====================================================
     */

    .auszahlung-page .backup-pagination {
        margin-top: 17px;
    }

    .auszahlung-page .backup-pagination-info {
        text-align: center;
    }

    .auszahlung-page .backup-pagination-nav {
        justify-content: center;
        flex-wrap: wrap;
        gap: 5px;
    }

    /*
     * =====================================================
     * VERMISST MODAL
     * =====================================================
     */

    .auszahlung-page .vermisst-modal {
        align-items: flex-end;
        padding: 10px;
    }

    .auszahlung-page .vermisst-modal-dialog {
        width: 100%;
        max-width: none;
        max-height: calc(
                100dvh
                - 20px
            );
        padding: 19px
            15px
            calc(
                16px
                + env(safe-area-inset-bottom)
            );
        border-radius: 22px
            22px
            12px
            12px;
    }

    .auszahlung-page .vermisst-modal-header {
        gap: 10px;
        margin-bottom: 18px;
    }

    .auszahlung-page .vermisst-modal-header h2 {
        font-size: 20px;
    }

    .auszahlung-page .vermisst-modal-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .auszahlung-page .vermisst-modal-actions .btn {
        width: 100%;
        min-height: 46px;
    }

    /*
     * =====================================================
     * DARK MODE
     * =====================================================
     */

    body.dark-mode.auszahlung-page .auszahlung-mobile-artikel-card, body.dark-mode.auszahlung-page .auszahlung-mobile-person-card {
        border-color: rgba(
                255,
                255,
                255,
                0.09
            );
        background: #18212c;
        color: #edf3fa;
        box-shadow: none;
    }

    body.dark-mode.auszahlung-page .auszahlung-mobile-artikel-header h3, body.dark-mode.auszahlung-page .auszahlung-mobile-person-header h3, body.dark-mode.auszahlung-page .auszahlung-mobile-field > strong {
        color: #edf3fa;
    }

    body.dark-mode.auszahlung-page .auszahlung-mobile-field > span, body.dark-mode.auszahlung-page .auszahlung-mobile-person-header > div > span, body.dark-mode.auszahlung-page .auszahlung-mobile-chevron {
        color: #93a3b7;
    }

    body.dark-mode.auszahlung-page .auszahlung-mobile-action {
        border-color: #3a485b;
        background: #293646;
        color: #edf3fa;
    }

    body.dark-mode.auszahlung-page .auszahlung-mobile-person-open {
        border-top-color: rgba(
                255,
                255,
                255,
                0.08
            );
        color: #b9d0ef;
    }
}

/*
 * =========================================================
 * SEHR KLEINE HANDYS
 * =========================================================
 */

@media (max-width: 390px) {
    .auszahlung-page .auszahlung-mobile-grid, .auszahlung-page .auszahlung-mobile-person-grid {
        gap: 12px
            10px;
    }
}

/* =========================================================
   Umbruch
========================================================= */

/* =========================================================
   AUSZAHLUNG – MOBILE SUCHE FINAL
========================================================= */

.auszahlung-search-mobile-button {
    display: none;
}


@media (max-width: 900px) {

    /*
     * Die drei Elemente liegen direkt im Grid:
     *
     * Suchfeld | Suche | Reset
     */

    body.auszahlung-page
    .auszahlung-search-panel
    form.auszahlung-search-form {

        display: grid !important;

        grid-template-columns:
            minmax(0, 1fr)
            46px
            46px !important;

        align-items: center !important;

        gap: 7px !important;

        width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }


    /*
     * Suchfeld
     */

    body.auszahlung-page
    .auszahlung-search-panel
    .auszahlung-search-form
    .einlieferer-search-field {

        grid-column: 1 !important;

        width: 100% !important;
        min-width: 0 !important;

        margin: 0 !important;
    }


    body.auszahlung-page
    .auszahlung-search-panel
    .auszahlung-search-form
    .einlieferer-search-field input {

        width: 100% !important;
        min-width: 0 !important;

        margin: 0 !important;
    }


    /*
     * Desktop-Buttons weg
     */

    body.auszahlung-page
    .auszahlung-search-desktop {

        display: none !important;
    }


    /*
     * Mobile Buttons
     */

    body.auszahlung-page
    .auszahlung-search-mobile-button {

        display: inline-flex !important;

        width: 46px !important;
        min-width: 46px !important;

        height: 46px !important;
        min-height: 46px !important;

        padding: 0 !important;
        margin: 0 !important;

        align-items: center;
        justify-content: center;

        border: 1px solid #cad6e4 !important;
        border-radius: 13px !important;

        background: #e8eef5 !important;
        color: #17345d !important;

        text-decoration: none;

        box-sizing: border-box;

        appearance: none;
        -webkit-appearance: none;
    }


    body.auszahlung-page
    .auszahlung-search-mobile-button
    .material-symbols-rounded {

        font-size: 22px !important;
    }

}
/* =========================================================
   PORTAL – ARTIKEL
   Aus portal_artikel.html ausgelagert
========================================================= */

.portal-artikel-mobile-list {
            display: none;
        }

        @media (max-width: 1100px) {
            .portal-artikel-speichern-wrap {
                width: 100%;
                grid-column: 1 / -1;
            }

            .portal-artikel-speichern-icon {
                width: 100%;
                min-height: 52px;
                border-radius: 14px;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                gap: 10px;
                font-weight: 700;
            }

            .portal-artikel-speichern-icon::after {
                content: "Artikel hinzufügen";
                font-size: 1rem;
            }

            .portal-artikel-speichern-icon .material-symbols-rounded {
                font-size: 26px;
            }

            .portal-artikel-table-desktop {
                display: none;
            }

            .portal-artikel-mobile-list {
                display: grid;
                gap: 12px;
            }

            .portal-artikel-mobile-card {
                overflow: hidden;
                border: 1px solid var(--border, #d8e0eb);
                border-radius: 16px;
                background: var(--card-bg, #ffffff);
                box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
            }

            .portal-artikel-mobile-content {
                padding: 14px;
            }

            .portal-artikel-mobile-head {
                display: flex;
                align-items: flex-start;
                justify-content: space-between;
                gap: 10px;
                margin-bottom: 12px;
            }

            .portal-artikel-mobile-number {
                font-size: 1.05rem;
                line-height: 1.2;
                font-weight: 800;
                color: var(--text, #17345d);
            }

            .portal-artikel-mobile-status {
                flex-shrink: 0;
            }

            .portal-artikel-mobile-grid {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 8px 12px;
            }

            .portal-artikel-mobile-field {
                min-width: 0;
            }

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

            .portal-artikel-mobile-label {
                display: block;
                margin-bottom: 2px;
                font-size: 0.72rem;
                line-height: 1.2;
                font-weight: 700;
                color: var(--text-muted, #6b7c93);
                text-transform: uppercase;
                letter-spacing: 0.03em;
            }

            .portal-artikel-mobile-value {
                display: block;
                font-size: 0.95rem;
                line-height: 1.3;
                color: var(--text, #172033);
                overflow-wrap: anywhere;
            }

            .portal-artikel-mobile-price {
                font-weight: 800;
            }

            .portal-artikel-mobile-actions {
                display: grid;
                grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 10px;
                padding: 12px 14px 14px;
            }

            .portal-artikel-mobile-form {
                display: contents;
            }

            .portal-artikel-mobile-action {
                width: 100%;
                min-height: 68px;
                border: 1px solid var(--border, #cbd5e1);
                border-radius: 14px;
                background: var(--button-secondary-bg, #e8edf4);
                color: var(--text, #17345d);
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 4px;
                padding: 9px 8px;
                text-decoration: none;
                font: inherit;
                font-size: 0.78rem;
                font-weight: 700;
                cursor: pointer;
                box-shadow: none;
                box-sizing: border-box;
            }

            .portal-artikel-mobile-action:hover {
                background: var(--button-secondary-hover, #dde5ee);
            }

            .portal-artikel-mobile-action .material-symbols-rounded {
                font-size: 24px;
            }

            .portal-artikel-mobile-delete {
                color: var(--text, #17345d);
                margin: 0 !important;
                max-width: none !important;
                box-shadow: none !important;
                appearance: none;
                -webkit-appearance: none;
            }

            .portal-artikel-mobile-no-action {
                border-top: 1px solid var(--border, #d8e0eb);
                padding: 11px 14px;
                text-align: center;
                font-size: 0.8rem;
                line-height: 1.35;
                color: var(--text-muted, #6b7c93);
            }

            body.dark-mode .portal-artikel-mobile-card {
                background: var(--panel-2, #172033);
                border-color: var(--border, #334155);
                box-shadow: none;
            }

            body.dark-mode .portal-artikel-mobile-no-action {
                border-top-color: var(--border, #334155);
            }

            body.dark-mode .portal-artikel-mobile-action {
                background: var(--button-secondary-bg, #263449);
                border-color: var(--border, #3b4a61);
                color: var(--text, #f8fafc);
            }

            body.dark-mode .portal-artikel-mobile-action:hover {
                background: var(--button-secondary-hover, #314158);
            }
        }


        /* =========================================================
           PORTAL – ARTIKEL BEARBEITEN
        ========================================================= */

        .portal-artikel-edit-modal[hidden] {
            display: none;
        }

        .portal-artikel-edit-modal {
            position: fixed;
            inset: 0;
            z-index: 3000;

            display: grid;
            place-items: center;

            padding: 24px;
        }

        .portal-artikel-edit-backdrop {
            position: absolute;
            inset: 0;

            background: rgba(20, 36, 61, 0.62);
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
        }

        .portal-artikel-edit-dialog {
            position: relative;
            z-index: 1;

            width: min(760px, 100%);
            max-height: calc(100vh - 48px);
            overflow-y: auto;

            border: 1px solid var(--border, #d8e0eb);
            border-radius: 24px;

            background: var(--card-bg, #ffffff);

            box-shadow:
                0 28px 80px rgba(15, 23, 42, 0.28),
                0 4px 16px rgba(15, 23, 42, 0.08);
        }

        .portal-artikel-edit-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 20px;

            padding: 26px 26px 20px;

            border-bottom: 1px solid var(--border, #d8e0eb);
        }

        .portal-artikel-edit-header h2 {
            margin: 0 0 5px;

            color: var(--text, #17345d);
            font-size: clamp(1.45rem, 2vw, 1.8rem);
            line-height: 1.15;
            font-weight: 800;
        }

        .portal-artikel-edit-header p {
            margin: 0;

            color: var(--text-muted, #6b7c93);
            font-size: 0.95rem;
        }

        .portal-artikel-edit-close {
            width: 46px;
            height: 46px;
            flex: 0 0 46px;

            display: inline-flex;
            align-items: center;
            justify-content: center;

            padding: 0;

            border: 1px solid var(--border, #cbd5e1);
            border-radius: 14px;

            background: var(--button-secondary-bg, #e8edf4);
            color: var(--text, #17345d);

            cursor: pointer;

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

        .portal-artikel-edit-close:hover {
            background: var(--button-secondary-hover, #dde5ee);
            transform: translateY(-1px);
        }

        .portal-artikel-edit-close .material-symbols-rounded {
            font-size: 27px;
        }

        .portal-artikel-edit-form {
            margin: 0;
            padding: 26px;

            background: transparent;
            border: 0;
            box-shadow: none;
        }

        .portal-artikel-edit-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 20px;
        }

        .portal-artikel-edit-grid .form-group {
            display: block;
            min-width: 0;
            margin: 0;
        }

        .portal-artikel-edit-grid .form-group label {
            display: block;
            margin: 0 0 8px;

            color: var(--text, #17345d);
            font-size: 0.9rem;
            line-height: 1.3;
            font-weight: 750;
        }

        .portal-artikel-edit-grid .form-group input,
        .portal-artikel-edit-grid .form-group select {
            width: 100%;
            min-height: 50px;

            padding: 12px 14px;

            border: 1px solid var(--border, #cbd5e1);
            border-radius: 14px;

            background: var(--input-bg, #ffffff);
            color: var(--text, #172033);

            font: inherit;
            box-sizing: border-box;

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

        .portal-artikel-edit-grid .form-group input:focus,
        .portal-artikel-edit-grid .form-group select:focus {
            outline: none;

            border-color: #45658b;
            box-shadow: 0 0 0 4px rgba(69, 101, 139, 0.14);
        }

        .portal-artikel-edit-full {
            grid-column: 1 / -1;
        }

        .portal-artikel-edit-actions {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;

            width: 100%;
            margin-top: 24px;
        }

        .portal-artikel-edit-action {
            width: 100%;
            min-height: 72px;

            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 5px;

            padding: 10px 14px;

            border: 1px solid var(--border, #cbd5e1);
            border-radius: 14px;

            background: var(--button-secondary-bg, #e8edf4);
            color: var(--text, #17345d);

            font: inherit;
            font-size: 0.82rem;
            font-weight: 750;
            text-decoration: none;

            cursor: pointer;
            box-sizing: border-box;
            box-shadow: none;

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

        .portal-artikel-edit-action:hover {
            background: var(--button-secondary-hover, #dde5ee);
            transform: translateY(-1px);
        }

        .portal-artikel-edit-action .material-symbols-rounded {
            font-size: 26px;
        }

        .portal-artikel-edit-save {
            background: var(--button-primary-bg, #3f5879);
            border-color: var(--button-primary-border, #5d7596);
            color: #ffffff;
        }

        .portal-artikel-edit-save:hover {
            background: var(--button-primary-hover, #334a68);
        }

        body.portal-artikel-modal-open {
            overflow: hidden;
        }

        body.dark-mode .portal-artikel-edit-dialog {
            background: var(--panel-2, #172033);
            border-color: var(--border, #334155);
        }

        body.dark-mode .portal-artikel-edit-header {
            border-bottom-color: var(--border, #334155);
        }

        body.dark-mode .portal-artikel-edit-close,
        body.dark-mode .portal-artikel-edit-action {
            background: var(--button-secondary-bg, #263449);
            border-color: var(--border, #3b4a61);
            color: var(--text, #f8fafc);
        }

        body.dark-mode .portal-artikel-edit-close:hover,
        body.dark-mode .portal-artikel-edit-action:hover {
            background: var(--button-secondary-hover, #314158);
        }

        body.dark-mode .portal-artikel-edit-grid .form-group input,
        body.dark-mode .portal-artikel-edit-grid .form-group select {
            background: var(--input-bg, #101827);
            border-color: var(--border, #3b4a61);
            color: var(--text, #f8fafc);
        }

        body.dark-mode .portal-artikel-edit-save {
            background: var(--button-primary-bg, #3f5879);
            border-color: var(--button-primary-border, #5d7596);
            color: #ffffff;
        }

        body.dark-mode .portal-artikel-edit-save:hover {
            background: var(--button-primary-hover, #4a6385);
        }

        @media (max-width: 650px) {

            .portal-artikel-edit-modal {
                align-items: end;
                padding: 10px;
            }

            .portal-artikel-edit-dialog {
                width: 100%;
                max-height: calc(100vh - 20px);

                border-radius: 22px 22px 16px 16px;
            }

            .portal-artikel-edit-header {
                padding: 20px 18px 16px;
            }

            .portal-artikel-edit-form {
                padding: 18px;
            }

            .portal-artikel-edit-grid {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            .portal-artikel-edit-full {
                grid-column: auto;
            }

            .portal-artikel-edit-actions {
                grid-template-columns: 1fr;
            }

            .portal-artikel-edit-action {
                min-height: 58px;
                flex-direction: row;
                font-size: 0.92rem;
            }

        }
/* =========================================================
   PORTAL – FOOTER
========================================================= */

.portal-footer {
    width: 100%;
    margin-top: 40px;
    padding: 0 24px 24px;
    box-sizing: border-box;
}

.portal-footer-inner {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding-top: 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    border-top: 1px solid rgba(128, 128, 128, 0.25);
}

.portal-footer-copyright {
    flex-shrink: 0;

    font-size: 14px;
    line-height: 1.4;

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

.portal-footer-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.portal-footer-links a {
    font-size: 14px;
    line-height: 1.4;

    color: var(--text-secondary);
    text-decoration: none;

    transition:
        color 0.15s ease,
        opacity 0.15s ease;
}

.portal-footer-links a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}


/* =========================================================
   PORTAL – FOOTER MOBILE
========================================================= */

@media (max-width: 700px) {

    .portal-footer {
        margin-top: 28px;
        padding: 0 16px 24px;
    }

    .portal-footer-inner {
        padding-top: 18px;

        flex-direction: column;
        justify-content: center;
        gap: 14px;

        text-align: center;
    }

    .portal-footer-links {
        width: 100%;

        justify-content: center;
        gap: 10px 18px;
    }

    .portal-footer-links a {
        font-size: 13px;
    }

    .portal-footer-copyright {
        font-size: 13px;
    }
}
/* =========================================================
   KONTAKT-MODAL – DARK MODE FINAL
========================================================= */

body.dark-mode .portal-contact-modal .vermisst-modal-dialog {
    background: var(--surface) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;

    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.55) !important;
}

body.dark-mode .portal-contact-modal .vermisst-modal-header h2 {
    color: var(--text) !important;
}

body.dark-mode .portal-contact-modal .vermisst-modal-header p {
    color: var(--text-soft) !important;
}

body.dark-mode .portal-contact-modal .vermisst-modal-form label {
    color: var(--text) !important;
}

body.dark-mode .portal-contact-modal .vermisst-modal-form input,
body.dark-mode .portal-contact-modal .vermisst-modal-form select,
body.dark-mode .portal-contact-modal .vermisst-modal-form textarea {
    background: var(--surface-2) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

body.dark-mode .portal-contact-modal .vermisst-modal-form input::placeholder,
body.dark-mode .portal-contact-modal .vermisst-modal-form textarea::placeholder {
    color: var(--muted) !important;
}

body.dark-mode .portal-contact-modal .vermisst-modal-form select:focus,
body.dark-mode .portal-contact-modal .vermisst-modal-form input:focus,
body.dark-mode .portal-contact-modal .vermisst-modal-form textarea:focus {
    border-color: var(--primary) !important;
    box-shadow:
        0 0 0 3px rgba(59, 130, 246, 0.18) !important;
}

body.dark-mode .portal-contact-modal .portal-contact-field-hint,
body.dark-mode .portal-contact-modal .portal-contact-textarea-meta {
    color: var(--text-soft) !important;
}

body.dark-mode .portal-contact-modal .vermisst-modal-close {
    background: var(--surface-2) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

body.dark-mode .portal-contact-modal .vermisst-modal-close:hover {
    background: var(--surface-3) !important;
    color: var(--text) !important;
}
/* =========================================================
   PORTAL – TOPBAR FINAL
========================================================= */

.portal-topnav {
    width: calc(100% - 150px);
    max-width: 1240px;

    min-height: 66px;

    margin: 30px auto 44px;
    padding: 9px 16px 9px 20px;

    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;

    background: rgba(255, 255, 255, 0.96);

    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 999px;

    box-shadow:
        0 12px 32px rgba(15, 23, 42, 0.08);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}


/* =========================================================
   BRAND
========================================================= */

.portal-topnav .portal-brand {
    min-width: 0;

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

    text-decoration: none;
}


.portal-topnav .portal-logo {
    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    object-fit: contain;
}


.portal-topnav .portal-brand div {
    min-width: 0;
}


.portal-topnav .portal-brand strong {
    display: block;

    margin: 0;

    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.1;

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


.portal-topnav .portal-brand span {
    display: block;

    margin-top: 2px;

    font-size: 0.75rem;
    font-weight: 700;

    color: var(--muted);
}


/* =========================================================
   MITTLERE NAVIGATION
========================================================= */

.portal-topnav .portal-navlinks {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 4px;
}


.portal-topnav .portal-navlinks a {
    padding: 9px 14px;

    border-radius: 999px;

    color: var(--text);
    text-decoration: none;

    font-size: 0.95rem;
    font-weight: 750;

    white-space: nowrap;

    transition:
        background 0.16s ease,
        color 0.16s ease;
}


.portal-topnav .portal-navlinks a:hover {
    background: var(--surface-2);
    color: var(--text);

    transform: none;
}


.portal-topnav .portal-navlinks a.active {
    color: var(--primary);
}


/* =========================================================
   RECHTE AKTIONEN
========================================================= */

.portal-topnav .portal-nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 6px;
}


.portal-topnav .portal-theme-toggle,
.portal-topnav .portal-profile-button,
.portal-topnav .portal-logout {
    min-height: 40px;

    border-radius: 999px;
}


.portal-topnav .portal-theme-toggle,
.portal-topnav .portal-profile-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
}


.portal-topnav .portal-logout {
    height: 40px;

    padding: 0 15px;

    gap: 7px;

    font-size: 0.9rem;
}


/* =========================================================
   DARK MODE
========================================================= */

body.dark-mode .portal-topnav {
    background: rgba(31, 41, 55, 0.96);

    border-color: rgba(71, 85, 105, 0.9);

    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.28);
}


/* =========================================================
   TABLET / HANDY
========================================================= */

@media (max-width: 1100px) {

    .portal-topnav {
        width: calc(100% - 28px);
        max-width: none;

        min-height: 58px;

        margin: 12px auto 24px;
        padding: 7px 9px 7px 13px;

        display: flex;
        align-items: center;
        justify-content: space-between;

        gap: 8px;

        border-radius: 999px;
    }


    .portal-topnav .portal-brand {
        min-width: 0;
        flex: 1;

        gap: 8px;
    }


    .portal-topnav .portal-logo {
        width: 35px;
        height: 35px;

        flex-basis: 35px;
    }


    .portal-topnav .portal-brand strong {
        font-size: 0.84rem;

        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }


    .portal-topnav .portal-brand span {
        font-size: 0.63rem;
    }


    .portal-topnav .portal-navlinks {
        display: none !important;
    }


    .portal-topnav .portal-nav-actions {
        margin-left: auto;

        gap: 5px;
    }


    .portal-topnav .portal-theme-toggle,
    .portal-topnav .portal-profile-button,
    .portal-topnav .portal-logout {
        width: 36px;
        min-width: 36px;
        height: 36px;

        padding: 0;

        border-radius: 50%;
    }


    .portal-topnav .portal-logout-text {
        display: none;
    }

}


/* =========================================================
   SEHR KLEINE HANDYS
========================================================= */

@media (max-width: 430px) {

    .portal-topnav {
        width: calc(100% - 16px);

        margin-top: 8px;

        padding-left: 9px;
        padding-right: 7px;
    }


    .portal-topnav .portal-brand strong {
        font-size: 0.78rem;
    }


    .portal-topnav .portal-brand span {
        font-size: 0.6rem;
    }

}
/* =========================================================
   PORTAL – CONTENTBREITE AN TOPBAR ANGLEICHEN
========================================================= */

.portal-container {
    width: calc(100% - 150px);
    max-width: 1240px;

    margin-left: auto;
    margin-right: auto;

    padding-left: 0;
    padding-right: 0;
}


/* Tablet / Handy */

@media (max-width: 1100px) {

    .portal-container {
        width: calc(100% - 28px);
        max-width: none;

        padding-left: 0;
        padding-right: 0;
    }

}


/* Sehr kleine Handys */

@media (max-width: 430px) {

    .portal-container {
        width: calc(100% - 16px);
    }

}
/* =========================================================
   PORTAL – STICKY TOPBAR / GLAS-EFFEKT
========================================================= */

.portal-topnav {
    position: sticky;
    top: 12px;
    z-index: 1500;

    /* deutlich weniger Abstand nach unten */
    margin-top: 12px;
    margin-bottom: 22px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        backdrop-filter 0.2s ease;
}


/* Sobald gescrollt wurde */

.portal-topnav.is-scrolled {
    background: rgba(255, 255, 255, 0.72);

    border-color: rgba(203, 213, 225, 0.65);

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.12);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}


/* Darkmode */

body.dark-mode .portal-topnav.is-scrolled {
    background: rgba(31, 41, 55, 0.72);

    border-color: rgba(71, 85, 105, 0.7);

    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.32);
}


/* Handy */

@media (max-width: 1100px) {

    .portal-topnav {
        top: 8px;

        margin-top: 8px;
        margin-bottom: 16px;
    }

}
/* =========================================================
   PORTAL TOPBAR – GLASEFFEKT + BUTTONHÖHEN
========================================================= */

/* Beim Scrollen stärker durchsichtig */
.portal-topnav.is-scrolled {
    background: rgba(255, 255, 255, 0.52);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-color: rgba(203, 213, 225, 0.55);

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.10);
}


/* Darkmode */
body.dark-mode .portal-topnav.is-scrolled {
    background: rgba(31, 41, 55, 0.52);

    border-color: rgba(71, 85, 105, 0.55);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.25);
}


/* Alle rechten Buttons exakt gleich hoch */
.portal-theme-toggle,
.portal-legal-button,
.portal-desktop-profile-button,
.portal-logout {
    height: 44px;
    min-height: 44px;
    box-sizing: border-box;
}


/* Runde Buttons */
.portal-theme-toggle,
.portal-legal-button,
.portal-desktop-profile-button {
    width: 44px;
    min-width: 44px;
}


/* Logout bleibt breiter, aber gleiche Höhe */
.portal-logout {
    padding: 0 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
/* =========================================================
   PORTAL – EINHEITLICHE VERTIKALE ABSTÄNDE
========================================================= */

.portal-container {
    padding-top: 0;
}

.portal-topnav {
    margin-bottom: 26px;
}
/* =========================================================
   PORTAL TOPBAR – EIN-/AUSBLENDEN BEIM SCROLLEN
========================================================= */

.portal-topnav {
    transition:
        transform 0.28s ease,
        opacity 0.22s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        backdrop-filter 0.2s ease;
}

.portal-topnav.is-hidden {
    transform: translateY(calc(-100% - 20px));
    opacity: 0;
    pointer-events: none;
}

.portal-topnav.is-visible {
    transform: translateY(0);
    opacity: 1;
}
/* =========================================================
   PORTAL – LOGOUT EXAKT AUF BUTTONHÖHE
========================================================= */

.portal-nav-actions {
    align-items: center;
}

.portal-theme-toggle,
.portal-legal-button,
.portal-desktop-profile-button,
.portal-logout {
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    box-sizing: border-box;
}

.portal-theme-toggle,
.portal-legal-button,
.portal-desktop-profile-button {
    width: 44px !important;
    min-width: 44px !important;
}

.portal-logout {
    padding: 0 16px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    line-height: 1 !important;
}

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

    line-height: 1;
}

.portal-logout-text {
    display: inline-flex;
    align-items: center;

    line-height: 1;
}
/* =========================================================
   PORTAL TOPBAR – MOBILE FEINSCHLIFF
========================================================= */

@media (max-width: 1100px) {

    /* Brand-Text nicht mehr unten abschneiden */
    .portal-brand strong {
        line-height: 1.25 !important;
        overflow: visible;
        padding-bottom: 1px;
    }

    .portal-brand span {
        line-height: 1.25;
    }


    /* Alle vier Aktionsbuttons exakt gleich */
    .portal-theme-toggle,
    .portal-legal-button,
    .portal-desktop-profile-button,
    .portal-logout {
        width: 44px !important;
        min-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;

        padding: 0 !important;
        margin: 0 !important;

        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        border-radius: 50% !important;
        box-sizing: border-box;
    }

    /* Logout auf Handy nur als rundes Icon */
    .portal-logout-text {
        display: none !important;
    }

    .portal-logout-icon {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;

        margin: 0;
        font-size: 24px;
        line-height: 1;
    }

}
/* =========================================================
   PORTAL – RECHTLICHES AUF HANDY AUSBLENDEN
========================================================= */

@media (max-width: 1100px) {

    .portal-nav-actions > .portal-legal-button:not(.portal-contact-trigger) {
        display: none !important;
    }

}
.portal-password-forgot {
    margin-top: 8px;
    text-align: right;
}

.portal-password-forgot a {
    font-size: 0.9rem;
    text-decoration: none;
}

.portal-password-forgot a:hover {
    text-decoration: underline;
}
.portal-password-reset-hinweis,
.portal-password-reset-status {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    margin-top: 18px;
    padding: 14px 16px;

    border-radius: 12px;
}

.portal-password-reset-hinweis {
    background: rgba(59, 130, 246, 0.07);
    border: 1px solid rgba(59, 130, 246, 0.20);
}

.portal-password-reset-status {
    margin-bottom: 20px;

    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.22);
}

.portal-password-reset-hinweis .material-symbols-rounded,
.portal-password-reset-status .material-symbols-rounded {
    flex-shrink: 0;
    font-size: 22px;
}

.portal-password-reset-hinweis strong,
.portal-password-reset-status strong {
    display: block;
    margin-bottom: 4px;
}

.portal-password-reset-hinweis p,
.portal-password-reset-status p {
    margin: 0;
    line-height: 1.5;
}
.portal-login-forgot {
    margin-top: 10px;
    text-align: center;
}

.portal-login-forgot a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.portal-login-forgot a:hover {
    text-decoration: underline;
}
.portal-password-field {
    position: relative;
}

.portal-password-field input {
    width: 100%;
    padding-right: 48px;
}

.portal-password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;

    transform: translateY(-50%);

    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;

    padding: 0;

    border: 0;
    background: transparent;

    cursor: pointer;
}

.portal-password-toggle .material-symbols-rounded {
    font-size: 22px;
}

.portal-password-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 6px;
}