/* DATEI: /UG/css/style_2026.css */

/* =========================================
   0. SCHRIFTARTEN LOKAL LADEN
   ========================================= */
@font-face {
    font-family: 'Titillium Web';
    font-style: normal;
    font-weight: 300;
    src: url('../fonts/titillium-web-v19-latin-300.woff2') format('woff2'),
        url('../fonts/titillium-web-v19-latin-300.woff') format('woff');
}

@font-face {
    font-family: 'Titillium Web';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/titillium-web-v19-latin-400.woff2') format('woff2'),
        url('../fonts/titillium-web-v19-latin-400.woff') format('woff');
}

@font-face {
    font-family: 'Titillium Web';
    font-style: normal;
    font-weight: 600;
    src: url('../fonts/titillium-web-v19-latin-600.woff2') format('woff2'),
        url('../fonts/titillium-web-v19-latin-600.woff') format('woff');
}

@font-face {
    font-family: 'Titillium Web';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/titillium-web-v19-latin-700.woff2') format('woff2'),
        url('../fonts/titillium-web-v19-latin-700.woff') format('woff');
}

/* =========================================
   1. CORPORATE DESIGN & VARIABLEN
   ========================================= */
:root {
    /* --- Deine Farbpalette --- */
    --color-dark-blue: #233b77;
    /* Hauptfarbe */
    --color-mid-blue: #4873a2;
    /* Hover */
    --color-teal: #a0cfcd;
    /* Akzente */
    --color-gray: #b1a6a1;
    /* Dezent */
    --color-berry: #5f2042;
    /* Warnungen/Wichtig */

    /* --- Funktionale Zuweisung --- */
    --primary-color: var(--color-dark-blue);
    --primary-hover: var(--color-mid-blue);

    --page-bg: #f4f6f8;
    /* Neutraler Hintergrund */
    --box-bg: #ffffff;
    /* Weiß für Boxen/Karten */

    --text-main: var(--color-dark-blue);
    --text-body: #333333;

    /* --- UI Konstanten --- */
    --border-radius: 6px;
    --shadow: 0 5px 20px rgba(35, 59, 119, 0.15);
    --font-stack: "Titillium Web", sans-serif;

    /* --- NEU: Speziell für Detail-Ansichten / Admin --- */
    --col-sidebar-bg: #f8f9fa;
    /* Heller Grau-Ton für Sidebar */
    --border-col: #e0e0e0;
    /* Rahmenfarbe */
    --input-focus: #e3f2fd;
    /* Helles Blau bei Eingabefokus */
    --col-locked-bg: #fafafa;
    /* Hintergrund gesperrte Felder */
    --col-locked-text: #888888;
    /* Text gesperrte Felder */
}

/* =========================================
   2. BASIS LAYOUT
   ========================================= */
body {
    font-family: var(--font-stack);
    background-color: var(--page-bg);
    background: linear-gradient(135deg, #f4f6f8 0%, #e8eff0 100%);
    color: var(--text-body);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =========================================
   3. HEADER (NEU DEFINIERT)
   ========================================= */
.main-header {
    background: #fff;
    border-top: 5px solid var(--color-berry);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 0;
    width: 100%;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

/* Logo Bereich */
.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 45px;
    width: auto;
    margin-right: 15px;
}

.logo-text h1 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.1;
}

.logo-text small {
    color: var(--color-gray);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

/* User & Logout Bereich */
.user-area {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-greeting {
    color: var(--text-main);
    font-size: 0.9rem;
}

.btn-logout {
    background-color: var(--color-gray);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.btn-logout:hover {
    background-color: var(--color-berry);
}

/* =========================================
   SUBMENU / DROPDOWN LOGIK
   ========================================= */
.has-submenu {
    position: relative;
    cursor: pointer;
}

/* Das unsichtbare Dropdown-Fenster */
.has-submenu .submenu {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    z-index: 1000;
    transform: translateY(10px);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    padding: 5px 0;
}

/* Der Hover-Effekt macht es sichtbar */
.has-submenu:hover .submenu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Die Links im Untermenü */
.submenu a {
    padding: 10px 20px;
    color: #444;
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    transition: background 0.2s;
}

.submenu a:hover {
    background: #f5f6fa;
    color: var(--primary-color);
    font-weight: 600;
}

/* =========================================
   4. LOGIN BOX (Legacy / Startseite)
   ========================================= */
.container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: var(--box-bg);
    padding: 50px 40px;
    width: 100%;
    max-width: 450px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--color-teal);
}

.login-header {
    margin-bottom: 30px;
}

.login-header h2 {
    color: var(--primary-color);
    margin: 0 0 5px 0;
    font-weight: 600;
    font-size: 2.2rem;
    text-transform: uppercase;
}

.login-header p {
    color: var(--color-gray);
    font-size: 1.1rem;
    margin: 0;
    font-weight: 300;
}

/* =========================================
   5. FORMULARE (Allgemein)
   ========================================= */
.form-group {
    margin-bottom: 25px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    text-transform: uppercase;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-family: var(--font-stack);
    background: #fdfdfd;
    transition: all 0.3s ease;
    box-sizing: border-box;
    color: var(--text-body);
}

input:focus {
    border-color: var(--color-teal);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(160, 207, 205, 0.3);
}

/* =========================================
   6. BUTTONS (Standard)
   ========================================= */
.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.2rem;
    font-family: var(--font-stack);
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* =========================================
   7. HINWEISBOXEN & QR
   ========================================= */
.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 400;
    background-color: #fcecf4;
    color: var(--color-berry);
    border-left: 5px solid var(--color-berry);
}

.qr-box {
    background: #ffffff;
    padding: 20px;
    border: 2px dashed var(--color-gray);
    border-radius: var(--border-radius);
    margin-bottom: 25px;
}

.qr-box img {
    max-width: 160px;
    height: auto;
    margin: 10px 0;
}

/* =========================================
   8. FOOTER
   ========================================= */
footer {
    text-align: center;
    padding: 20px;
    color: var(--color-gray);
    font-size: 0.9rem;
}

footer a {
    color: var(--primary-hover);
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

/* ================================================================
   9. ADMIN & DETAIL-ANSICHTEN (Komplett Update)
   ================================================================ */

/* --- Navigation Leiste (Blau) --- */
.nav-bar {
    background-color: var(--primary-color);
    width: 100%;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    padding: 0 20px;
}

.nav-item {
    color: #fff;
    text-decoration: none;
    padding: 15px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    border-bottom: 4px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    border-bottom-color: var(--color-teal);
    background-color: rgba(255, 255, 255, 0.15);
}

/* --- Layout Grid --- */
.detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    max-width: 1400px;
    margin: 25px auto;
    padding: 0 15px;
}

@media (max-width: 950px) {
    .detail-wrapper {
        grid-template-columns: 1fr;
    }
}

/* --- Sidebar Sticky --- */
.sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.sidebar h5 {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

/* --- Karten / Boxen --- */
.card {
    background: var(--box-bg);
    border: 1px solid var(--border-col);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

/* --- Inputs & Read-Only --- */
.editable-cell {
    padding: 5px 0;
}

.editable-cell input,
.editable-cell select,
.editable-cell textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    background: #fff;
    padding: 8px;
    font-size: 0.95rem;
    border-radius: 4px;
    font-family: inherit;
    color: var(--text-body);
}

.editable-cell input:focus,
.editable-cell select:focus {
    border-color: var(--primary-color);
    background: var(--input-focus);
    outline: none;
}

/* --- Read-Only Styling (Ausgegraut) --- */
input:disabled,
select:disabled,
textarea:disabled,
.readonly-look {
    background-color: #e9ecef !important;
    color: #6c757d !important;
    border-color: #ced4da !important;
    cursor: not-allowed;
    opacity: 1;
}

/* --- Speichern Haken (Standardmäßig aus) --- */
.save-indicator {
    display: none;
    color: #27ae60;
    margin-left: 8px;
    font-size: 1.1rem;
    vertical-align: middle;
}

/* --- Buttons in der Sidebar --- */
.btn {
    display: block;
    width: 100%;
    padding: 12px 15px;
    text-align: center;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: 4px;
    margin-bottom: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    box-sizing: border-box;
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    color: white;
}

/* Varianten */
.btn.secondary {
    background-color: #95a5a6;
}

.btn.secondary:hover {
    background-color: #7f8c8d;
}

.btn.alert {
    background-color: var(--color-berry);
}

.btn.alert:hover {
    background-color: #900000;
}

/* --- Badges & Status --- */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
    text-align: center;
}

.badge.alert {
    background-color: var(--color-berry);
}

.badge.locked {
    background-color: #34495e;
    border-left: 4px solid var(--color-berry);
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.badge-versand {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    background-color: #95a5a6;
    /* Standard Grau für Unverschickt */
    color: #fff;
    white-space: nowrap;
}

.badge-versand.sent {
    background-color: #27ae60;
    /* Grün für Verschickt */
}

.badge-versand.partial {
    background-color: #e67e22;
    /* Orange für Teilweise unverschickt */
    color: #fff;
}

.badge-versand.nachversand {
    background-color: var(--color-berry);
    /* Berry/Rot für Nachversand nötig */
}

/* --- Tabellen --- */
table.data-table {
    width: 100%;
    max-width: 600px;
    border-collapse: collapse;
    table-layout: fixed;
}

table.data-table td {
    padding: 8px 5px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    overflow: hidden;
}

table.data-table .label-col {
    width: 180px;
    font-weight: 600;
    color: #555;
}

/* --- Akkordeon Header --- */
.section-trigger {
    background: #444;
    color: #fff;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    margin-top: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.section-trigger:hover {
    background: #333;
}

.section-body {
    display: none;
    padding: 20px;
    border: 1px solid var(--border-col);
    border-top: none;
    background: #fff;
}

.section-body.open {
    display: block;
}

/* Mobile Tweaks */
@media (max-width: 600px) {
    table.data-table {
        max-width: 100%;
    }

    .hide-mobile {
        display: none;
    }

    .header-inner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .nav-container {
        flex-direction: column;
        padding: 0;
    }

    .nav-item {
        width: 100%;
        justify-content: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* ================================================================
   10. STATUS BADGES & BUTTONS 2026 (ZENTRALISIERT)
   ================================================================ */

.status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    margin-top: 3px;
}

/* 1. Sonderfälle (überschreiben alles) */
.status-badge.storno {
    background-color: var(--color-berry);
    color: #fff;
}

.status-badge.waiting {
    background-color: #8e44ad;
    color: #fff;
}

/* 2. Rechnungsstatus (Bestätigung) */
.status-badge.unconfirmed {
    background-color: #f39c12;
    color: #fff;
}

.status-badge.confirmed {
    background-color: #3498db;
    color: #fff;
}

/* 3. Zahlungsstatus */
.status-badge.unpaid {
    background-color: #e67e22;
    color: #fff;
}

.status-badge.partial {
    background-color: #f1c40f;
    color: #333;
    /* Dunkle Schrift für perfekten Kontrast auf Gelb */
}

.status-badge.finished {
    background-color: #27ae60;
    color: #fff;
}

/* Kleine Status-Buttons */
.btn-status {
    width: 100%;
    padding: 3px;
    font-size: 0.75rem;
    font-weight: bold;
    border: 1px solid #ccc;
    background: #f4f4f4;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.btn-status.active {
    background-color: #27ae60;
    color: white;
    border-color: #1e8449;
}

.btn-status.loading {
    opacity: 0.5;
    cursor: wait;
}

.text-muted {
    color: #888;
}

.text-success {
    color: #27ae60;
}

.text-alert {
    color: #c0392b;
}

/* ================================================================
   11. DATATABLES & FILTER BAR (Globales Styling)
   ================================================================ */

/* Container & Tabellen-Hintergrund */
.dataTables_wrapper,
div.dt-container {
    background: #fff;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: 10px;
    font-size: 0.9rem;
    font-family: var(--font-stack);
}

/* Suchfeld und Dropdowns von DataTables */
div.dt-container select.dt-input,
div.dt-container input.dt-input,
.dataTables_wrapper select,
.dataTables_wrapper input {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #fdfdfd;
    font-family: inherit;
}

/* Tabellen-Header */
table.dataTable thead th {
    background-color: var(--primary-color);
    color: #fff;
    border-bottom: none !important;
    padding: 12px 10px;
    font-weight: 600;
}

/* Tabellen-Zellen */
table.dataTable tbody td {
    padding: 10px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

/* Filter Bar (z.B. in der Übersicht) */
.filter-bar {
    background: #f4f4f4;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    /* Bricht auf Handys sauber um */
}

.filter-btn {
    padding: 8px 15px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    color: #333;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-decoration: none;
}

.filter-btn:hover:not(.active) {
    background: #e9ecef;
}

.filter-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    font-weight: bold;
}

/* Spezieller Storno-Button (Inaktiv: Rote Schrift/Rand | Aktiv: Roter Hintergrund) */
.filter-btn.filter-btn-storno {
    border-color: var(--color-berry);
    color: var(--color-berry);
}

.filter-btn.filter-btn-storno:hover:not(.active) {
    background: #fcecf4;
    /* Ein ganz zartes Rot/Berry beim drüberfahren */
}

.filter-btn.filter-btn-storno.active {
    background: var(--color-berry);
    color: #fff;
    border-color: var(--color-berry);
}

/* ================================================================
   12. MODAL OVERLAYS (Global Help) & EDITOR TEMPLATES
   ================================================================ */

/* --- Hilfe Button im Header --- */
.btn-help {
    background: var(--color-teal);
    color: #333;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.2s, background 0.2s;
}

.btn-help:hover {
    background: #8bc1bf;
    /* Leicht dunkleres Teal */
    transform: scale(1.03);
}

/* --- Globales Overlay Modal --- */
.modal-overlay {
    /* Standardmäßig ausgeblendet, wird via JS auf 'flex' gesetzt */
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
    /* Moderner Blur-Effekt für den Hintergrund */
}

.modal-box {
    background: #fff;
    width: 90%;
    max-width: 600px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.modal-content {
    background: #fff;
    padding: 25px 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 650px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    background: var(--primary-color);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--color-teal);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--text-body);
}

.modal-footer {
    padding: 15px 20px;
    background: #f9f9f9;
    text-align: right;
    border-top: 1px solid var(--border-col);
}

/* --- Visueller Editor & Verwaltungs-Listen --- */
.template-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: start;
}

.template-list {
    background: var(--box-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.cat-header {
    background: var(--primary-color);
    color: #fff;
    padding: 10px 15px;
    font-weight: bold;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cat-header.warning {
    background: var(--color-berry);
}

.template-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.85rem;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 8px;
}

.template-item:last-child {
    border-bottom: none;
}

.template-item:hover {
    background: #f5f6fa;
}

.template-item.active {
    background: #eef2f5;
    font-weight: bold;
    border-left: 4px solid var(--primary-color);
}

.editor-card {
    background: var(--box-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: none;
    /* Gesteuert via JS */
    position: sticky;
    top: 20px;
}

.editor-toolbar {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: #f5f6fa;
    border: 1px solid #ccc;
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    justify-content: space-between;
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.format-btn,
.tab-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 5px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.format-btn:hover,
.tab-btn:hover {
    background: #e9ecef;
}

.tab-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.editor-area {
    width: 100%;
    height: 400px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    overflow-y: auto;
    line-height: 1.5;
    font-size: 0.95rem;
    margin-bottom: 15px;
    box-sizing: border-box;
}

#visualEditor {
    font-family: var(--font-stack);
    outline: none;
}

#codeEditor {
    font-family: monospace;
    display: none;
    resize: vertical;
}

/* ================================================================ 
13. PASSWORT-ENTWICKLUNG & INPUT-FEEDBACK 
================================================================ */

/* --- Modernisierte Passwort Input-Group mit Button --- */
.password-group {
    display: flex;
    align-items: stretch; /* Sorgt dafür, dass Input und Button exakt gleich hoch sind */
    width: 100%;
}

.password-group input {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    flex: 1; /* Nimmt den gesamten verfügbenen Platz ein */
}

.btn-toggle-pw {
    background: #e9ecef;
    color: #555;
    border: 2px solid #e0e0e0;
    border-left: none; /* Verhindert doppelten Rahmen zwischen Input und Button */
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    padding: 0 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.btn-toggle-pw:hover {
    background: #dee2e6;
    color: var(--primary-color);
}

/* Wenn das Passwort aufgedeckt ist (Klasse .active via JS) */
.btn-toggle-pw.active {
    background: var(--input-focus);
    color: var(--color-teal);
    border-color: var(--color-teal);
}

/* Korrektur für die Position des Validierungs-Hakens (✔ / ❌) */
.match-indicator {
    position: absolute;
    right: 65px; /* Leicht nach links verschoben, um nicht mit dem neuen Button zu kollidieren */
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    font-weight: bold;
    z-index: 2;
}

/* --- Checkout Dreispalter (Straße, Nr, Zusatz) --- */
.woocommerce-checkout .form-row-third {
    width: 30%;
    float: left;
    margin-right: 5%;
}

.woocommerce-checkout .form-row-third.form-row-last {
    margin-right: 0;
}

@media (max-width: 768px) {
    .woocommerce-checkout .form-row-third {
        width: 100%;
        float: none;
        margin-right: 0;
    }
}

/* --- Anzahl im Woocommerce-Warenkorb ausblenden --- */
.woocommerce-cart table.cart th.product-quantity,
.woocommerce-cart table.cart td.product-quantity {
    display: none !important;
}

/* ================================================================
   14. PROMINENTE SUCHLEISTE & BADGE-FILTER (OPTIMIERT & KOMPAKT)
   ================================================================ */
.hero-search-box {
    position: relative;
    margin-bottom: 15px;
    width: 100%;
}

.hero-search-box input[type="text"] {
    width: 100%;
    padding: 12px 18px 12px 46px !important;
    font-size: 1.1rem !important;
    border: 2px solid var(--color-teal) !important;
    border-radius: var(--border-radius) !important;
    background: #ffffff !important;
    box-shadow: 0 3px 10px rgba(35, 59, 119, 0.08) !important;
    transition: all 0.25s ease-in-out !important;
    color: var(--text-body) !important;
}

.hero-search-box input[type="text"]:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 14px rgba(35, 59, 119, 0.18) !important;
    outline: none !important;
}

.hero-search-box .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: var(--primary-color);
    pointer-events: none;
}

/* Filter Badges Leiste */
.filter-badge-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-badge-btn {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    background: #e9ecef;
    color: #495057;
    transition: all 0.2s ease-in-out;
    user-select: none;
}

.filter-badge-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.filter-badge-btn.active {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    border-color: #333;
}

.filter-badge-btn[data-type="ALL"].active {
    background: var(--primary-color);
    color: #fff;
}

.filter-badge-btn[data-type="MKT"].active {
    background: #2980b9;
    color: #fff;
}

.filter-badge-btn[data-type="MVT"].active {
    background: #27ae60;
    color: #fff;
}

.filter-badge-btn[data-type="MKT+MVT"].active {
    background: #8e44ad;
    color: #fff;
}

/* ================================================================
   15. LOCAL DATATABLES PROCESSING OVERLAY (Mit sauberem Ausblenden)
   ================================================================ */
.dataTables_wrapper,
div.dt-container {
    position: relative !important;
}

/* Platzierung exakt über dem Tabellenbereich */
div.dt-container div.dt-processing,
.dataTables_processing {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(2px);
    z-index: 100;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: var(--border-radius);
}

/* Nur wenn DataTables das Element einschaltet, erzwingen wir Flexbox */
div.dt-container div.dt-processing[style*="display: block"],
.dataTables_processing[style*="display: block"] {
    display: flex !important;
}

/* Entfernt Standardtext */
div.dt-container div.dt-processing>div:not(.dt-spinner),
.dataTables_processing>div:not(.dt-spinner) {
    display: none !important;
}

/* Spinner & Nachricht */
div.dt-container div.dt-processing::before,
.dataTables_processing::before {
    content: "";
    width: 36px;
    height: 36px;
    border: 3px solid var(--color-teal);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: dt-local-spin 0.7s linear infinite;
    display: block;
    margin-bottom: 8px;
}

div.dt-container div.dt-processing::after,
.dataTables_processing::after {
    content: "Suche läuft, bitte warten...";
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-stack);
    background: #ffffff;
    padding: 6px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(35, 59, 119, 0.15);
    border: 1px solid var(--color-teal);
}

@keyframes dt-local-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}