/* ===== Reset / Basis ===== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f6f7f9;
    color: #222;
}

/* ===== Layout ===== */
.container {
    max-width: 1100px;
    margin: auto;
    padding: 1rem;
}

header {
    background: #1f2937;
    color: #fff;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

header h1 {
    font-size: 1.2rem;
    margin: 0;
}

nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 1rem;
    font-size: 0.95rem;
}

nav a:hover {
    text-decoration: underline;
}

/* ===== Content ===== */
h1, h2, h3 {
    margin-top: 1.2em;
}

.card {
    background: #fff;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ===== Tabellen ===== */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th, td {
    padding: 0.6rem 0.7rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

th {
    background: #f3f4f6;
    font-weight: 600;
}

tr:hover {
    background: #f9fafb;
}

/* ===== Buttons ===== */
button,
.btn {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.45rem 0.8rem;
    cursor: pointer;
    font-size: 0.9rem;
}

button.secondary,
.btn.secondary {
    background: #6b7280;
}

button.danger {
    background: #dc2626;
}

button:disabled {
    background: #9ca3af;
}

/* =========================
   Admin – Aktionsbuttons
   ========================= */

.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Buttons einheitlich */
.action-buttons .btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1.2;
    white-space: nowrap;
}

.stammdaten-links {
    list-style: none;
    padding: 0;
}

.stammdaten-links .btn {

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 48px; /* Touch-Standard */
    padding: 12px 16px;

    font-size: 1rem;
    font-weight: 600;
    text-align: center;

    border-radius: 8px;
}    margin: 0;

    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}



/* Mobile Optimierung */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .action-buttons .btn {
        width: 100%;
        text-align: center;
    }
}
@media (min-width: 600px) {
    .stammdaten-links {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

.stammdaten-links .btn {
    transition: background-color 0.15s ease,

                transform 0.05s ease;
}

.stammdaten-links .btn:active {
    transform: scale(0.98);
}

/* ===== Formulare ===== */
label {
    font-weight: 500;
}

input, select {
    width: 100%;
    padding: 0.45rem;
    margin-top: 0.2rem;
    margin-bottom: 0.8rem;
    border-radius: 4px;
    border: 1px solid #d1d5db;
}

/* ===== Status ===== */
.status-ok {
    color: #16a34a;
    font-weight: 600;
}

.status-bad {
    color: #dc2626;
    font-weight: 600;
}

/* ===== Footer ===== */
footer {
    margin-top: 2rem;
    padding: 1rem 0;
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 700px) {
    header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    nav {
        margin-top: 0.5rem;
    }

    nav a {
        margin-left: 0;
        margin-right: 1rem;
    }
}


/* =========================
   Stammdaten – Übersicht
   ========================= */

.stammdaten-links {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.stammdaten-links li {
    margin-bottom: 0.75rem;
}

.stammdaten-links .btn {
    display: inline-block;
}

/* =========================
   Klappbare Beschreibungen
   ========================= */

/* maximale sichtbare Zeilen */
.beschreibung-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;        /* ← HIER Anzahl Zeilen */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* aufgeklappt */
.beschreibung-wrapper.open .beschreibung-text {
    -webkit-line-clamp: unset;
}

/* Button */
.beschreibung-toggle {
    background: none;
    border: none;
    padding: 0;
    margin-top: 0.25rem;
    color: #2563eb;
    cursor: pointer;
    font-size: 0.85rem;
}

/* Button nur anzeigen, wenn nötig (JS steuert das) */
.beschreibung-toggle {
    display: none;
}

.beschreibung-wrapper.has-toggle .beschreibung-toggle {
    display: inline;
}

/* =========================
   Login / Auth
   ========================= */

.auth-wrapper {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.auth-card h1 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-card label {
    display: block;
    margin-top: 1rem;
    font-weight: 500;
}

.auth-card input[type="text"],
.auth-card input[type="password"] {
    width: 100%;
    padding: 0.6rem 0.7rem;
    margin-top: 0.25rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.auth-card input:focus {
    border-color: #2563eb;
    outline: none;
}

.auth-card .checkbox {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-card button {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.7rem;
    font-size: 1rem;
}

.auth-links {
    margin-top: 1rem;
    text-align: center;
}

.auth-links a {
    font-size: 0.9rem;
}

/* =========================
   Toggle Switch (Login)
   ========================= */

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.2rem;
    gap: 1rem;
    font-size: 0.95rem;
}

/* Switch Container */
.toggle-switch {
    position: relative;
    width: 46px;
    height: 24px;
}

/* Checkbox verstecken */
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Slider */
.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.25s;
}

/* Kreis */
.toggle-switch .slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.25s;
}

/* Aktiv */
.toggle-switch input:checked + .slider {
    background-color: #2563eb;
}

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

/* Fokus (Tastatur) */
.toggle-switch input:focus + .slider {
    box-shadow: 0 0 0 2px rgba(37,99,235,0.3);
}

/* =========================
   Passwort anzeigen Toggle
   ========================= */

.password-field {
    position: relative;
}

.password-field input {
    width: 100%;
    padding-right: 2.5rem;
}

.pw-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.6;
}

.pw-toggle:hover {
    opacity: 1;
}

.pw-toggle-text {
    font-size: 0.85rem;
    color: #666;
    margin-left: 0.3rem;
    cursor: pointer;
    user-select: none;
}

.pw-toggle-text:hover {
    text-decoration: underline;
}

/* =========================
   Formular-Layout
   ========================= */

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.textarea {
    width: 100%;
    resize: vertical;
    min-height: 120px;
}

/* =========================
   Toggle (Slider)
   ========================= */

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Slider (bereits aus Login bekannt) */
.toggle-switch {
    position: relative;
    width: 42px;
    height: 22px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    border-radius: 22px;
    transition: 0.3s;
}

.toggle-switch .slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .slider {
    background-color: #2563eb;
}

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

.foto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin: 12px 0;
}

.foto-grid img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #f9fafb;
}

/* =========================
   Schnellbuchung (Material)
   ========================= */

.quick-booking {
    display: flex;
    gap: 1.2rem;              /* Abstand zwischen den Buttons */
    margin: 1rem 0 1.5rem;
}

.quick-booking .btn.big {
    min-width: 90px;
    min-height: 64px;
    font-size: 1.6rem;
    font-weight: 700;
    border-radius: 12px;
    padding: 0;
}

/* =========================
   Mobile: Schnellbuchung
   ========================= */

@media (max-width: 768px) {

    .quick-booking,
    .action-buttons {
        gap: 0.75rem;
    }

    .quick-booking .btn,
    .action-buttons .btn {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        min-width: 3.2rem;
    }
}

/* Farben klar & ruhig */
.btn.danger {
    background-color: #dc2626;
    color: #fff;
}

.btn.success {
    background-color: #16a34a;
    color: #fff;
}

.btn.danger:hover {
    background-color: #b91c1c;
}

.btn.success:hover {
    background-color: #15803d;
}

/* Touch-Feedback */
.quick-booking .btn:active {
    transform: scale(0.96);
}

.status-info {
    color: #0369a1;
    font-weight: 600;
}




/* =========================
   Sticky Header nur noch allgemein
   ========================= */

header:not(.admin-header-v2) {
    position: sticky;
    top: 0;
    z-index: 1000;
}



/* =========================
   Artikel-Links immer in blau
   ========================= */

a.artikel-link,
a.artikel-link:visited {
    color: #2563eb;           /* dein Standard-Blau */
    text-decoration: none;
}

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

/* -------------------------------------------------
   Scan-Session Layout
-------------------------------------------------- */

body.scan-mode header {
    display: none;
}

body.scan-mode main.container {
    margin-top: 0;
    padding-top: 12px;
}

.scan-title {
    margin-top: 0;
}

.scan-wrapper {
    max-width: 520px;
    margin: 0 auto;
}

/* Buttons */

.btn-block {
    width: 100%;
}

.btn-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Exemplar-Liste */

.list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.list li button {
    flex-shrink: 0;
}

/* =================================================
   Scan UI – Buttons & Layout
   ================================================= */

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 18px 16px;
    font-size: 18px;
    border-radius: 14px;
}

.btn-primary {
    background: #3b66f6;
    color: #fff;
    border: none;
}

.btn-secondary {
    background: #4b5563;
    color: #fff;
    border: none;
}

.btn-warning {
    background: #f59e0b;
    color: #fff;
    border: none;
}

/* deaktivierte Buttons */
.btn-disabled {
    background: #9ca3af !important;
    color: #f3f4f6 !important;
    cursor: not-allowed;
}

/* ausgewählte Aktion */
.aktion-btn.selected {
    background: #16a34a !important;
    color: #ffffff !important;
}

/* Button-Stack (Abstände zwischen Aktionsbuttons) */
.btn-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Karten-Layout */
.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 18px;
}

/* Scan-Wrapper */
.scan-wrapper {
    max-width: 520px;
    margin: 0 auto;
}

/* Titel */
.scan-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 16px;
}

/* Artikelansicht mit den Exemplaren */
.exemplar-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.exemplar-table th,
.exemplar-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.exemplar-table th {
    background: #f5f5f5;
}

/* Standard: Mobile first */
.exemplar-table {
    display: none;
}

.exemplar-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* .exemplar-card {
    border: 4px solid #ddd;
    border-radius: 12px;
    padding: 18px;
    background: #fff;
} */

.exemplar-card {
    padding: 1.2rem;
    border: 4px solid #d1d5db;   /* dicke Linie */
    box-shadow: 0 4px 10px      rgba(0,0,0,0.08);
    margin-bottom: 1.2rem;
    border-radius: 12px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


.ex-row strong {
    color: #555;
    font-weight: 600;
}

.exemplar-card form {

    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}
/* Status optisch hervorheben */
.status.verfuegbar {
    color: #0a7d2a;
    font-weight: 600;
}

.status.ausgeliehen {
    color: #b00020;
    font-weight: 600;
}

.status.im_einsatz {
    color: #d17b00;
    font-weight: 600;
}

.status.defekt {
    color: #555;
    font-weight: 600;
}

/* Desktop ab Tablet-Breite */
@media (min-width: 768px) {
    .exemplar-table {
        display: table;
        width: 100%;
    }

    .exemplar-cards {
        display: none;
    }
}


.password-option {
    display: flex;
    align-items: center;
    justify-content: flex-end;   /* 👉 rechtsbündig */
    gap: 12px;

    margin-top: 6px;             /* nah am Passwortfeld */
    margin-bottom: 20px;         /* Abstand zur nächsten Sektion */

    font-size: 14px;
    color: #9ca3af;              /* bewusst zurückhaltend */
}

/* etwas kleiner als der Haupt-Slider */
.password-option .toggle-switch {
    transform: scale(0.85);
}

/* =========================
   QR-Scanner
   =========================*/
#qr-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.qr-card {
    background: #111;
    width: 92%;
    max-width: 480px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,.4);
}

.qr-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
}

.qr-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qr-footer {
    padding: 16px;
    background: #111;
}



/* =========================
   Material-Buchung Buttons
   ========================= */

.btn-booking {
    min-height: 72px;          /* ca. +50 % Höhe */
    font-size: 1.25rem;       /* deutlich größere Beschriftung */
    font-weight: 600;
    padding: 0 1.5rem;        /* Text füllt Button */
    border-radius: 12px;
}

/* Mobile noch etwas großzügiger */
@media (max-width: 768px) {
    .btn-booking {
        min-height: 84px;
        font-size: 1.35rem;
    }
}

/* Sticky Zurück-zur-Übersicht Button */
.sticky-back {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.sticky-back .btn {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    min-width: 220px;
    text-align: center;
}

/* Auf großen Bildschirmen optional weniger dominant */
@media (min-width: 900px) {
    .sticky-back {
        bottom: 2rem;
    }
}

textarea.auto-grow {
    resize: none;
    overflow: hidden;
    min-height: 4.5em;
    line-height: 1.4;
}

/* ----------------------------------
   Toggle-Slider (Aktiv/Inaktiv)
---------------------------------- */

.toggle-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
}

.toggle-label {
    font-weight: 600;
}

/* Switch-Grundlage */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.2s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
}

/* Aktiv-Zustand */
.switch input:checked + .slider {
    background-color: #2563eb; /* dein Blau */
}

.switch input:checked + .slider:before {
    transform: translateX(20px);
}

/* ----------------------------------
   Mehr Abstand zu den Buttons
---------------------------------- */

.form-actions {
    margin-top: 2rem;
}

/* =====================================================
   ADMIN – ARTIKELKARTEN (FINAL CLEANUP)
   ===================================================== */

.admin-article-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Karte */
.admin-article-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Header */
.admin-article-card .article-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-article-card .article-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Typ-Badge */
.admin-article-card .badge-typ {
    align-self: flex-start;
    font-size: 0.85rem;
}

/* Aktionen */
.admin-article-card .article-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Buttons in Artikelkarten vereinheitlichen */
.admin-article-card .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;
    padding: 0 14px;

    white-space: nowrap;
}


/* Exemplar-Karten: Aktionen sauber ausrichten (überschreibt globale button-Regel nur hier) */
.exemplar-card .admin-actions button {
    margin-top: 0;          /* killt das globale margin-top:1.5rem */
    padding: 0.6rem 0.9rem; /* wieder passend zu .btn */
    font-size: 1rem;
    width: 100%;
}

.exemplar-card .admin-actions form {
    margin: 0;              /* verhindert “zufällige” Abstände */
}

/* -------------------------------
   Image Viewer (Lightbox)
-------------------------------- */
.image-viewer {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.image-viewer img {
    max-width: 95%;
    max-height: 95%;
    border-radius: 6px;
    box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

.image-viewer-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 32px;
    color: #fff;
    cursor: pointer;
}

.foto-thumb {
    cursor: zoom-in;
}



/* Video-Wrapper für sauberes Seitenverhältnis */
.scan-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4; /* sehr gut für QR */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

/* Video selbst */
#admin-scan-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hinweistext */
.scan-hint {
    margin-top: 10px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Mobile: fast Vollhöhe */
@media (max-height: 700px) {
    .scan-overlay {
        padding-top: 12px;
    }

    .scan-overlay-inner {
        max-width: 100%;
        border-radius: 12px;
    }

    .scan-video-wrapper {
        aspect-ratio: 1 / 1;
    }
}

/* =========================
   Globaler Scan-Button
========================= */
.scan-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
}

.scan-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.scan-btn:hover {
    background: #1d4ed8;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
}

.form-actions .btn {
    min-height: 44px;
    padding: 0 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;

    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 640px) {
    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* Prüfstatus */
tr.status-ok {
    background-color: #eef8f0;
}

tr.status-warning {
    background-color: #fff6e5;
}

tr.status-danger {
    background-color: #fdeeee;
}

/* sicherstellen, dass Text überall gleich bleibt */
tr.status-ok td,
tr.status-warning td,
tr.status-danger td {
    color: #222;
}


/* =================================================
    HEADER (ENTKOPPELT VON .container)

================================================= */

.frontend-header {
     background: #314157;
    color: #fff;
    border-bottom: 1px solid #314157;
}

/* Eigener Container – NICHT .container */
.header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem;

    display: grid !important;
}

.admin-header {
    position: relative;
    z-index: 2200;
}

/* GRID */
.header-grid {
    gap: 10px;
}

/* Scan */
.scan-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

/* Burger */
.burger-btn {
    font-size: 22px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

/* 🔑 Wichtig: Burger immer über Overlay klickbar */
.burger-wrap {
    position: relative;
    z-index: 2100;
}

.burger-btn {
    position: relative;
    z-index: 2100;
}


/* Suche */
.search-form input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #374151;
    background: #111827;
    color: #fff;
}

@media (min-width: 769px) {
    .header-grid {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas: "scan search user";
        align-items: center;
        column-gap: 16px;
    }

    .scan-wrap {
        grid-area: scan;
    }

    .search-wrap {
        grid-area: search;
        justify-self: center;
        max-width: 420px;
    }

    /* 🔑 EIN rechter Block */
    .header-user-area {
        grid-area: user;
        display: flex;
        align-items: center;
        gap: 12px;
        justify-self: end;
    }
}


/* Mobile */
@media (max-width: 768px) {
    .header-grid {
        grid-template-columns: 1fr auto;
    }

    .scan-wrap {
        grid-column: 1;
        grid-row: 1;
    }

    .burger-wrap {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .search-wrap {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .desktop-only {
        display: none;
    }
}


/* =================================================
   BURGER MENU (RECHTS)
================================================= */

.burger-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 260px;
    background: #fff;
    color: #111;
    padding: 16px;
    transform: translateX(100%);
    transition: transform 0.2s ease;
    z-index: 2000;
}

body.menu-open .burger-menu {
    transform: translateX(0);
}

.burger-menu a {
    display: block;
    padding: 8px 0;
    color: #111;
    text-decoration: none;
} 

/* =========================
   Burger Menü Header
========================= */

.burger-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.burger-close {
    font-size: 22px;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;

    color: #111;            /* Sichtbar auf weiß */
    padding: 4px 6px;
}

.burger-close:hover {
    color: #2563eb;         /* dein Blau */
}

.user-indicator {
    font-size: 0.75rem;
    opacity: 0.75;
    white-space: nowrap;
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1500;
}

body.menu-open .menu-overlay {
    opacity: 1;
    pointer-events: auto;
}

.fest-form {
    margin-top: 15px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-group textarea {
    min-height: 80px;
}

.full-width {
    grid-column: span 2;
}

.form-actions {
    margin-top: 20px;
}

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

/* Mobile */
@media (max-width: 768px) {
    .form-grid,
    .view-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: span 1;
    }
}