:root {
    --color-bg: #e2e6da;
    --color-surface: #ffffff;
    --color-primary: #459c7f;
    --color-primary-dark: #3c5956;
    --color-secondary: #b89b6c;
    --color-accent: #cd1013;
    --color-text: #111827;
    --color-text-muted: #6B7280;
    --radius-lg: 16px;
    --radius-md: 10px;
    --shadow-soft: 0 14px 40px rgba(15, 23, 42, 0.18);
    --max-width: 1200px;
    --transition-fast: 150ms ease-out;
}

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

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, rgba(69, 156, 127, 0.22), var(--color-bg) 60%);
    color: var(--color-text);
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main {
    flex: 1;
    padding: 1.5rem 1rem 2.5rem;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(148, 163, 184, 0.4);
}

.site-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.35rem 1rem;     /* etwas kompakter als vorher */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0;
    line-height: 1;
}

.brand-logo {
    max-height: 120px;         /* statt feste 270px */
    width: auto;
    display: block;
}


/* Navigation */

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.75rem;
}

.site-nav a {
    text-decoration: none;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    transition: background-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.site-nav a:hover,
.site-nav a:focus-visible {
    background: rgba(69, 156, 127, 0.1);
    color: var(--color-primary-dark);
    box-shadow: 0 0 0 1px rgba(69, 156, 127, 0.35);
}

/* Hero */

.hero {
    margin-top: 1.5rem;
    padding: 1.75rem 1.5rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(
        135deg,
        rgba(69, 156, 127, 0.20),
        rgba(60, 89, 86, 0.14)
    );
    box-shadow: var(--shadow-soft);
}

.hero-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.hero-highlight {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: rgba(69, 156, 127, 0.22);
    color: var(--color-primary-dark);
}

.hero h1,
.hero h2 {
    margin: 0;
    color: var(--color-primary-dark);
}

.hero-lead {
    margin: 0;
    color: var(--color-text-muted);
    max-width: 40rem;
}

/* Info-Box */

.info-box {
    margin: 0.5rem 0 1.1rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(69, 156, 127, 0.08);
    color: var(--color-primary-dark);
    font-size: 0.9rem;
}

/* Form */

.form-card {
    margin-top: 1rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.5rem 1.25rem;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 720px) {
    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .form-field-full {
        grid-column: 1 / -1;
    }
}

.form-field label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: 0.25rem;
}

.form-field input,
.form-field textarea {
    width: 100%;
    border-radius: 999px;
    border: 1px solid #d2d7df;
    padding: 0.55rem 0.9rem;
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.form-field textarea {
    border-radius: var(--radius-md);
    resize: vertical;
    min-height: 90px;
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px rgba(69, 156, 127, 0.35);
    background-color: #f5fbf8;
}

/* Consent */

.form-consent {
    margin-top: 1.1rem;
    background: #f9fafb;
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    font-size: 0.86rem;
    color: var(--color-text-muted);
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
}

.checkbox input[type="checkbox"] {
    margin-top: 0.15rem;
}

/* Buttons (global) */

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--transition-fast),
                color var(--transition-fast),
                transform var(--transition-fast),
                box-shadow var(--transition-fast),
                border-color var(--transition-fast);
}

.btn-primary {
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 11px 24px rgba(69, 156, 127, 0.4);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(69, 156, 127, 0.5);
}

.btn-secondary {
    background: #ffffff;
    color: var(--color-primary-dark);
    border-color: rgba(69, 156, 127, 0.22);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    background: rgba(69, 156, 127, 0.06);
    border-color: rgba(69, 156, 127, 0.45);
}

/* Form-Hint / Actions */

.form-actions {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Footer */

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.4);
    background: #f3f4f3;
    padding: 0.85rem 1rem 1rem;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.site-footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
}

.site-footer a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* === Startseite: Hero-Bereich === */

.hero-home {
    padding: 3rem 1.5rem 3.5rem;
    background:
        radial-gradient(circle at top left, rgba(69, 156, 127, 0.35) 0, transparent 55%),
        radial-gradient(circle at bottom right, rgba(219, 184, 118, 0.14) 0, transparent 50%),
        var(--color-bg);
}

.hero-inner {
    max-width: 1120px;
    margin: 0 auto;
}

.hero-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 900px) {
    .hero-grid {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr);
        align-items: start;
    }
}

.hero-content {
    max-width: 640px;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.9rem;
    border-radius: 999px;
    background: rgba(69, 156, 127, 0.18);
    color: var(--color-primary-dark);
    font-size: 0.85rem;
    font-weight: 600;
}

.hero-title {
    margin: 1rem 0 0.75rem;
    font-size: clamp(1.8rem, 3vw, 2.3rem);
    line-height: 1.15;
    color: #111827;
}

.hero-lead {
    margin: 0 0 1.5rem;
    color: #374151;
    line-height: 1.7;
    font-size: 1rem;
}

.hero-appointment {
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    background: #e3f2ec;
    border: 1px solid #c4e1d3;
    margin-bottom: 1.4rem;
}

.hero-appointment-full {
    background: #f6e5bf;
    border-color: #e8cf90;
}

.hero-appointment-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-primary-dark);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.hero-appointment-date {
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 0.35rem;
}

.hero-appointment-hint {
    margin: 0;
    font-size: 0.85rem;
    color: #4B5563;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

/* Buttons (Hero-Bereich) */

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.2rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.08s ease, box-shadow 0.12s ease, background-color 0.12s ease, color 0.12s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(69, 156, 127, 0.35);
    border: none;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(69, 156, 127, 0.45);
}

.btn-ghost {
    background: transparent;
    color: var(--color-primary-dark);
    border: 1px solid rgba(69, 156, 127, 0.35);
}

.btn-ghost:hover {
    background: rgba(69, 156, 127, 0.08);
}

/* Hero-Sidebox */

.hero-sidebox {
    max-width: 420px;
    margin-inline: auto;
}

.hero-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.5rem 1.7rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    border: 1px solid #E5E7EB;
}

.hero-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    color: #111827;
}

.hero-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: grid;
    gap: 0.5rem;
    color: #374151;
    font-size: 0.95rem;
}

.hero-list li::before {
    content: "•";
    color: #459c7f;
    font-weight: 700;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* === Info-Sektion === */

.section {
    padding: 2.5rem 1.5rem;
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-info {
    background: #ffffff;
}

.info-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 900px) {
    .info-grid {
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr) minmax(0, 1fr);
    }
}

.info-card {
    background: #F9FAFB;
    border-radius: 1rem;
    padding: 1.4rem 1.5rem 1.6rem;
    border: 1px solid #E5E7EB;
}

.info-card h3 {
    margin: 0.25rem 0 0.75rem;
    font-size: 1.05rem;
    color: #111827;
}

.info-card p {
    margin: 0 0 0.7rem;
    color: #374151;
    font-size: 0.95rem;
}

.info-label {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: rgba(69, 156, 127, 0.18);
    color: var(--color-primary-dark);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.info-highlight {
    margin-top: 0.75rem;
    padding: 0.7rem 0.8rem;
    border-radius: 0.75rem;
    background: #ECFDF5;
    border: 1px solid #BBF7D0;
    color: #166534;
    font-size: 0.9rem;
}

.info-note {
    font-size: 0.9rem;
    color: #4B5563;
}

/* Steps */

.steps {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: grid;
    gap: 0.8rem;
}

.step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: flex-start;
}

.step-number {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    background: var(--color-primary);
    color: white;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-body strong {
    display: block;
    margin-bottom: 0.1rem;
    color: #111827;
    font-size: 0.95rem;
}

.step-body p {
    margin: 0;
    font-size: 0.9rem;
    color: #4B5563;
}

/* Hinweis-Bereich unten */

.section-hint {
    background: #e2e6da;
    padding-top: 0;
    padding-bottom: 3rem;
}

.inline-hint {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    background: #f0f3ec;
    border-radius: 0.9rem;
    padding: 0.9rem 1rem;
    border: 1px solid #d0d7ca;
}

.inline-hint-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.inline-hint-text {
    font-size: 0.9rem;
    color: #1F2937;
}

.inline-hint-text a {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* =========================================
   LEGALE SEITEN (Datenschutz / Impressum)
   ========================================= */

.section-legal .section-inner {
    max-width: 820px;
}

.section-legal h1 {
    font-size: clamp(1.8rem, 3.2vw, 2.2rem);
    margin: 0 0 1rem;
    color: var(--color-primary-dark);
}

.section-legal h2 {
    font-size: 1.15rem;
    margin: 1.75rem 0 0.5rem;
    color: #111827;
}

.section-legal h3 {
    font-size: 1.02rem;
    margin: 1.2rem 0 0.35rem;
    color: #111827;
}

.section-legal p,
.section-legal ul,
.section-legal ol {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #374151;
    margin: 0 0 0.75rem;
}

.section-legal ul,
.section-legal ol {
    padding-left: 1.2rem;
}

.section-legal li {
    margin-bottom: 0.25rem;
}

.section-legal a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.section-legal p:last-of-type {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* =========================================
   TEXT-BLOCKE & FLIESSTEXT BEI KLEINEN SCREENS
   ========================================= */

.section h1,
.section h2,
.section h3 {
    word-break: break-word;
}

@media (max-width: 768px) {
    .site-header-inner {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 0.5rem 1rem;
    }

    .brand {
        flex: 1 0 100%;
        justify-content: flex-start;
    }

    .site-nav ul {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .site-nav a {
        padding: 0.35rem 0.7rem;
        font-size: 0.85rem;
    }
	    .brand-logo {
        max-height: 70px;
    }
}

/* =========================================
   SECTIONS & PADDINGS – MOBILE TUNING
   ========================================= */

@media (max-width: 640px) {
    .main {
        padding: 1.25rem 0.9rem 2rem;
    }

    .section {
        padding: 1.75rem 1rem 2rem;
    }

    .hero-home {
        padding: 2.2rem 1rem 2.6rem;
    }

    .hero-card {
        padding: 1.25rem 1.2rem;
    }

    .info-card {
        padding: 1.2rem 1.1rem 1.3rem;
    }
}

/* =========================================
   BUTTONS – KLEINE DISPLAYS
   ========================================= */

@media (max-width: 480px) {
    .btn-primary,
    .btn-secondary,
    .btn-ghost {
        width: 100%;
        justify-content: center;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

/* ==============================
   ADMIN-BEREICH
   ============================== */

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-subline {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.admin-header-actions {
    display: flex;
    gap: 0.5rem;
}

/* Filter */

.admin-filter {
    margin-bottom: 0.75rem;
}

.admin-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.admin-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 180px;
}

.admin-filter-field label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.admin-filter-field select,
.admin-filter-field input[type="text"],
.admin-filter-field input[type="date"] {
    padding: 0.4rem 0.55rem;
    border-radius: 0.5rem;
    border: 1px solid #D1D5DB;
    font-size: 0.9rem;
}

.admin-filter-search {
    flex: 1 1 240px;
}

.admin-filter-submit {
    flex: 0 0 auto;
}

/* Meta */

.admin-meta {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.admin-meta-note {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #374151;
}

/* Tabelle */

.admin-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid #E5E7EB;
    background: #ffffff;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table thead {
    background: #F9FAFB;
}

.admin-table th,
.admin-table td {
    padding: 0.7rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
    vertical-align: top;
}

.admin-table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6B7280;
}

.admin-table td {
    color: #111827;
}

.admin-table .cell-meta {
    font-size: 0.8rem;
    color: #6B7280;
}

.admin-table .cell-id {
    white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.admin-table-empty {
    text-align: center;
    padding: 1.4rem !important;
    color: #6B7280;
}

/* Badges */

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.15rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-status {
    background: #E5E7EB;
    color: #111827;
}

/* Status-Farben */

.badge-status-pending_email {
    background: #FEF3C7;
    color: #92400E;
}

.badge-status-email_confirmed {
    background: #DBEAFE;
    color: #1D4ED8;
}

.badge-status-appointment_assigned {
    background: #DCFCE7;
    color: #166534;
}

.cell-attended {
    text-align: left;
}

/* Inline-Form */

.inline-form {
    margin: 0;
}

/* Alerts */

.alert {
    border-radius: 0.75rem;
    padding: 0.7rem 0.8rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* Admin-Formular allgemein (Login) */

.admin-form .form-row {
    margin-bottom: 0.9rem;
}

.admin-form label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Pagination */

.admin-pagination {
    margin-top: 0.9rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.admin-pagination .page-link {
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    border: 1px solid #D1D5DB;
    text-decoration: none;
    color: #111827;
}

.admin-pagination .page-link:hover {
    background: #F3F4F6;
}

.admin-pagination .page-current {
    padding-inline: 0.3rem;
    font-weight: 500;
}

/* Mobile-Anpassung Admin */

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-table th:nth-child(1),
    .admin-table td:nth-child(1) {
        display: none;
    }
}

/* Notizen im Patientenfeld – kompakte Vorschau */
.cell-notes {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #4B5563;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
    max-width: 36rem;
}

/* Besuchs-Status-Button (war da / nicht erschienen) */

.attended-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        opacity var(--transition-fast);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

/* Rot = Patient NICHT da (attended_at = NULL) */
.attended-btn--off {
    background: #FEE2E2;
    color: #B91C1C;
}

/* Grün = Patient war da (attended_at gesetzt) */
.attended-btn--on {
    background: #DCFCE7;
    color: #166534;
}

.attended-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
    opacity: 0.95;
}

/* Datum unter dem Button (attended_at formatiert) */
.attended-date {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: #6B7280;
}

/* Desktop: kein unnötiger horizontaler Scroll im Admin */
@media (min-width: 900px) {
    .admin-table-wrapper {
        overflow-x: visible;
    }
}
/* Kleinerer Button für Notizen */
.btn-notes {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
}

/* Versteckte Quell-Textarea in der Tabelle */
.notes-source[hidden] {
    display: none;
}

/* Notizen-Modal */

.notes-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.notes-modal-open {
    display: flex;
}

.notes-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.notes-modal-dialog {
    position: relative;
    background: #ffffff;
    border-radius: 0.9rem;
    padding: 1.1rem 1.2rem 1rem;
    max-width: 520px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.35);
    z-index: 1;
}

.notes-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.notes-modal-header h2 {
    margin: 0;
    font-size: 1rem;
    color: #111827;
}

.notes-modal-close {
    border: none;
    background: transparent;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #6B7280;
}

.notes-modal-close:hover {
    color: #111827;
}

.notes-modal-body {
    margin-bottom: 0.8rem;
}

#notes-modal-text {
    width: 100%;
    min-height: 160px;
    border-radius: 0.5rem;
    border: 1px solid #D1D5DB;
    padding: 0.5rem 0.6rem;
    font-size: 0.9rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    resize: vertical;
    color: #111827;
    background: #F9FAFB;
}

.notes-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.2rem;
}
/* =========================================
   ADMIN – NEU: interne Notizen / Danger Button
   ========================================= */

/* Buttons in Notizen-Zelle sauber stapeln */
.admin-actions-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

/* Danger Button (Löschen) im Look & Feel */
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(205, 16, 19, 0.25);
    background: rgba(205, 16, 19, 0.08);
    color: var(--color-accent);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color var(--transition-fast),
                border-color var(--transition-fast),
                transform var(--transition-fast),
                box-shadow var(--transition-fast);
}

.btn-danger:hover,
.btn-danger:focus-visible {
    background: rgba(205, 16, 19, 0.12);
    border-color: rgba(205, 16, 19, 0.45);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(205, 16, 19, 0.16);
    outline: none;
}

.btn-danger--compact {
    padding: 0.25rem 0.8rem; /* passt zu btn-notes */
    font-size: 0.82rem;
}

/* Modal-Form Styling passend zum Admin */
.admin-modal-form {
    margin: 0;
}

.admin-modal-label {
    display: block;
    margin: 0 0 0.25rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.admin-modal-input,
.admin-modal-textarea {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #D1D5DB;
    padding: 0.5rem 0.65rem;
    font-size: 0.9rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #111827;
    background: #F9FAFB;
    outline: none;
    transition: border-color var(--transition-fast),
                box-shadow var(--transition-fast),
                background-color var(--transition-fast);
}

.admin-modal-textarea {
    min-height: 160px;
    resize: vertical;
}

.admin-modal-textarea--edit {
    min-height: 120px;
    background: #ffffff;
}

.admin-modal-input:focus-visible,
.admin-modal-textarea:focus-visible {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px rgba(69, 156, 127, 0.35);
    background-color: #f5fbf8;
}

.admin-modal-divider {
    height: 1px;
    background: rgba(148, 163, 184, 0.45);
    margin: 0.9rem 0 0.9rem;
}

.admin-modal-grid {
    display: grid;
    gap: 0.75rem;
}

.admin-modal-field--code {
    max-width: 220px;
}

/* Tablet/Desktop: Kürzel links, Notiz rechts */
@media (min-width: 720px) {
    .admin-modal-grid {
        grid-template-columns: 220px 1fr;
        align-items: start;
    }

    .admin-modal-field--note {
        grid-column: 2 / 3;
    }
}
