/*

 * wiesenplaner.css

 * 

 * Zentrale CSS-Datei für die Hundewiesen-Planer-App

 * Angepasst an Hestia-Child-Theme Farbschema

 * 

 * Struktur:

 * 1. Reset & Basis-Styles

 * 2. Layout & Container

 * 3. Navigation & Tabs

 * 4. Buttons

 * 5. Formulare

 * 6. Tabellen

 * 7. Kalender

 * 8. Modals

 * 9. Responsive Design

 */



/* ========================================

   1. RESET & BASIS-STYLES

   ======================================== */



/* Farbvariablen aus Hestia-Child übernehmen */

#planer-app-container {

    --primary-bg: #0a5408;        /* Dunkles Grün */

    --primary-color: #e8dbcb;      /* Helles Beige für Text auf Grün */

    --primary-bg-hover: #094507;   /* Dunkleres Grün für Hover */

    --surface-bg: #f5f5dc;         /* Beige nur für Seitenränder (Rahmen um die weiße Fläche) */

    --text-color-dark: #333333;    /* Dunkler Text auf hellem Grund */

    --border-color: #d4c5b5;       /* Beige Border */

    --shadow-light: rgba(10, 84, 8, 0.08);

    --shadow-medium: rgba(10, 84, 8, 0.15);

    /* Kalender (weiche Flächen + dezentes Gitter) */
    --calendar-surface: #f5fbf2;
    /* Gitter: weich, nicht zu dominant */
    --calendar-grid-border: #d4dbe5;
    --calendar-slot-base-border: #cad3df;

    --calendar-free: #d9eee2;
    --calendar-free-border: #8fb89e;
    --calendar-free-hover: #c8e5d4;
    --calendar-free-text: #103d24;

    --calendar-booked-own: #b8d0f2;
    --calendar-booked-own-border: #6b9ad6;
    --calendar-booked-own-text: #0a2540;

    --calendar-booked-other: #cfd8e8;
    --calendar-booked-other-border: #8a96ab;
    --calendar-booked-other-text: #1a2333;

    --calendar-blocked: #f3e2e5;
    --calendar-blocked-border: #c89aa0;
    --calendar-blocked-text: #4a1f26;
    --calendar-blocked-recurring: #f3e2e5;
    --calendar-blocked-recurring-edge: #a0646a;

    --calendar-past: #e0e7f0;
    --calendar-past-border: #aab6c8;
    --calendar-past-text: #2a3444;

    --calendar-past-mixed-bg: #d8dfea;
    --calendar-past-mixed-border: #97a3b8;
    --calendar-past-mixed-text: #1e2633;

    --calendar-selected-outline: #d4a85c;

    --calendar-today-cell-bg: #fff4e6;

    /* Einheitliche Typo für Buchungsnamen (Overlay + kurz SSR-Label) */

    --hw-calendar-block-name-size: 12px;

    --hw-calendar-block-name-weight: 600;

}



/* Box-Sizing für alle Elemente in der App */

#planer-app-container *,

#planer-app-container *::before,

#planer-app-container *::after {

    box-sizing: border-box;

}



/* Reset für Links in der App */

#planer-app-container a {

    text-decoration: none;

    color: inherit;

}



/* Hauptcontainer der App – volle Breite bis zu den markierten Kanten (ca. 96% Viewport) */

body.page-template-page-wiesenplaner-php {

    background-color: #f5f5dc;

}

body.page-template-page-wiesenplaner-php .main,

body.page-template-page-wiesenplaner-php [class*="main"] {

    max-width: 100% !important;

}

.page-template-wiesenplaner.blog-post,

body.page-template-page-wiesenplaner-php .blog-post {

    padding-top: 20px;

    padding-bottom: 20px;

    padding-left: clamp(12px, 1.5vw, 24px);

    padding-right: clamp(12px, 1.5vw, 24px);

    max-width: 96vw !important;

    width: 96vw !important;

    margin-left: auto !important;

    margin-right: auto !important;

    box-sizing: border-box;

    background-color: #f5f5dc;

}

.page-template-wiesenplaner #planer-app-container,

body.page-template-page-wiesenplaner-php #planer-app-container {

    max-width: 100% !important;

    width: 100% !important;

    margin-left: auto !important;

    margin-right: auto !important;

    padding-left: 0 !important;

    padding-right: 0 !important;

}

/* Keine Linien/Borders zwischen Nav und Kalender */

#planer-app-container .hw-app-wrap,

#planer-app-container .hw-calendar-container,

#planer-app-container .hw-calendar-wrap {

    border: none !important;

    box-shadow: none !important;

}

#planer-app-container .hw-calendar-container.hw-calendar-loading {

    opacity: 0.7;

    pointer-events: none;

}

/* Basis-Schriftart für die App - wie Hestia-Child */

#planer-app-container {

    font-family: 'Open Sans', sans-serif;

    font-size: 15px;

    line-height: 1.6;

    color: var(--text-color-dark);

    background-color: #f5f5dc;

    min-height: calc(100vh - 180px);

}



/* ========================================

   2. LAYOUT & CONTAINER

   ======================================== */



/* Message-Bereich */

#planer-app-container .app-message-area {

    margin-bottom: 20px;

}



#planer-app-container .app-message {

    padding: 12px 20px;

    border: 1px solid transparent;

    border-radius: 6px;

    text-align: center;

    margin: 0 auto 15px auto;

    max-width: 600px;

    font-weight: 500;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    animation: slideInDown 0.3s ease-out;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);

}



#planer-app-container .app-message::before {

    content: '';

    width: 20px;

    height: 20px;

    flex-shrink: 0;

    background-size: contain;

    background-repeat: no-repeat;

    background-position: center;

}



#planer-app-container .app-message.success {

    color: #065f46;

    background-color: #d1fae5;

    border-color: #10b981;

}



#planer-app-container .app-message.success::before {

    content: '✓';

    font-size: 18px;

    font-weight: bold;

    color: #10b981;

}



#planer-app-container .app-message.error {

    color: #991b1b;

    background-color: #fee2e2;

    border-color: #ef4444;

}



#planer-app-container .app-message.error::before {

    content: '✕';

    font-size: 18px;

    font-weight: bold;

    color: #ef4444;

}



#planer-app-container .app-message.info {

    color: #0a5408;

    background-color: #eef5ec;

    border-color: #7fb87a;

}



#planer-app-container .app-message.info::before {

    content: 'ℹ';

    font-size: 18px;

    font-weight: bold;

    color: #0a5408;

}



@keyframes slideInDown {

    from {

        opacity: 0;

        transform: translateY(-10px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}



/* Cards für verschiedene Bereiche - Hestia-Child Style */

#planer-app-container .card {

    background: white;

    border-radius: 10px;

    padding: 24px;

    margin-bottom: 20px;

    box-shadow: 0 2px 8px var(--shadow-light);

    border: 1px solid var(--border-color);

}



/* Überschriften – einheitliche Größen (Kalender, Admin, Benutzer, Root) */

#planer-app-container h1 {

    font-size: 1.4375rem;

    font-weight: 600;

    color: var(--primary-bg);

    margin-bottom: 1rem;

    font-family: 'Open Sans', sans-serif;

}

#planer-app-container h2 {

    font-size: 1.0625rem;

    font-weight: 600;

    color: var(--primary-bg);

    margin-top: 1.5rem;

    margin-bottom: 0.75rem;

    border-bottom: 2px solid var(--border-color);

    padding-bottom: 0.4rem;

}

#planer-app-container h3 {

    font-size: 1.25rem;

    font-weight: 600;

    color: var(--text-color-dark);

    margin-top: 1.25rem;

    margin-bottom: 0.5rem;

}



/* ========================================

   3. NAVIGATION & TABS

   ======================================== */



/* Haupt-Navigation - Hestia-Child Style */

#planer-app-container .app-nav {

    background: var(--primary-bg);

    padding: 12px 20px;

    margin-bottom: 20px;

    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 15px;

    border-radius: 8px;

    box-shadow: 0 2px 6px var(--shadow-light);

}



/* Linksbündig: "Angemeldet als" - immer erste Zeile */

#planer-app-container .app-nav .nav-left {

    display: flex;

    justify-content: flex-start;

    align-items: center;

    flex-shrink: 0;

    order: 1;

}



/* Rechtsbündig: "Abmelden" - immer erste Zeile */

#planer-app-container .app-nav .nav-right {

    display: flex;

    justify-content: flex-end;

    align-items: center;

    flex-shrink: 0;

    order: 3;

    margin-left: auto;

}



/* Zentriert: Bereiche (Root, Admin, Benutzer) - zwischen links und rechts */

#planer-app-container .app-nav .nav-center {

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 15px;

    flex-wrap: wrap;

    flex: 1 1 auto;

    order: 2;

    min-width: 0;

}



#planer-app-container .app-nav a {

    color: var(--primary-color);

    text-decoration: none;

    padding: 5px 10px;

    font-size: 15px;

    font-weight: 500;

    transition: all 0.3s ease;

    border-radius: 4px;

    white-space: nowrap;

}



#planer-app-container .app-nav a:hover {

    background: var(--primary-bg-hover);

    color: white;

    text-decoration: none;

}



/* Admin/Root Subnavigation - Modernes Tab-Design */

.page-template-wiesenplaner #planer-app-container .admin-subnav {

    display: flex;

    gap: 0;

    margin: 15px 0 30px 0;

    border-bottom: 1px solid #d4c5b5;

    position: relative;

}



.page-template-wiesenplaner #planer-app-container .admin-subnav .btn {

    min-width: auto;

    padding: 8px 16px 9px 16px;

    margin: 0;

    margin-bottom: -1px;

    background: transparent;

    border: 1px solid transparent;

    border-bottom: 2px solid transparent;

    border-radius: 0;

    color: #6b7280;

    font-size: 13.5px;

    font-weight: 400;

    text-transform: none;

    letter-spacing: 0;

    text-align: center;

    box-shadow: none;

    transition: all 0.15s ease;

}



.page-template-wiesenplaner #planer-app-container .admin-subnav .btn:hover {

    color: #374151;

    background: #f9fafb;

    border-bottom-color: var(--border-color);

}



.page-template-wiesenplaner #planer-app-container .admin-subnav .btn.current-page {

    color: #0a5408;

    font-weight: 500;

    background: white;

    border-color: #d4c5b5;

    border-bottom: 2px solid #0a5408;

    pointer-events: none;

}



/* User Info in Navigation */

#planer-app-container .app-nav .user-inline {

    color: var(--primary-color);

    font-size: 0.95em;

    display: inline-block;

}



#planer-app-container .app-nav .user-inline .username {

    font-weight: 600;

    color: var(--primary-color);

}



#planer-app-container .app-nav .user-inline a {

    color: var(--primary-color);

    text-decoration: none;

}



#planer-app-container .app-nav .user-inline a:hover {

    color: #ffffff;

    text-decoration: underline;

}



/* Kalendernavigation - unter der Bereichsnavigation */

#planer-app-container .calendar-nav {

    background: #ffffff;

    padding: 6px 14px;

    margin: 6px 0;

    border-radius: 6px;

    box-shadow: 0 1px 3px rgba(0,0,0,0.1);

}



#planer-app-container .calendar-nav-container {

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 8px;

    flex-wrap: wrap;

}



/* ========================================

   4. BUTTONS - MIT MAXIMALER SPEZIFITÄT

   ======================================== */



/* Reset ALLER Button-Styles vom Child-Theme - Scroll-to-Top + Complianz ausgenommen (wie Rest der Website) */

body.page-template-wiesenplaner #planer-app-container button:not(.hestia-scroll-to-top):not(.cmplz-btn):not(.cmplz-manage-consent):not(.hw-btn),

body.page-template-wiesenplaner #planer-app-container .btn:not(.hestia-scroll-to-top):not(.cmplz-btn):not(.cmplz-manage-consent),

body.page-template-wiesenplaner #planer-app-container a.btn:not(.hestia-scroll-to-top):not(.cmplz-btn):not(.cmplz-manage-consent),

body.page-template-wiesenplaner #planer-app-container input[type="button"]:not(.hestia-scroll-to-top):not(.cmplz-btn):not(.cmplz-manage-consent),

body.page-template-wiesenplaner #planer-app-container input[type="submit"]:not(.hestia-scroll-to-top):not(.cmplz-btn):not(.cmplz-manage-consent),

body.page-template-wiesenplaner #planer-app-container .button:not(.hestia-scroll-to-top):not(.cmplz-btn):not(.cmplz-manage-consent) {

    /* Reset Child-Theme Styles - Höhere Spezifität durch body + template-class */

    all: unset;

    

    /* Dann unsere Styles anwenden */

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 5px;

    padding: 5px 14px;

    font-size: 13px;

    line-height: 1.35;

    border-radius: 6px;

    font-weight: 500;

    transition: background-color 0.18s ease, color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease;

    cursor: pointer;

    text-decoration: none;

    border: 1px solid #d1d5db;

    text-align: center;

    background: #ffffff;

    color: #1f2937;

    font-family: inherit;

    margin: 0;

    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);

    text-transform: none;

    letter-spacing: normal;

    min-width: auto;

    max-width: none;

    height: auto;

    min-height: auto;

    vertical-align: middle;

}



/* Primary Button - Nur für Hauptnavigation */

body.page-template-wiesenplaner #planer-app-container .btn-primary,

body.page-template-wiesenplaner #planer-app-container .btn.btn-primary,

body.page-template-wiesenplaner #planer-app-container button.btn-primary {

    background-color: var(--primary-bg);

    color: var(--primary-color);

    border: 1px solid var(--primary-bg);

    padding: 6px 16px;

    font-size: 13.5px;

    box-shadow: 0 1px 3px var(--shadow-light);

    font-weight: 500;

    text-transform: none;

    letter-spacing: normal;

    border-radius: 6px;

}



body.page-template-wiesenplaner #planer-app-container .btn-primary:hover,

body.page-template-wiesenplaner #planer-app-container .btn.btn-primary:hover,

body.page-template-wiesenplaner #planer-app-container button.btn-primary:hover {

    background-color: var(--primary-bg-hover);

    border-color: var(--primary-bg-hover);

    color: white;

    box-shadow: 0 2px 5px var(--shadow-medium);

    transform: translateY(-1px);

}



/* Secondary Button - Neutrale Aktionen */

body.page-template-wiesenplaner #planer-app-container .btn-secondary,

body.page-template-wiesenplaner #planer-app-container .btn.btn-secondary,

body.page-template-wiesenplaner #planer-app-container button.btn-secondary {

    background-color: #f8f9fa;

    color: #4b5563;

    border: 1px solid #d1d5db;

    box-shadow: none;

    padding: 5px 12px;

    font-size: 13px;

    font-weight: 400;

    text-transform: none;

    letter-spacing: normal;

}



body.page-template-wiesenplaner #planer-app-container .btn-secondary:hover,

body.page-template-wiesenplaner #planer-app-container .btn.btn-secondary:hover,

body.page-template-wiesenplaner #planer-app-container button.btn-secondary:hover {

    background-color: #d4c5b5;

    color: #374151;

    border-color: #b0a896;

    transform: none;

}



/* Success Button - Positive Aktionen (Speichern, Hinzufügen) */

body.page-template-wiesenplaner #planer-app-container .btn-success,

body.page-template-wiesenplaner #planer-app-container .btn.btn-success,

body.page-template-wiesenplaner #planer-app-container button.btn-success,

body.page-template-wiesenplaner #planer-app-container a.btn-success {

    background-color: #eef5ec !important;

    color: #0a5408 !important;

    border: 1px solid #b8ccb0 !important;

    box-shadow: 0 1px 2px rgba(15, 81, 50, 0.18);

}



body.page-template-wiesenplaner #planer-app-container .btn-success:hover,

body.page-template-wiesenplaner #planer-app-container .btn.btn-success:hover,

body.page-template-wiesenplaner #planer-app-container button.btn-success:hover,

body.page-template-wiesenplaner #planer-app-container a.btn-success:hover {

    background-color: #d8e8d4 !important;

    border-color: #9ccc96 !important;

    transform: translateY(-1px);

}



/* Confirm Button - explizit für "Ja" */

body.page-template-wiesenplaner #planer-app-container .btn-confirm,

body.page-template-wiesenplaner #planer-app-container .btn.btn-confirm,

body.page-template-wiesenplaner #planer-app-container button.btn-confirm {

    background-color: #0a5408;

    color: #fefce8;

    border: 1px solid #063b05;

    font-weight: 500;

    padding: 5px 14px;

    font-size: 13px;

    letter-spacing: 0.01em;

    text-transform: none;

}



body.page-template-wiesenplaner #planer-app-container .btn-confirm:hover,

body.page-template-wiesenplaner #planer-app-container .btn.btn-confirm:hover,

body.page-template-wiesenplaner #planer-app-container button.btn-confirm:hover {

    background-color: #094507;

    border-color: #052d04;

    color: #ffffff;

    transform: translateY(-1px);

}



/* Deny Button - explizit für "Nein" */

body.page-template-wiesenplaner #planer-app-container .btn-deny,

body.page-template-wiesenplaner #planer-app-container .btn.btn-deny,

body.page-template-wiesenplaner #planer-app-container button.btn-deny {

    background-color: #fee2e2;

    color: #b91c1c;

    border: 1px solid #fca5a5;

    font-weight: 500;

    padding: 5px 14px;

    font-size: 13px;

    letter-spacing: 0.01em;

    text-transform: none;

}



body.page-template-wiesenplaner #planer-app-container .btn-deny:hover,

body.page-template-wiesenplaner #planer-app-container .btn.btn-deny:hover,

body.page-template-wiesenplaner #planer-app-container button.btn-deny:hover {

    background-color: #fecaca;

    color: #991b1b;

    border-color: #f87171;

    transform: translateY(-1px);

}



/* Danger Button - Negative Aktionen (Löschen, Entziehen) */

body.page-template-wiesenplaner #planer-app-container .btn-danger,

body.page-template-wiesenplaner #planer-app-container .btn.btn-danger,

body.page-template-wiesenplaner #planer-app-container button.btn-danger,

body.page-template-wiesenplaner #planer-app-container a.btn-danger {

    background-color: #fde2e1 !important;

    color: #7f1d1d !important;

    border: 1px solid #f5b5b0 !important;

    box-shadow: 0 1px 2px rgba(127, 29, 29, 0.18);

}



body.page-template-wiesenplaner #planer-app-container .btn-danger:hover,

body.page-template-wiesenplaner #planer-app-container .btn.btn-danger:hover,

body.page-template-wiesenplaner #planer-app-container button.btn-danger:hover,

body.page-template-wiesenplaner #planer-app-container a.btn-danger:hover {

    background-color: #fccdcb !important;

    border-color: #f18c86 !important;

    transform: translateY(-1px);

}



/* Warning Button - Ändern/Bearbeiten Aktionen */

body.page-template-wiesenplaner #planer-app-container .btn-warning,

body.page-template-wiesenplaner #planer-app-container .btn.btn-warning,

body.page-template-wiesenplaner #planer-app-container button.btn-warning,

body.page-template-wiesenplaner #planer-app-container a.btn-warning {

    background-color: #fff4d6 !important;

    color: #92400e !important;

    border: 1px solid #f8d78c !important;

    box-shadow: 0 1px 2px rgba(146, 64, 14, 0.15);

}



body.page-template-wiesenplaner #planer-app-container .btn-warning:hover,

body.page-template-wiesenplaner #planer-app-container .btn.btn-warning:hover,

body.page-template-wiesenplaner #planer-app-container button.btn-warning:hover,

body.page-template-wiesenplaner #planer-app-container a.btn-warning:hover {

    background-color: #feeabe !important;

    border-color: #f2bd66 !important;

    transform: translateY(-1px);

}



/* Info Button - Informative/Neutrale Aktionen */

body.page-template-wiesenplaner #planer-app-container .btn-info,

body.page-template-wiesenplaner #planer-app-container .btn.btn-info,

body.page-template-wiesenplaner #planer-app-container button.btn-info,

body.page-template-wiesenplaner #planer-app-container a.btn-info {

    background-color: #eef5ec !important;

    color: #0a5408 !important;

    border: 1px solid #b8ccb0 !important;

    box-shadow: 0 1px 2px rgba(29, 78, 216, 0.18);

}



body.page-template-wiesenplaner #planer-app-container .btn-info:hover,

body.page-template-wiesenplaner #planer-app-container .btn.btn-info:hover,

body.page-template-wiesenplaner #planer-app-container button.btn-info:hover,

body.page-template-wiesenplaner #planer-app-container a.btn-info:hover {

    background-color: #d8e8d4 !important;

    border-color: #7fb87a !important;

    transform: translateY(-1px);

}



/* Navigation Buttons (Kalender) */

body.page-template-wiesenplaner #planer-app-container .nav-button {

    display: inline-block;

    padding: 4px 10px;

    font-size: 13px;

    font-weight: 500;

    text-decoration: none;

    text-transform: none;

    border-radius: 6px;

    transition: all 0.2s ease;

    background-color: #e2f4dc;

    color: #0a5408;

    border: 1px solid #8fbc84;

}



body.page-template-wiesenplaner #planer-app-container .nav-button:hover {

    background-color: #cdecc4;

    color: #094507;

    border-color: #6ba366;

}



body.page-template-wiesenplaner #planer-app-container .nav-button.disabled {

    opacity: 0.5;

    cursor: not-allowed;

    pointer-events: none;

}



/* Kompaktere Buttons in Tabellen */

#planer-app-container table .btn,

#planer-app-container table button,

#planer-app-container table a.btn {

    padding: 4px 12px !important;

    font-size: 12.5px !important;

    margin: 3px 5px 3px 0 !important;

    font-weight: 500 !important;

    line-height: 1.5 !important;

    white-space: nowrap !important;

    border-radius: 6px !important;

    border-width: 1px !important;

    border-style: solid !important;

    text-transform: none !important;

    letter-spacing: normal !important;

    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;

}



#planer-app-container .wp-list-table .btn-info,

#planer-app-container .wp-list-table .btn.btn-info,

#planer-app-container .wp-list-table button.btn-info,

#planer-app-container .wp-list-table a.btn-info {

    background-color: #eef5ec !important;

    color: #0a5408 !important;

    border-color: #b8ccb0 !important;

}



#planer-app-container .wp-list-table .btn-info:hover {

    background-color: #d8e8d4 !important;

    border-color: #7fb87a !important;

    color: #094507 !important;

}



#planer-app-container .wp-list-table .btn-success,

#planer-app-container .wp-list-table .btn.btn-success,

#planer-app-container .wp-list-table button.btn-success,

#planer-app-container .wp-list-table a.btn-success {

    background-color: #eef5ec !important;

    color: #0a5408 !important;

    border-color: #b8ccb0 !important;

}



#planer-app-container .wp-list-table .btn-success:hover {

    background-color: #d8e8d4 !important;

    border-color: #9ccc96 !important;

}



#planer-app-container .wp-list-table .btn-danger,

#planer-app-container .wp-list-table .btn.btn-danger,

#planer-app-container .wp-list-table button.btn-danger,

#planer-app-container .wp-list-table a.btn-danger {

    background-color: #fde2e1 !important;

    color: #7f1d1d !important;

    border-color: #f5b5b0 !important;

}



#planer-app-container .wp-list-table .btn-danger:hover {

    background-color: #fccdcb !important;

    border-color: #f18c86 !important;

    color: #641212 !important;

}



#planer-app-container .wp-list-table .btn-warning,

#planer-app-container .wp-list-table .btn.btn-warning,

#planer-app-container .wp-list-table button.btn-warning,

#planer-app-container .wp-list-table a.btn-warning {

    background-color: #fff4d6 !important;

    color: #92400e !important;

    border-color: #f8d78c !important;

}



#planer-app-container .wp-list-table .btn-warning:hover {

    background-color: #feeabe !important;

    border-color: #f2bd66 !important;

}



#planer-app-container .temp-pass,

#planer-app-container .status-temp-pw,

#planer-app-container .status-temp-pw .temp-pass {

    color: #b91c1c;

    font-weight: 700;

}



/* ========================================

   5. FORMULARE

   ======================================== */



#planer-app-container input[type="text"],

#planer-app-container input[type="email"],

#planer-app-container input[type="password"],

#planer-app-container input[type="date"],

#planer-app-container input[type="time"],

#planer-app-container input[type="number"],

#planer-app-container select,

#planer-app-container textarea {

    width: 100%;

    padding: 8px 12px;

    border: 1px solid #d1d5db;

    border-radius: 4px;

    font-size: 14px;

    transition: border-color 0.15s ease;

    box-sizing: border-box;

}



#planer-app-container input:focus,

#planer-app-container select:focus,

#planer-app-container textarea:focus {

    outline: none;

    border-color: #0a5408;

    box-shadow: 0 0 0 3px rgba(10, 84, 8, 0.15);

}



#planer-app-container label {

    display: block;

    margin-bottom: 5px;

    font-weight: 500;

    color: #374151;

    font-size: 1em;

}

/* Feld-Labels (Text/Datum/Zeit/Select) bewusst etwas größer für bessere Lesbarkeit */
#planer-app-container .hw-field:not(.hw-field-inline) > label {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
}



/* Registrierungsseite / Infobox: kein Gelb – neutraler Hintergrund */
#planer-app-container .hw-info-box,
#planer-app-container .hw-card .hw-info-box {
    background-color: #faf8f4 !important;
    border: 1px solid #d4c5b5;
    border-radius: 8px;
    padding: 16px 20px;
    color: #4a3f32;
}
#planer-app-container .hw-card.hw-card-narrow {
    background-color: #ffffff !important;
}

#planer-app-container .form-group {

    margin-bottom: 15px;

}



/* ========================================

   6. TABELLEN - Hestia-Child Style

   ======================================== */



#planer-app-container table:not(.calendar):not(.hw-calendar) {

    width: 100%;

    border-collapse: separate;

    border-spacing: 0;

    background: white;

    border-radius: 10px;

    overflow: hidden;

    box-shadow: 0 2px 8px var(--shadow-light);

    border: 1px solid var(--border-color);

}



#planer-app-container table:not(.calendar):not(.hw-calendar) thead {

    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--primary-bg-hover) 100%);

}



#planer-app-container table:not(.calendar):not(.hw-calendar) th {

    padding: 14px 16px;

    text-align: left;

    font-weight: 600;

    font-size: 14px;

    color: var(--primary-color);

    border-bottom: 2px solid var(--border-color);

    border-right: 1px solid rgba(255, 255, 255, 0.5);

    text-transform: uppercase;

    letter-spacing: 0.5px;

}

#planer-app-container table:not(.calendar):not(.hw-calendar) th:last-child {

    border-right: none;

}



#planer-app-container table:not(.calendar):not(.hw-calendar) td {

    padding: 12px 16px;

    font-size: 14px;

    color: #4b5563;

    border-bottom: 1px solid #f3f4f6;

    border-right: 1px solid #c4c8cc;

}

#planer-app-container table:not(.calendar):not(.hw-calendar) td:last-child {

    border-right: none;

}



#planer-app-container .status-temp-pw {

    color: #b91c1c;

    font-weight: 700;

    cursor: pointer;

}



/* Zebrastreifen */

#planer-app-container table:not(.calendar):not(.hw-calendar) tbody tr:nth-child(even) {

    background-color: #fafafa;

}



/* Hover-Effekt */

#planer-app-container table:not(.calendar):not(.hw-calendar) tbody tr {

    transition: background-color 0.15s ease;

}



#planer-app-container table:not(.calendar):not(.hw-calendar) tbody tr:hover {

    background-color: #f5f0e8;

}



/* Letzte Zeile ohne Border */

#planer-app-container table:not(.calendar):not(.hw-calendar) tbody tr:last-child td {

    border-bottom: none;

}


/* Root: Aktivitätslog – Aktion-Spalte in gleicher Schriftart wie Seite (Deutsch) */

#planer-app-container .hw-log-table td.hw-log-action {

    font-family: 'Open Sans', sans-serif;

}

#planer-app-container .hw-log-table td.hw-log-actions {

    white-space: nowrap;

    vertical-align: middle;

    /* Button + Form nebeneinander: gleiche Höhe (kein Baseline-Versatz wie bei inline-block) */
    display: flex;

    align-items: center;

    flex-wrap: nowrap;

    gap: 0.35rem;

}

#planer-app-container .hw-log-table td.hw-log-actions .hw-inline-form {

    display: inline-flex;

    align-items: center;

    margin: 0;

}

#planer-app-container .hw-log-table th.hw-log-actions-th {

    white-space: nowrap;

}


/* Root-Log: klickbare Spaltenüberschriften für Sortierung (Pfeil direkt im Titeltext) */

#planer-app-container .hw-log-table th a.hw-log-sort,
#planer-app-container .hw-log-table th a.hw-log-sort .hw-log-sort-label,
#planer-app-container .hw-log-table th a.hw-log-sort .hw-log-sort-arrow {

    cursor: pointer !important;

}

#planer-app-container .hw-log-table .hw-log-sort {

    color: inherit;

    text-decoration: none;

    display: inline-block;

    white-space: nowrap;

    line-height: 1.2;

    user-select: none;

    -webkit-user-select: none;

}

#planer-app-container .hw-log-table .hw-log-sort:hover {

    text-decoration: none;

}

#planer-app-container .hw-log-table .hw-log-sort .hw-log-sort-label {

    white-space: nowrap;

}

#planer-app-container .hw-log-table .hw-log-sort .hw-log-sort-arrow {

    display: inline;

    margin-left: 0.28em;

    font-weight: 700;

    vertical-align: baseline;

}

#planer-app-container .hw-log-table .hw-log-sort .hw-log-sort-arrow.is-active {

    color: rgba(255, 255, 255, 0.95);

    background: rgba(34, 197, 94, 0.45);

    border-radius: 3px;

    padding: 0 0.15em;

}

#planer-app-container .hw-log-table .hw-log-sort .hw-log-sort-arrow.is-inactive {

    color: transparent;

}

/* Aktivitätslog-Tabelle: horizontal scrollen (Drag + Scrollbalken) */
#planer-app-container .hw-log-table-scroll {
    overflow-x: auto;
    overflow-y: visible;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

#planer-app-container .hw-log-table-scroll .hw-log-table tbody {
    cursor: grab;
}

#planer-app-container .hw-log-table-scroll.hw-log-table-scroll--dragging .hw-log-table tbody {
    cursor: grabbing;
    user-select: none;
}

#planer-app-container .hw-log-table-scroll .hw-log-table {
    width: max-content;
    min-width: 100%;
}


#planer-app-container .hw-card-table-wrap > .hw-log-pagination-wrap {
    display: block;
    padding: 6px 0;
}

#planer-app-container .hw-log-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 0;
}
/* Pagination: gleicher Stil wie Kalender Vorheriger/Nächster (.hw-nav-btn); Klasse hw-log-page bleibt für JS (admin.js) */
#planer-app-container .hw-log-pagination .hw-log-pagination-info {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    color: #6b7280;
}

/* ========================================

   7. KALENDER

   ======================================== */



#planer-app-container .calendar-container {

    overflow-x: auto;

    margin: 20px 0;

}



#planer-app-container .calendar {

    width: 100%;

    min-width: 700px;

    border-collapse: collapse;

    background: var(--calendar-surface);

    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);

}



#planer-app-container .calendar th {

    background: var(--calendar-surface);

    padding: 10px;

    font-weight: 600;

    text-align: center;

    border: 1px solid var(--calendar-grid-border);

    font-size: 14px;

}



#planer-app-container .calendar td {

    border: 1px solid var(--calendar-grid-border);

    padding: 8px;

    text-align: center;

    cursor: pointer;

    transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, filter 0.15s ease;

    position: relative;

}



#planer-app-container .calendar td.time-slot {

    border: 1px solid var(--calendar-slot-base-border);

    background-color: #ffffff;

    color: #1e293b;

}



#planer-app-container .calendar td.time-label {

    font-weight: 600;

    color: #374151;

    background-color: var(--calendar-surface);

    text-align: right;

    padding-right: 10px;

}



/* STATUS: frei */
#planer-app-container .calendar td.time-slot.free {

    background-color: var(--calendar-free);
    --hw-cell-cover: var(--calendar-free);
    border-color: var(--calendar-free-border);
    color: var(--calendar-free-text);

}

#planer-app-container .calendar td.time-slot.free:hover:not(.selected) {

    background-color: var(--calendar-free-hover);
    cursor: pointer;

}

/* Heute: nur Kopf- und Zeitspalte eingefärbt — freie Slots wie überall */

/* STATUS: blockiert (einmalig: keine Streifen) */
#planer-app-container .calendar td.time-slot.blocked {

    background-color: var(--calendar-blocked);
    --hw-cell-cover: var(--calendar-blocked);
    border-color: var(--calendar-blocked-border);
    color: var(--calendar-blocked-text);
    cursor: not-allowed;
    font-weight: 500;

}

/* Wiederkehrend: diagonale Streifen */
#planer-app-container .calendar td.time-slot.blocked[data-blocked-reason="recurring"]:not(.past) {

    --hw-cell-cover: var(--calendar-blocked-recurring);
    background-image: repeating-linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.07) 0px,
        rgba(0, 0, 0, 0.07) 2px,
        transparent 2px,
        transparent 6px
    ) !important;

}

#planer-app-container .calendar td.time-slot.blocked.past[data-blocked-reason="recurring"] {

    background-image: repeating-linear-gradient(
        45deg,
        rgba(30, 38, 51, 0.1) 0px,
        rgba(30, 38, 51, 0.1) 2px,
        transparent 2px,
        transparent 6px
    ) !important;

}

/* STATUS: Fremd / eigen */
#planer-app-container .calendar td.time-slot.booked:not(.booked-by-me-or-admin) {

    background-color: var(--calendar-booked-other);
    --hw-cell-cover: var(--calendar-booked-other);
    border-color: var(--calendar-booked-other-border);
    color: var(--calendar-booked-other-text);
    cursor: not-allowed;
    font-weight: 500;

}

#planer-app-container .calendar td.time-slot.booked-by-me-or-admin {

    background-color: var(--calendar-booked-own);
    --hw-cell-cover: var(--calendar-booked-own);
    border-color: var(--calendar-booked-own-border);
    color: var(--calendar-booked-own-text);
    cursor: pointer;
    font-weight: 500;

}

#planer-app-container .calendar td.time-slot.booked-by-me-or-admin:hover:not(.selected):not(.past) {

    background-color: color-mix(in srgb, var(--calendar-booked-own) 88%, #0a2b44);
    border-color: var(--calendar-booked-own-border);
    color: var(--calendar-booked-own-text);

}

/* Vergangenheit */
#planer-app-container .calendar td.time-slot.past:not(.free):not(.blocked):not(.booked):not(.booked-by-me-or-admin) {

    background-color: var(--calendar-past);
    --hw-cell-cover: var(--calendar-past);
    border-color: var(--calendar-past-border);
    color: var(--calendar-past-text);
    cursor: not-allowed;
    opacity: 0.92;

}

#planer-app-container .calendar td.time-slot.free.past,

#planer-app-container .calendar td.time-slot.blocked.past,

#planer-app-container .calendar td.time-slot.booked.past,

#planer-app-container .calendar td.time-slot.booked-by-me-or-admin.past {

    background-color: var(--calendar-past-mixed-bg) !important;
    --hw-cell-cover: var(--calendar-past-mixed-bg) !important;
    border-color: var(--calendar-past-mixed-border) !important;
    color: var(--calendar-past-mixed-text) !important;
    background-image: none !important;
    opacity: 0.92;
    cursor: not-allowed;

}

#planer-app-container .calendar td.time-slot.past.booked .hw-user-label,

#planer-app-container .calendar td.time-slot.past.booked-by-me-or-admin .hw-user-label {

    color: var(--calendar-past-mixed-text) !important;

}

/* Block-Rahmen (Außenkanten) */
#planer-app-container .hw-calendar td.time-slot.past.booked:not(.selected),

#planer-app-container .hw-calendar td.time-slot.past.booked-by-me-or-admin:not(.selected),

#planer-app-container .hw-calendar td.time-slot.past.blocked:not(.selected) {

    border-left-width: 1px;
    border-right-width: 1px;
    border-left-style: solid;
    border-right-style: solid;
    border-left-color: var(--calendar-past-mixed-border) !important;
    border-right-color: var(--calendar-past-mixed-border) !important;

}

#planer-app-container .hw-calendar td.time-slot.booked:not(.booked-by-me-or-admin):not(.past):not(.selected) {

    border-left-color: var(--calendar-booked-other-border) !important;
    border-right-color: var(--calendar-booked-other-border) !important;

}

#planer-app-container .hw-calendar td.time-slot.booked:not(.booked-by-me-or-admin):last-child:not(.past):not(.selected) {

    border-right-color: var(--calendar-booked-other-border) !important;

}

#planer-app-container .hw-calendar td.time-slot.booked-by-me-or-admin:not(.past):not(.selected) {

    border-left-color: var(--calendar-booked-own-border) !important;
    border-right-color: var(--calendar-booked-own-border) !important;

}

#planer-app-container .hw-calendar td.time-slot.booked-by-me-or-admin:last-child:not(.past):not(.selected) {

    border-right-color: var(--calendar-booked-own-border) !important;

}

#planer-app-container .hw-calendar td.time-slot.blocked:not(.past):not(.selected) {

    border-left-color: var(--calendar-blocked-border) !important;
    border-right-color: var(--calendar-blocked-border) !important;

}

#planer-app-container .hw-calendar td.time-slot.blocked:last-child:not(.past):not(.selected) {

    border-right-color: var(--calendar-blocked-border) !important;

}

#planer-app-container .hw-calendar td.time-slot.past.booked:last-child:not(.selected),

#planer-app-container .hw-calendar td.time-slot.past.booked-by-me-or-admin:last-child:not(.selected),

#planer-app-container .hw-calendar td.time-slot.past.blocked:last-child:not(.selected) {

    border-right-color: var(--calendar-past-mixed-border) !important;

}

#planer-app-container .hw-calendar td.time-slot.hw-block-edge-top.booked:not(.booked-by-me-or-admin):not(.past):not(.selected) {

    border-top: 1px solid var(--calendar-booked-other-border) !important;

}

#planer-app-container .hw-calendar td.time-slot.hw-block-edge-top.booked-by-me-or-admin:not(.past):not(.selected) {

    border-top: 1px solid var(--calendar-booked-own-border) !important;

}

#planer-app-container .hw-calendar td.time-slot.hw-block-edge-top.blocked:not(.past):not(.selected) {

    border-top: 1px solid var(--calendar-blocked-border) !important;

}

#planer-app-container .hw-calendar td.time-slot.hw-block-edge-top.past.booked:not(.booked-by-me-or-admin):not(.selected),

#planer-app-container .hw-calendar td.time-slot.hw-block-edge-top.past.booked-by-me-or-admin:not(.selected),

#planer-app-container .hw-calendar td.time-slot.hw-block-edge-top.past.blocked:not(.selected) {

    border-top: 1px solid var(--calendar-past-mixed-border) !important;

}

#planer-app-container .hw-calendar td.time-slot.hw-block-edge-bottom.booked:not(.booked-by-me-or-admin):not(.past):not(.selected) {

    border-bottom: 1px solid var(--calendar-booked-other-border) !important;

}

#planer-app-container .hw-calendar td.time-slot.hw-block-edge-bottom.booked-by-me-or-admin:not(.past):not(.selected) {

    border-bottom: 1px solid var(--calendar-booked-own-border) !important;

}

#planer-app-container .hw-calendar td.time-slot.hw-block-edge-bottom.blocked:not(.past):not(.selected) {

    border-bottom: 1px solid var(--calendar-blocked-border) !important;

}

#planer-app-container .hw-calendar td.time-slot.hw-block-edge-bottom.past.booked:not(.booked-by-me-or-admin):not(.selected),

#planer-app-container .hw-calendar td.time-slot.hw-block-edge-bottom.past.booked-by-me-or-admin:not(.selected),

#planer-app-container .hw-calendar td.time-slot.hw-block-edge-bottom.past.blocked:not(.selected) {

    border-bottom: 1px solid var(--calendar-past-mixed-border) !important;

}

#planer-app-container .hw-calendar td.time-slot.blocked[data-blocked-reason="recurring"] {

    z-index: 1;

}

#planer-app-container .hw-calendar td.time-slot.blocked[data-blocked-reason="recurring"]:not(.past):not(.selected) {

    border-left-color: var(--calendar-blocked-recurring-edge) !important;
    border-right-color: var(--calendar-blocked-recurring-edge) !important;

}

#planer-app-container .hw-calendar td.time-slot.blocked[data-blocked-reason="recurring"]:last-child:not(.past):not(.selected) {

    border-right-color: var(--calendar-blocked-recurring-edge) !important;

}

#planer-app-container .hw-calendar td.time-slot.past.blocked[data-blocked-reason="recurring"]:not(.selected) {

    border-left-color: var(--calendar-blocked-recurring-edge) !important;
    border-right-color: var(--calendar-blocked-recurring-edge) !important;

}

#planer-app-container .hw-calendar td.time-slot.past.blocked[data-blocked-reason="recurring"]:last-child:not(.selected) {

    border-right-color: var(--calendar-blocked-recurring-edge) !important;

}

#planer-app-container .hw-calendar td.time-slot.hw-block-edge-top.blocked[data-blocked-reason="recurring"]:not(.past):not(.selected) {

    border-top: 1px solid var(--calendar-blocked-recurring-edge) !important;

}

#planer-app-container .hw-calendar td.time-slot.hw-block-edge-bottom.blocked[data-blocked-reason="recurring"]:not(.past):not(.selected) {

    border-bottom: 1px solid var(--calendar-blocked-recurring-edge) !important;

}

#planer-app-container .hw-calendar td.time-slot.hw-block-edge-top.past.blocked[data-blocked-reason="recurring"]:not(.selected) {

    border-top: 1px solid var(--calendar-blocked-recurring-edge) !important;

}

#planer-app-container .hw-calendar td.time-slot.hw-block-edge-bottom.past.blocked[data-blocked-reason="recurring"]:not(.selected) {

    border-bottom: 1px solid var(--calendar-blocked-recurring-edge) !important;

}

#planer-app-container .hw-calendar tbody tr:last-child td.time-slot.hw-block-edge-bottom.blocked[data-blocked-reason="recurring"]:not(.selected) {

    border-bottom: 1px solid var(--calendar-blocked-recurring-edge) !important;

}

/* Auswahl: nur Umriss — Flächenfarbe bleibt Status (frei/gebucht/…) */
#planer-app-container .calendar td.time-slot.selected {

    outline: 2px solid var(--calendar-selected-outline) !important;
    outline-offset: -1px;
    font-weight: 600;

}

#planer-app-container .calendar td.time-slot.selected:hover {

    outline-color: var(--calendar-selected-outline) !important;

}

/* Nur für angemeldete Nutzer: Hinweis zur Nichterreichbarkeit der Wiese (sonst irrelevant) */
#planer-app-container.hw-planer-logged-in .calendar td.time-slot.blocked[data-blocked-reason="recurring"]:hover::after {

    content: "Für diesen Zeitraum ist die Hundewiese nicht buchbar.";
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    margin-bottom: 4px;
    background: var(--primary-bg);
    color: var(--primary-color);
    font-size: 0.75rem;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-medium);
    max-width: 220px;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    z-index: 10;
    pointer-events: none;

}

/* Tooltip für Buchungsnamen */

#planer-app-container .calendar td .booking-name {

    display: block;

    font-size: 11px;

    margin-top: 2px;

    font-weight: 600;

    text-overflow: ellipsis;

    overflow: hidden;

    white-space: nowrap;

}



#planer-app-container .calendar td .booking-name.booking-name--hidden {

    visibility: hidden;

}



/* ========================================

   8. MODALS

   ======================================== */



.modal {

    display: none;

    position: fixed;

    z-index: 10000;

    left: 0;

    top: 0;

    width: 100%;

    height: 100%;

    overflow: auto;

    background-color: rgba(0,0,0,0.5);

}



.modal-content {

    background-color: white;

    margin: 5% auto;

    padding: 30px;

    border: none;

    border-radius: 8px;

    width: 90%;

    max-width: 500px;

    box-shadow: 0 10px 25px rgba(0,0,0,0.2);

    position: relative;

}



.modal-content h2 {

    margin-top: 0;

    margin-bottom: 20px;

    color: #333333;

}



.modal-content .close {

    color: #aaa;

    position: absolute;

    top: 10px;

    right: 15px;

    font-size: 28px;

    font-weight: bold;

    cursor: pointer;

    transition: color 0.3s ease;

}



.modal-content .close:hover {

    color: #000;

}



/* Modal Buttons */

.modal-content button,

.modal-content .btn {

    padding: 6px 14px;

    font-size: 13px;

    margin: 4px;

    text-transform: none;

}



/* Modal-Verbesserungen für bessere Meldungen */

.modal-content {

    animation: modalFadeIn 0.2s ease-out;

}



.modal-content h2 {

    display: flex;

    align-items: center;

    gap: 10px;

    margin-top: 0;

    margin-bottom: 20px;

    color: #333333;

}



.modal-content h2::before {

    content: '';

    width: 24px;

    height: 24px;

    flex-shrink: 0;

    background-size: contain;

}



.modal-content.success h2::before {

    content: '✓';

    color: #10b981;

    font-size: 24px;

    font-weight: bold;

}



.modal-content.error h2::before {

    content: '✕';

    color: #ef4444;

    font-size: 24px;

    font-weight: bold;

}



.modal-content.info h2::before {

    content: 'ℹ';

    color: #0a5408;

    font-size: 24px;

    font-weight: bold;

}



@keyframes modalFadeIn {

    from {

        opacity: 0;

        transform: scale(0.95);

    }

    to {

        opacity: 1;

        transform: scale(1);

    }

}



/* ========================================

   9. RESPONSIVE DESIGN

   ======================================== */



#planer-app-container .calendar-intro {

    display: none; /* Wird per JavaScript bei Touch-Geräten eingeblendet */

    margin: 0 0 10px;

    font-size: 0.9rem;

    color: #9a3412;

    background-color: #fff7ed;

    border: 1px solid #fed7aa;

    border-radius: 6px;

    padding: 10px 12px;

    line-height: 1.4;

}



/* Touch-Geräte: Text wird per JavaScript mit display:block sichtbar gemacht */



@media (max-width: 768px) {

    #planer-app-container .admin-subnav {

        gap: 0;

        overflow-x: auto;

        border-bottom: 1px solid #d4c5b5;

    }

    

    #planer-app-container .admin-subnav .btn {

        white-space: nowrap;

        min-width: auto;

    }

    

    #planer-app-container .calendar {

        min-width: 400px;

    }

    

    .modal-content {

        width: 95%;

        margin: 10% auto;

        padding: 20px;

    }

    

    #planer-app-container table:not(.calendar):not(.hw-calendar) {

        font-size: 12px;

    }

    

    #planer-app-container table:not(.calendar):not(.hw-calendar) th,

    #planer-app-container table:not(.calendar):not(.hw-calendar) td {

        padding: 8px;

    }



    /* Kalender-Container erhält eigene Scrollfläche */

    #planer-app-container .calendar-container {

        max-height: calc(100vh - 220px);

        overflow-y: auto;

        overflow-x: auto;

        position: relative;

        -webkit-overflow-scrolling: touch;

    }



    /* Sticky Header und Zeitleiste */

    #planer-app-container .calendar thead th {

        position: sticky;

        top: 0;

        z-index: 5;

        background-color: var(--calendar-surface);

    }



    #planer-app-container .calendar thead .sticky-col,

    #planer-app-container .calendar tbody td.time-label {

        position: sticky;

        left: 0;

        z-index: 6;

        background-color: var(--calendar-surface);

        box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);

    }



    #planer-app-container .calendar thead .sticky-col {

        z-index: 7;

        background-color: var(--calendar-surface);

    }

}



/* Desktop: Alles in einer Zeile wenn möglich */

@media (min-width: 769px) {

    #planer-app-container .app-nav {

        flex-wrap: nowrap;

    }

    

    #planer-app-container .app-nav .nav-left {

        order: 1;

        flex: 0 0 auto;

    }

    

    #planer-app-container .app-nav .nav-center {

        order: 2;

        flex: 1 1 auto;

        justify-content: center;

    }

    

    #planer-app-container .app-nav .nav-right {

        order: 3;

        flex: 0 0 auto;

        margin-left: auto;

    }

}



@media (max-width: 768px) {

    #planer-app-container .app-nav {

        gap: 10px;

    }

    

    /* Erste Zeile: "Angemeldet als" und "Abmelden" */

    #planer-app-container .app-nav .nav-left {

        order: 1;

        flex: 0 0 auto;

    }

    

    #planer-app-container .app-nav .nav-right {

        order: 2;

        flex: 0 0 auto;

        margin-left: auto;

    }

    

    /* Zweite Zeile: Bereiche (nur wenn nötig, keine Leerzeile) */

    #planer-app-container .app-nav .nav-center {

        order: 3;

        flex: 1 1 100%;

        width: 100%;

        justify-content: center;

        border-top: 1px solid rgba(232, 219, 203, 0.3);

        padding-top: 8px;

        margin-top: 0;

        margin-bottom: 0;

    }

    

    /* Keine Leerzeilen zwischen Elementen */

    #planer-app-container .app-nav .nav-center:empty {

        display: none;

    }

}



@media (max-width: 480px) {

    #planer-app-container .app-nav {

        gap: 8px;

    }

    

    #planer-app-container h1,

    #planer-app-container .hw-admin-title,

    #planer-app-container .hw-page-title {

        font-size: 1.0625rem;

    }

    #planer-app-container h2,

    #planer-app-container .hw-section-title {

        font-size: 1.125rem;

    }

    

    /* Button-Größe in Modals bereits durch Hauptregel definiert */

}



/* ========================================

   10. UTILITY CLASSES

   ======================================== */



#planer-app-container .text-center {

    text-align: center;

}



#planer-app-container .text-right {

    text-align: right;

}



#planer-app-container .mt-1 { margin-top: 8px; }

#planer-app-container .mt-2 { margin-top: 16px; }

#planer-app-container .mt-3 { margin-top: 24px; }



#planer-app-container .mb-1 { margin-bottom: 8px; }

#planer-app-container .mb-2 { margin-bottom: 16px; }

#planer-app-container .mb-3 { margin-bottom: 24px; }



#planer-app-container .hidden {

    display: none !important;

}



#planer-app-container .disabled {

    opacity: 0.5;

    cursor: not-allowed !important;

    pointer-events: none !important;

}



/* ========================================

   11. KOMPATIBILITÄT hw-* (aktuelle PHP-Struktur)

   ======================================== */

/* hw-nav = app-nav Stil (grüne Leiste) */

#planer-app-container .hw-nav {

    background: var(--primary-bg);

    padding: 12px 20px;

    margin-bottom: 0;

    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 15px;

    border-radius: 8px;

    border-bottom-left-radius: 0;

    border-bottom-right-radius: 0;

    box-shadow: none;

    border: none;

}

#planer-app-container .hw-nav-list {

    list-style: none;

    margin: 0;

    padding: 0;

    display: flex;

    flex-wrap: wrap;

    gap: 15px;

    align-items: center;

    width: 100%;

}

#planer-app-container .hw-nav-link {

    color: var(--primary-color);

    text-decoration: none;

    padding: 5px 10px;

    font-size: 15px;

    font-weight: 500;

    border-radius: 4px;

    transition: all 0.3s ease;

    cursor: pointer;

    user-select: none;

    -webkit-user-select: none;

}

#planer-app-container .hw-nav-link::after { content: none; }

#planer-app-container .hw-nav-link:hover {

    background: var(--primary-bg-hover);

    color: white;

}

#planer-app-container .hw-nav-link.hw-nav-active {

    font-weight: 600;

}

/* Aktive Seite als Text (kein Link): nicht klickbar wirken */

#planer-app-container .hw-nav-list li span.hw-nav-link {

    cursor: default;

}

#planer-app-container .hw-nav-list li span.hw-nav-link:hover {

    background: transparent;

    color: var(--primary-color);

}

/* Linksbündig: "Angemeldet als:" (wie BACKUP33LAST_BEFORE_RESTART) */

#planer-app-container .hw-nav .hw-nav-user {

    color: var(--primary-color);

    font-size: 0.95em;

    margin-right: 0.5em;

    list-style: none;

}

#planer-app-container .hw-nav .hw-nav-username {

    font-weight: 600;

    color: var(--primary-color);

}

#planer-app-container .hw-nav .hw-nav-user--guest {

    opacity: 0.9;

}

/* Rechts: Nachrichtenzentrale (Root) + Abmelden / Anmelden */

#planer-app-container .hw-nav-list .hw-nav-right {

    margin-left: auto;

    display: flex;

    align-items: center;

}

#planer-app-container .hw-nav-list .hw-nav-right-group {

    display: flex;

    flex-wrap: wrap;

    align-items: center;

    justify-content: flex-end;

    gap: 0.75rem 1.25rem;

}

/* Nachrichten-Symbol (Root) + optionaler roter Hinweis-Punkt */

#planer-app-container .hw-nav-link--nachrichten.hw-nav-link--current {

    opacity: 0.92;

}

#planer-app-container .hw-nav-link--nachrichten {

    position: relative;

    padding: 5px 8px;

    line-height: 1;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    cursor: pointer !important;

    user-select: none !important;

    -webkit-user-select: none !important;

}

#planer-app-container .hw-nav-link--nachrichten .hw-nav-msg-inner {

    position: relative;

    display: inline-block;

    pointer-events: none;

    cursor: inherit !important;

    user-select: none !important;

    -webkit-user-select: none !important;

}

#planer-app-container .hw-nav-link--nachrichten .hw-nav-msg-icon {

    font-size: 1.15em;

    line-height: 1;

    display: inline-block;

    pointer-events: none;

    cursor: inherit !important;

    user-select: none !important;

    -webkit-user-select: none !important;

}

#planer-app-container .hw-nav-link--nachrichten .hw-nav-msg-dot {

    position: absolute;

    top: -1px;

    right: -3px;

    width: 8px;

    height: 8px;

    border-radius: 50%;

    background: #dc2626;

    box-shadow: 0 0 0 2px var(--primary-bg);

    pointer-events: none;

}

/* Anmelden linksbündig (mit den übrigen Nav-Links) */

#planer-app-container .hw-nav-list .hw-nav-center {

    margin-left: 0;

}

/* hw-week-nav: Vorherige links, Nächste rechts, Heute mittig (wenn angezeigt) */

#planer-app-container .hw-week-nav {

    background: #ffffff;

    padding: 6px 14px;

    margin: 4px 0 0 0;

    border-radius: 6px;

    box-shadow: none;

    border: none;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 8px;

    flex-wrap: wrap;

}

/* Zeile über der Wochen-Navigation: aktuelles Datum/Uhrzeit rechts */
#planer-app-container .hw-week-nav-top {

    display: flex;

    justify-content: flex-end;

    align-items: center;

    padding: 0 14px 0 0;

    margin: 6px 0 0 0;

    min-height: 0;

}

#planer-app-container .hw-week-nav-now {

    font-size: 0.95rem;

    color: #374151;

    font-weight: 500;

    display: flex;

    flex-direction: column;

    align-items: flex-end;

    line-height: 1.35;

}

#planer-app-container .hw-week-nav-now .hw-now-date {

    font-weight: 600;

    color: var(--primary-bg, #0a5408);

}

#planer-app-container .hw-week-nav-now .hw-now-time {

    color: #6b7280;

    font-variant-numeric: tabular-nums;

}


/* hw-nav-btn = nav-button Stil */

#planer-app-container .hw-nav-btn {

    display: inline-block;

    padding: 4px 10px;

    font-size: 13px;

    font-weight: 500;

    text-decoration: none;

    border-radius: 6px;

    transition: all 0.2s ease;

    background-color: #e2f4dc;

    color: #0a5408;

    border: 1px solid #8fbc84;

}

#planer-app-container .hw-nav-btn:hover {

    background-color: #cdecc4;

    color: #094507;

    border-color: #6ba366;

}

/* hw-calendar-wrap, hw-table-scroll */

#planer-app-container .hw-calendar-wrap {

    background: var(--calendar-surface);

    border: none !important;

    border-radius: 0;

    overflow: hidden;

}

#planer-app-container .hw-calendar-and-legend {

    background: var(--calendar-surface);

    border: none;

    border-left: 1px solid var(--calendar-grid-border);

    border-right: 1px solid var(--calendar-grid-border);

    border-bottom: 1px solid var(--calendar-grid-border);

    border-top-left-radius: 0;

    border-top-right-radius: 0;

    border-bottom-left-radius: 8px;

    border-bottom-right-radius: 8px;

    overflow: hidden;

}

#planer-app-container .hw-content-frame {

    background: var(--calendar-surface);

    border: none;

    border-left: 1px solid var(--calendar-grid-border);

    border-right: 1px solid var(--calendar-grid-border);

    border-bottom: 1px solid var(--calendar-grid-border);

    border-top-left-radius: 0;

    border-top-right-radius: 0;

    border-bottom-left-radius: 8px;

    border-bottom-right-radius: 8px;

    overflow: hidden;

    padding: 1rem 1.25rem 1.5rem;

    font-size: 0.9rem;

}

#planer-app-container .hw-table-scroll {

    overflow-x: auto;

    margin: 0 0 20px 0;

    -webkit-overflow-scrolling: touch;

    position: relative;

}

/* Buchungsbeschriftung: horizontaler Name über mehrere Zellen (liegt im Scroll-Container) */

#planer-app-container .hw-table-scroll .hw-booking-block-label-wrap {

    position: absolute;

    pointer-events: none;

    z-index: 1;

    box-sizing: border-box;

    overflow: visible;

    background: transparent;

}

#planer-app-container .hw-calendar td.time-slot .hw-user-label {

    font-size: var(--hw-calendar-block-name-size);

    font-weight: var(--hw-calendar-block-name-weight);

    line-height: 1.2;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;

}

#planer-app-container .hw-table-scroll .hw-booking-block-label-text {

    position: absolute;

    font-size: var(--hw-calendar-block-name-size);

    font-weight: var(--hw-calendar-block-name-weight);

    font-family: inherit;

    line-height: 1.2;

    white-space: nowrap;

    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent !important;

    box-decoration-break: clone;

    -webkit-box-decoration-break: clone;

}

/* Kalender: Keine Textauswahl beim Drag'n'Drop */

#planer-app-container .hw-calendar-and-legend {

    user-select: none;

    -webkit-user-select: none;

    -moz-user-select: none;

    -ms-user-select: none;

}

/* hw-calendar: gleiche Fläche/Gitter wie .calendar (Tabelle trägt .calendar.hw-calendar) */

#planer-app-container .hw-calendar {

    width: 100%;

    min-width: 700px;

    border-collapse: collapse;

    background: var(--calendar-surface);

    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);

}

#planer-app-container .hw-calendar th {

    background: var(--calendar-surface);

    padding: 10px;

    font-weight: 600;

    text-align: center;

    border: 1px solid var(--calendar-grid-border);

    font-size: 14px;

}

#planer-app-container .hw-calendar td {

    border: 1px solid var(--calendar-grid-border);

    padding: 8px;

    text-align: center;

}

#planer-app-container .hw-calendar thead th {

    border-top: 1px solid var(--calendar-grid-border);

    color: #333333;

    padding: 6px 4px;

    font-size: inherit;

}

#planer-app-container .hw-calendar thead th.hw-time-col,

#planer-app-container .hw-calendar thead th.hw-day-col-two {

    font-size: 1em;

}

#planer-app-container .hw-calendar thead th.hw-day-col-two {

    line-height: 1.3;

}

#planer-app-container .hw-calendar thead th.hw-day-col-two .hw-day-name,

#planer-app-container .hw-calendar thead th.hw-day-col-two .hw-date {

    display: block;

    font-size: 1em;

}

#planer-app-container .hw-calendar thead th.hw-day-col-two .hw-day-name {

    font-weight: 600;

}

#planer-app-container .hw-calendar thead th.hw-day-col-two .hw-date {

    font-weight: 400;

    color: #4b5563;

    margin-top: 2px;

}

#planer-app-container .hw-calendar thead th.hw-day-col.hw-today {

    background-color: var(--calendar-today-cell-bg);

}

#planer-app-container .hw-calendar tbody td.hw-time-label.hw-current-time-cell {

    background-color: var(--calendar-today-cell-bg);

}

#planer-app-container .hw-calendar thead th:first-child,

#planer-app-container .hw-calendar td:first-child {

    border-left: none;

}

#planer-app-container .hw-calendar thead th:last-child,

#planer-app-container .hw-calendar td:last-child {

    border-right: none;

}

#planer-app-container .hw-calendar tbody tr:last-child td {

    border-bottom: 1px solid var(--calendar-grid-border);

}

#planer-app-container .hw-calendar .hw-time-col,

#planer-app-container .hw-calendar td.hw-time-label {

    padding-left: 6px;

    padding-right: 6px;

    width: 1%;

    white-space: nowrap;

    font-weight: 600;

    color: #374151;

    background-color: var(--calendar-surface);

    text-align: right;

}

#planer-app-container .hw-calendar td.time-slot {

    position: relative;

    min-width: 0;

}

#planer-app-container .hw-calendar td.hw-cell-no-top-border {

    border-top: 1px solid var(--calendar-slot-base-border) !important;
    border-top-width: 1px !important;
    border-top-style: solid !important;

}

#planer-app-container .hw-calendar td.hw-cell-no-bottom-border {

    border-bottom: 1px solid var(--calendar-slot-base-border) !important;
    border-bottom-width: 1px !important;

}

#planer-app-container .calendar.hw-calendar td.hw-cell-no-top-border {

    border-top: 1px solid var(--calendar-slot-base-border) !important;
    border-top-width: 1px !important;
    border-top-style: solid !important;

}

#planer-app-container .calendar.hw-calendar td.hw-cell-no-bottom-border {

    border-bottom: 1px solid var(--calendar-slot-base-border) !important;
    border-bottom-width: 1px !important;

}

/* Innenkanten zusammengehöriger Past-Blöcke: past-mixed setzt border-color global und war stärker
   als .hw-cell-no-* — dadurch wirkten alle Zeilen wie volle Kästen. Nur Naht wieder Gitterfarbe. */
#planer-app-container .hw-calendar td.time-slot.past.hw-cell-no-top-border,
#planer-app-container .calendar.hw-calendar td.time-slot.past.hw-cell-no-top-border {

    border-top-color: var(--calendar-slot-base-border) !important;

}

#planer-app-container .hw-calendar td.time-slot.past.hw-cell-no-bottom-border,
#planer-app-container .calendar.hw-calendar td.time-slot.past.hw-cell-no-bottom-border {

    border-bottom-color: var(--calendar-slot-base-border) !important;

}

/* Wrapper ohne Zoom: nur ::before-Kreis skaliert, Sprechblase bleibt unveraendert */
#planer-app-container .hw-calendar td.time-slot .hw-comment-dot {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 15px;
    height: 15px;
    pointer-events: auto;
    cursor: default;
    z-index: 2;
    box-sizing: border-box;
}
#planer-app-container .hw-calendar td.time-slot .hw-comment-dot::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #1a6b16;
    border: 2px solid #e8dbcb;
    box-sizing: border-box;
    z-index: 3;
    pointer-events: none;
    transform-origin: center center;
    transition: transform 0.18s ease;
}
#planer-app-container .hw-calendar td.time-slot .hw-comment-dot:hover::before {
    transform: scale(1.15);
}
/* Unsichtbare Bruecke: Hover bleibt beim Wechsel Punkt -> Tooltip (Scrollbereich) erhalten */
#planer-app-container .hw-calendar td.time-slot .hw-comment-dot::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -12px;
    right: -12px;
    /* zur groesseren Luecke Kreis–Blase (hover-Bruecke) */
    height: 20px;
    z-index: 1;
}
/* Farben wie Theme: .hestia-scroll-to-top (Beige/Grün), .hestia-title (Weiß) — siehe style.css :root / #planer-app-container */
#planer-app-container .hw-calendar td.time-slot .hw-comment-dot .hw-comment-tip {
    display: none;
    position: absolute;
    right: -10px;
    top: calc(100% + 11px);
    min-width: 180px;
    max-width: 320px;
    padding: 0;
    background: var(--primary-color);
    color: var(--primary-bg);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.45;
    border-radius: 12px;
    border: 2px solid var(--primary-bg);
    box-shadow: 0 4px 12px var(--shadow-light);
    white-space: normal;
    word-break: break-word;
    z-index: 100;
    pointer-events: auto;
    overflow: visible;
    /* Stacking: Pfeil (::before) liegt unter Kopfzeile, wirkt wie Rahmenfortsetzung */
    isolation: isolate;
}
/*
 * Pfeil: Spitze exakt auf Kreismitte.
 * Kreis: 15px -> Mittelpunkt = 7.5px vom rechten Dot-Rand.
 * Blase startet bei top: calc(100% + 14px), daher Hoehe ~22px bis zur Kreismitte.
 */
#planer-app-container .hw-calendar td.time-slot .hw-comment-dot .hw-comment-tip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    /* Ansatz etwas weiter Richtung horizontaler Mitte */
    right: 3px;
    margin-right: 0;
    margin-bottom: -6px;
    border-style: solid;
    border-width: 0 12px 30px 12px;
    border-color: transparent transparent var(--primary-bg) transparent;
    /* Danach leicht nach rechts verdrehen */
    transform: rotate(16deg) skewX(-6deg);
    transform-origin: 50% 0;
    z-index: 0;
    pointer-events: none;
}
#planer-app-container .hw-calendar td.time-slot .hw-comment-dot:hover .hw-comment-tip {
    display: block;
}
/* Weiss wie h1.hestia-title (style.css) */
#planer-app-container .hw-calendar td.time-slot .hw-comment-dot .hw-comment-tip-heading {
    display: block;
    position: relative;
    z-index: 1;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #ffffff;
    background: var(--primary-bg);
    margin: 0;
    padding: 10px 14px;
    line-height: 1.35;
    border-radius: 10px 10px 0 0;
}
#planer-app-container .hw-calendar td.time-slot .hw-comment-dot .hw-comment-tip-heading:has(+ .hw-comment-tip-meta) {
    padding-bottom: 4px;
}
#planer-app-container .hw-calendar td.time-slot .hw-comment-dot .hw-comment-tip-meta {
    display: block;
    position: relative;
    z-index: 1;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.88);
    background: var(--primary-bg);
    margin: 0;
    padding: 0 14px 10px 14px;
}
#planer-app-container .hw-calendar td.time-slot .hw-comment-dot .hw-comment-tip-body {
    display: block;
    color: var(--primary-bg);
    font-weight: 400;
    font-size: 1.0625rem;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 0 0 10px 10px;
    max-height: 15em; /* Fallback: ca. 10 Zeilen bei line-height 1.5 */
    max-height: 10lh;
    padding: 12px 14px;
    scrollbar-width: thin;
    /* Daumen: helles Beige (--primary-color), Schiene: Dunkelgruen (--primary-bg), wie Kontrast beim Scroll-Button */
    scrollbar-color: var(--primary-color) var(--primary-bg);
}
#planer-app-container .hw-calendar td.time-slot .hw-comment-dot .hw-comment-tip-body::-webkit-scrollbar {
    width: 8px;
}
#planer-app-container .hw-calendar td.time-slot .hw-comment-dot .hw-comment-tip-body::-webkit-scrollbar-track {
    background: var(--primary-bg);
    border-radius: 4px;
}
#planer-app-container .hw-calendar td.time-slot .hw-comment-dot .hw-comment-tip-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Eckzelle mit Diagonale: oben rechts „Datum“, unten links „Zeit“ */

#planer-app-container .hw-calendar th.hw-corner-cell {

    position: relative;

    padding: 0;

    overflow: hidden;

    vertical-align: bottom;

    min-height: 2.5em;

}

#planer-app-container .hw-calendar th.hw-corner-cell::before {

    content: '';

    position: absolute;

    top: 0;

    left: 0;

    right: 0;

    bottom: 0;

    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1' preserveAspectRatio='none'%3E%3Cline x1='0' y1='0' x2='1' y2='1' stroke='%23d4dbe5' stroke-width='0.012'/%3E%3C/svg%3E");

    background-size: 100% 100%;

    background-repeat: no-repeat;

    pointer-events: none;

}

#planer-app-container .hw-calendar th.hw-corner-cell .hw-corner-datum,

#planer-app-container .hw-calendar th.hw-corner-cell .hw-corner-zeit {

    position: absolute;

    font-size: 1em;

    line-height: 1.2;

}

#planer-app-container .hw-calendar th.hw-corner-cell .hw-corner-datum {

    top: 4px;

    right: 6px;

    text-align: right;

}

#planer-app-container .hw-calendar th.hw-corner-cell .hw-corner-zeit {

    bottom: 4px;

    left: 6px;

    text-align: left;

}

/* hw-alert = app-message Stil */

#planer-app-container .hw-alert {

    padding: 12px 20px;

    border: 1px solid transparent;

    border-radius: 6px;

    margin: 0 auto 15px auto;

    max-width: 600px;

    font-weight: 500;

}

#planer-app-container .hw-alert-success {

    color: #065f46;

    background-color: #d1fae5;

    border-color: #10b981;

}

#planer-app-container .hw-alert-error {

    color: #991b1b;

    background-color: #fee2e2;

    border-color: #ef4444;

}

#planer-app-container .hw-alert-info {

    color: #0a5408;

    background-color: #eef5ec;

    border-color: #0a5408;

}

#planer-app-container .hw-alert-warning {

    color: #92400e;

    background-color: #fff4d6;

    border-color: #f8d78c;

}

/* hw-card = card Stil */

#planer-app-container .hw-card {

    background: white;

    border-radius: 10px;

    padding: 24px;

    margin-bottom: 20px;

    box-shadow: 0 2px 8px var(--shadow-light);

    border: 1px solid var(--border-color);

}

#planer-app-container .hw-card.hw-card--no-frame {

    border: none;

    box-shadow: none;

}

/* Einstellungen: Abschnitte mit Überschriften, zwei Spalten */
#planer-app-container .hw-settings-section {
    margin-bottom: 2rem;
}
#planer-app-container .hw-settings-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-bg, #0a5408);
    margin: 0 0 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border-color, #d4c5b5);
}
#planer-app-container .hw-settings-section .hw-card {
    margin-bottom: 1rem;
}
#planer-app-container .hw-settings-section .hw-card:last-child {
    margin-bottom: 0;
}
#planer-app-container .hw-field-row.hw-settings-two-col {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-bottom: 1rem;
}
#planer-app-container .hw-field-row.hw-settings-two-col:last-child {
    margin-bottom: 0;
}
#planer-app-container .hw-field-row.hw-settings-two-col > .hw-field {
    flex: 1 1 200px;
    min-width: 0;
}
#planer-app-container .hw-field-row.hw-settings-two-col > .hw-field.hw-field-inline {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
#planer-app-container .hw-settings-section .hw-field.hw-field-inline > label {
    margin-bottom: 0;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
}
/* Checkbox und Label auf einer Ebene (überall) */
#planer-app-container .hw-field.hw-field-inline,
.hw-field.hw-field-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.hw-field.hw-field-inline input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
}

/* Checkbox + zugehöriger Text: vertikal zentriert (#planer-app-container + Modale außerhalb) */
#planer-app-container .hw-field.hw-field-inline > label,
.hw-modal .hw-field.hw-field-inline > label {
    display: inline;
    margin-bottom: 0;
    align-self: center;
    font-weight: 500;
}
#planer-app-container label.hw-checkbox-label,
.hw-modal label.hw-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    cursor: pointer;
}
#planer-app-container label.hw-checkbox-label input[type="checkbox"],
.hw-modal label.hw-checkbox-label input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
}
#planer-app-container .hw-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    align-items: center;
}

/* Checkbox + „Ganztags“ + erklärender Text in einer Zeile (umbrechend) */
#planer-app-container .hw-checkbox-hint-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 0.65rem;
    row-gap: 0.35rem;
}
#planer-app-container .hw-checkbox-hint-row .hw-hint--checkbox-inline {
    display: block;
    margin: 0;
    flex: 1 1 14rem;
    min-width: min(100%, 12rem);
    line-height: 1.35;
    color: #8a7e70;
    font-size: 0.95rem;
}

/* hw-modal = modal Stil – über dem Kalender schwebend */

.hw-modal {

    position: fixed !important;

    top: 0;

    left: 0;

    right: 0;

    bottom: 0;

    width: 100%;

    height: 100%;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;

    z-index: 100000 !important;

}

.hw-modal[hidden] { display: none !important; }

.hw-modal-backdrop {

    position: absolute;

    top: 0;

    left: 0;

    right: 0;

    bottom: 0;

    background: rgba(15, 23, 42, 0.5);

    backdrop-filter: blur(6px);

    -webkit-backdrop-filter: blur(6px);

    z-index: 0;

}

.hw-modal-box {

    position: relative;

    z-index: 1;

    background: white;

    padding: 0;

    border-radius: 12px;

    width: 90%;

    max-width: 500px;

    border: 1px solid rgba(226, 232, 240, 0.9);

    box-shadow: 0 20px 45px -15px rgba(15, 23, 42, 0.45), 0 8px 18px rgba(15, 23, 42, 0.18);

    overflow: hidden;

    transform: translateY(0);

    animation: hw-modal-pop-in 180ms ease-out;

}

.hw-modal-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 16px;

    padding: 16px 24px 12px;

    background: linear-gradient(180deg, #faf8f4 0%, #ffffff 100%);

    border-bottom: 1px solid #d4c5b5;

}

.hw-modal-header h2 {

    margin: 0;

    color: #333333;

    font-size: 1.4375rem;

    font-weight: 600;

}

/*
 * Modal-Buttons: Modals hängen außerhalb #planer-app-container (modale.php).
 * Dort greifen keine #planer-app-container .hw-btn-* Regeln.
 * Nach :not(.hw-btn) im Child-Theme fehlen sonst Farben → Kontrastfehler (schwarz/dunkelgrau).
 */
/* Gleiche Körpergröße wie #planer-app-container .hw-nav-btn (Vorheriger/Nächster …) */
.hw-modal .hw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #1f2937;
    line-height: 1.35;
    font-weight: 500;
    padding: 4px 10px;
    min-height: 0;
    height: auto;
    font-size: 13px;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    margin: 0;
}

.hw-modal .hw-btn-green {
    background-color: #e2f0de !important;
    color: #0a5408 !important;
    border-color: #9ccc96 !important;
}

.hw-modal .hw-btn-green:hover {
    background-color: #c8e2c4 !important;
    color: #094507 !important;
    border-color: #7fb87a !important;
}

.hw-modal .hw-btn-blue {
    background-color: #eef5ec !important;
    color: #0a5408 !important;
    border-color: #c8d8c0 !important;
}

.hw-modal .hw-btn-blue:hover {
    background-color: #eef5ec !important;
    color: #0a5408 !important;
    border-color: #b8ccb0 !important;
}

.hw-modal .hw-btn-red {
    background-color: #fde2e1 !important;
    color: #7f1d1d !important;
    border-color: #f5b5b0 !important;
}

.hw-modal .hw-btn-red:hover {
    background-color: #fecaca !important;
    color: #7f1d1d !important;
    border-color: #f59e9b !important;
}

.hw-modal .hw-btn-yellow {
    background-color: #fef9c3 !important;
    color: #854d0e !important;
    border-color: #fde047 !important;
}

.hw-modal .hw-btn-yellow:hover {
    background-color: #fef08a !important;
    color: #713f12 !important;
    border-color: #facc15 !important;
}

.hw-modal .hw-btn-green-soft {
    background-color: #e2f0de !important;
    color: #0a5408 !important;
    border-color: #9ccc96 !important;
}

.hw-modal .hw-btn-green-soft:hover {
    background-color: #c8e2c4 !important;
    color: #094507 !important;
    border-color: #7fb87a !important;
}

/* Schließen-X: kein Button-Chassis, nur Zeichen in Primärgrün #0a5408 */
.hw-modal button.hw-modal-close {

    all: unset;

    flex-shrink: 0;

    margin: 0 !important;

    margin-left: auto;

    padding: 0 2px !important;

    font-size: 1.75rem !important;

    line-height: 1;

    color: #0a5408 !important;

    background: transparent !important;

    border: none !important;

    border-radius: 0;

    box-shadow: none !important;

    cursor: pointer;

    transition: color 0.2s, opacity 0.2s;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    font-family: inherit;

    min-width: auto !important;

    height: auto !important;

}

.hw-modal button.hw-modal-close:hover {

    color: #094507 !important;

    background: transparent !important;

    opacity: 1;

}

.hw-modal button.hw-modal-close:focus-visible {

    outline: 2px solid #0a5408;

    outline-offset: 2px;

}

.hw-modal button.hw-modal-close:active {

    opacity: 0.7;

}

.hw-modal-body {

    padding: 16px 24px 20px;

}

/* Modal-Formulare liegen ausserhalb von #planer-app-container.
   Deshalb hier eigene, harte Layout-Regeln gegen Theme-Formstyles. */
.hw-modal .hw-field {
    margin-bottom: 12px;
}

.hw-modal .hw-field:not(.hw-field-inline) > label {
    display: block;
    margin: 0 0 6px;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
    color: #374151;
}

.hw-modal input[type="text"],
.hw-modal input[type="email"],
.hw-modal input[type="password"],
.hw-modal input[type="date"],
.hw-modal input[type="time"],
.hw-modal input[type="number"],
.hw-modal select,
.hw-modal textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    float: none;
    clear: both;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    background-color: #ffffff;
}

.hw-modal input:focus,
.hw-modal select:focus,
.hw-modal textarea:focus {
    outline: none;
    border-color: #0a5408;
    box-shadow: 0 0 0 3px rgba(10, 84, 8, 0.15);
}

/* Freigabe-Modal (#confirmModal liegt ausserhalb #planer-app-container) */
#confirmModal .hw-booking-reassign {
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

#confirmModal .hw-booking-reassign-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 0.35rem;
}

#confirmModal .hw-booking-reassign-select {
    flex: 1 1 12rem;
    min-width: 10rem;
    max-width: 100%;
}

#confirmModal .hw-booking-reassign-submit {
    flex: 0 0 auto;
    white-space: nowrap;
}

#confirmModal .hw-booking-reassign-hint {
    margin-top: 0.4rem;
    margin-bottom: 0;
}

#confirmModal .hw-modal-actions--confirm-booking {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(10, 69, 7, 0.12);
}

#confirmModal .hw-modal-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem 0.65rem;
}

#confirmModal .hw-modal-actions-row--comment:not(:has(button:not([hidden]))) {
    display: none;
}

#confirmModal .hw-modal-actions-row--main {
    justify-content: flex-end;
}

@keyframes hw-modal-pop-in {

    from {

        opacity: 0;

        transform: translateY(8px) scale(0.985);

    }

    to {

        opacity: 1;

        transform: translateY(0) scale(1);

    }

}

@media (max-width: 640px) {

    .hw-modal {

        padding: 12px;

    }

    .hw-modal-header {

        padding: 14px 18px 10px;

    }

    .hw-modal-body {

        padding: 12px 18px 16px;

    }

}

/* Legende (innerhalb des Rahmens .hw-calendar-and-legend) */

#planer-app-container .hw-legend {

    display: flex;

    flex-wrap: wrap;

    gap: 12px;

    margin: 0;

    padding: 12px 20px 16px;

    font-size: 14px;

    background-color: var(--calendar-surface);

}

#planer-app-container .hw-legend-version {

    margin-left: auto;

    white-space: nowrap;

    color: #6b7280;

    font-size: 12px;

}

#planer-app-container .hw-legend-item::before {

    content: '';

    display: inline-block;

    width: 14px;

    height: 14px;

    border-radius: 3px;

    margin-right: 5px;

    vertical-align: middle;

}

#planer-app-container .hw-legend-free::before { background: var(--calendar-free); border: 1px solid var(--calendar-free-border); }

#planer-app-container .hw-legend-booked::before { background: var(--calendar-booked-other); border: 1px solid var(--calendar-booked-other-border); }

#planer-app-container .hw-legend-mine::before { background: var(--calendar-booked-own); border: 1px solid var(--calendar-booked-own-border); }

#planer-app-container .hw-legend-blocked::before { background: var(--calendar-blocked); border: 1px solid var(--calendar-blocked-border); }

#planer-app-container .hw-legend-past::before { background: var(--calendar-past); border: 1px solid var(--calendar-past-border); }

/* Button-System: gleiche Körpergröße wie .hw-nav-btn (Kalender Vorheriger/Nächster …); Subnav bleibt .hw-admin-tab */

#planer-app-container .hw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #1f2937;
    line-height: 1.35;
    font-weight: 500;
    padding: 4px 10px;
    height: auto;
    min-height: 0;
    font-size: 13px;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* Farben (Button/Text) */
#planer-app-container .hw-btn-green {
    background-color: #e2f0de !important;
    color: #0a5408 !important;
    border-color: #9ccc96 !important;
}

#planer-app-container .hw-btn-green:hover {
    background-color: #c8e2c4 !important;
    color: #094507 !important;
    border-color: #7fb87a !important;
}

#planer-app-container .hw-btn-red {
    background-color: #fde2e1 !important;
    color: #7f1d1d !important;
    border-color: #f5b5b0 !important;
}

#planer-app-container .hw-btn-red:hover {
    background-color: #fecaca !important;
    color: #7f1d1d !important;
    border-color: #f59e9b !important;
}

#planer-app-container .hw-btn-blue {
    background-color: #eef5ec !important;
    color: #0a5408 !important;
    border-color: #c8d8c0 !important;
}

#planer-app-container .hw-btn-blue:hover {
    background-color: #eef5ec !important;
    color: #0a5408 !important;
    border-color: #b8ccb0 !important;
}

#planer-app-container .hw-btn-yellow {
    background-color: #fef9c3 !important;
    color: #854d0e !important;
    border-color: #fde047 !important;
}

#planer-app-container .hw-btn-yellow:hover {
    background-color: #fef08a !important;
    color: #713f12 !important;
    border-color: #facc15 !important;
}

/* Pastell-Grün wie Blau/Gelb bei Tabellen-Aktionsbuttons (z. B. „+ Benutzer erstellen“) */
#planer-app-container .hw-btn-green-soft {
    background-color: #e2f0de !important;
    color: #0a5408 !important;
    border-color: #9ccc96 !important;
}

#planer-app-container .hw-btn-green-soft:hover {
    background-color: #c8e2c4 !important;
    color: #094507 !important;
    border-color: #7fb87a !important;
}


/* ========================================
   Admin-Bereich: Layout, Tabs, Tabellen
   ======================================== */

#planer-app-container .hw-admin-wrap {
    max-width: 1000px;
    margin: 0 auto;
}

#planer-app-container .hw-admin-header {
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

#planer-app-container .hw-admin-title,
#planer-app-container .hw-page-title {
    font-size: 1.4375rem;
    color: var(--primary-bg);
    margin: 0 0 0.875rem;
    font-weight: 600;
}

#planer-app-container .hw-admin-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#planer-app-container .hw-admin-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 8px;
    font-size: 1.0625rem;
    line-height: 1.35;
    font-weight: 700;
    color: #e8dbcb;
    background: #0a5408;
    border: 1px solid #0a5408;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.16s ease, box-shadow 0.16s ease;
}

#planer-app-container .hw-admin-tab:hover {
    background: #094507;
    color: #e8dbcb;
    border-color: #094507;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
}

#planer-app-container .hw-admin-tab--active {
    background: #e8dbcb;
    color: #0a5408;
    border-color: #0a5408;
    font-weight: 700;
}

#planer-app-container .hw-admin-tab--active:hover {
    background: #e8dbcb;
    color: #0a5408;
    border-color: #0a5408;
    transform: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

#planer-app-container .hw-admin-tabs.hw-admin-tabs--sub {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color, #d4c5b5);
}

#planer-app-container .hw-admin-main {
    margin-top: 10px;
    font-size: 1rem;
    display: grid;
    gap: 18px;
}

#planer-app-container .hw-admin-toolbar {
    margin-bottom: 20px;
}

/* ── Admin-Unterbereiche: Layout-Verbesserungen ─── */

#planer-app-container .hw-admin-main--benutzer .hw-admin-users {
    display: grid;
    gap: 16px;
}

#planer-app-container .hw-admin-users-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 0;
}

#planer-app-container .hw-admin-users-create {
    margin-bottom: 0;
    border: 1px solid #eef5ec;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
}

#planer-app-container .hw-admin-users-table-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow-light);
    padding: 0;
}

#planer-app-container .hw-admin-users-table-card .hw-card-title {
    padding: 16px 20px 0;
    margin-bottom: 10px;
}

#planer-app-container .hw-admin-main--buchungen .hw-admin-bookings {
    display: grid;
    gap: 16px;
}

#planer-app-container .hw-admin-bookings-danger {
    border-left: 4px solid #dc2626;
    background: linear-gradient(180deg, #fff7f7 0%, #ffffff 60%);
}

#planer-app-container .hw-admin-bookings-danger .hw-field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 12px 16px;
    margin-bottom: 14px;
}

#planer-app-container .hw-admin-bookings-danger .hw-btn {
    min-width: 160px;
}

#planer-app-container .hw-admin-bookings-table {
    padding-bottom: 6px;
}

#planer-app-container .hw-admin-main--einstellungen .hw-admin-settings-layout {
    display: grid;
    gap: 16px;
}

#planer-app-container .hw-admin-main--einstellungen .hw-settings-section {
    margin-bottom: 0;
}

#planer-app-container .hw-admin-main--einstellungen .hw-settings-section-title {
    margin: 0 0 10px;
    padding: 10px 14px;
    border: 1px solid #c8d8c0;
    border-radius: 8px;
    background: #eef5ec;
    color: #094507;
}

#planer-app-container .hw-admin-main--einstellungen .hw-settings-section .hw-card {
    margin-bottom: 0;
    border-color: #eef5ec;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

#planer-app-container .hw-admin-form-actions {
    text-align: center;
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

#planer-app-container .hw-card-title {
    font-size: 1.25rem;
    color: var(--primary-bg);
    margin: 0 0 0.875rem;
    font-weight: 600;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
}

#planer-app-container .hw-card-highlight {
    border-left: 4px solid var(--primary-bg);
}

#planer-app-container .hw-card-table-wrap {
    overflow-x: auto;
}

#planer-app-container .hw-card-table-wrap .hw-card-title {
    margin-bottom: 12px;
}

#planer-app-container .hw-table-admin {
    width: 100%;
    margin: 0;
}

#planer-app-container .hw-table-admin th {
    text-align: left;
    padding: 12px 14px;
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.35;
}

#planer-app-container .hw-table-admin td {
    padding: 12px 14px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.45;
    font-size: 0.98rem;
}

#planer-app-container .hw-table-admin tbody tr:hover {
    background: #fafafa;
}

#planer-app-container .hw-action-buttons {
    white-space: normal;
}

/* Admin Benutzerliste: zwei Aktionen-Zeilen */
#planer-app-container .hw-admin-user-actions {
    min-width: 12rem;
}

#planer-app-container .hw-admin-user-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}

#planer-app-container .hw-admin-user-actions-row--second {
    margin-top: 8px;
}

/* Benutzerliste (Admin): vertikal kompakter */
#planer-app-container .hw-admin-users-table-card .hw-table-admin th,
#planer-app-container .hw-admin-users-table-card .hw-table-admin td {
    padding: 8px 11px;
    vertical-align: middle;
    font-size: 0.95rem;
    line-height: 1.4;
}

#planer-app-container .hw-admin-users-table-card .hw-card-title {
    padding: 10px 14px 0;
    margin-bottom: 6px;
}

#planer-app-container .hw-admin-users-table-card .hw-admin-user-actions-row {
    gap: 4px 6px;
}

#planer-app-container .hw-admin-users-table-card .hw-admin-user-actions-row--second {
    margin-top: 4px;
}

/* Formular „verschwindet“ im Flex: Buttons verhalten sich wie direkte Geschwister (kein Höhenversatz). */
#planer-app-container .hw-admin-user-actions-row > .hw-inline-form {
    display: contents;
    margin: 0;
}

#planer-app-container .hw-admin-user-actions-row > .hw-btn,
#planer-app-container .hw-admin-user-actions-row > .hw-inline-form > .hw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    align-self: center;
}

#planer-app-container .hw-admin-users-table-card .hw-action-buttons .hw-inline-form {
    margin: 1px 4px 1px 0;
}

/* Nur Status-Spalte in der Benutzertabelle, nicht Badge in der Kartenüberschrift */
#planer-app-container .hw-admin-users-table-card tbody .hw-badge {
    padding: 3px 9px;
    margin-right: 3px;
    margin-bottom: 2px;
    font-size: 1rem;
}

#planer-app-container .hw-action-buttons .hw-inline-form {
    display: inline-block;
    margin: 2px 6px 2px 0;
}

#planer-app-container .hw-admin-user-actions-row > .hw-inline-form {
    margin: 0 !important;
}

#planer-app-container .hw-action-buttons .hw-input-inline {
    min-width: 7rem;
    max-width: 12rem;
    padding: 6px 10px;
    font-size: 15px;
    vertical-align: middle;
}

#planer-app-container .hw-log-user-agent {
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85em;
}

/* Admin-Aktionszeile: Form-Wrapper darf die vertikale Button-Ausrichtung nicht verschieben */
#planer-app-container .hw-admin-user-actions.hw-action-buttons .hw-admin-user-actions-row > .hw-inline-form {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    height: auto !important;
    align-self: center !important;
}
#planer-app-container .hw-admin-user-actions.hw-action-buttons .hw-admin-user-actions-row > .hw-inline-form > input[type="hidden"] {
    display: none !important;
}
#planer-app-container .hw-admin-user-actions.hw-action-buttons .hw-admin-user-actions-row > .hw-inline-form > .hw-btn,
#planer-app-container .hw-admin-user-actions.hw-action-buttons .hw-admin-user-actions-row > .hw-btn {
    align-self: center !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}


#planer-app-container .hw-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 500;
    margin-right: 4px;
}

/* Benutzer erstellen: „Benutzername“ und „Rolle“ gleiche Schriftgröße wie Seiteninhalt */
#planer-app-container #adminCreateUserForm .hw-field label {
    font-size: 1rem;
}

#planer-app-container .hw-badge-ok { background: #e2f0de; color: #0a5408; }
#planer-app-container .hw-badge-warn { background: #fef3c7; color: #92400e; }
#planer-app-container .hw-badge-admin { background: #eef5ec; color: #0a5408; }
#planer-app-container .hw-badge-root { background: #e8dbcb; color: #0a5408; }
#planer-app-container .hw-badge-info { background: #eef5ec; color: #0a5408; }
/* Einmalpasswort: klickbar kopieren, fett, nie unterstrichen */
.hw-copy-password {
    cursor: pointer !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}
.hw-copy-password:hover,
.hw-copy-password:focus {
    text-decoration: none !important;
}

#planer-app-container .hw-admin-actions-center { text-align: center; margin-bottom: 16px; }

#planer-app-container .hw-dst-dates-wrap { margin-top: 1rem; }
#planer-app-container .hw-dst-status {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: #f8faf6;
    border: 1px solid #e2ebe0;
    border-radius: 8px;
}
#planer-app-container .hw-dst-status-label {
    font-weight: 600;
    color: #0a5408;
}
#planer-app-container .hw-dst-status-detail { margin: 0; }
#planer-app-container .hw-badge-dst-summer { background: #fef3c7; color: #92400e; }
#planer-app-container .hw-badge-dst-winter { background: #e0f2fe; color: #0369a1; }

/* ── Admin Subtitle (unter Titel, vor Tabs) ─── */

#planer-app-container .hw-admin-subtitle {
    font-size: 0.95rem;
    color: #8a7e70;
    margin: -0.25rem 0 1rem;
    font-weight: 400;
    line-height: 1.45;
}

#planer-app-container .hw-hint {
    line-height: 1.45;
    max-width: 72ch;
}

/* ── Statistik-Leiste ─── */

#planer-app-container .hw-stat-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

#planer-app-container .hw-stat-item {
    flex: 1 1 140px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 2px 8px var(--shadow-light);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#planer-app-container .hw-stat-value {
    font-size: 1.4375rem;
    font-weight: 700;
    color: var(--primary-bg);
    line-height: 1.2;
}

#planer-app-container .hw-stat-label {
    font-size: 0.875rem;
    color: #8a7e70;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── Sektionen (logische Gruppierung) ─── */

#planer-app-container .hw-section {
    margin-bottom: 32px;
}

#planer-app-container .hw-section-title {
    font-size: 1.125rem;
    color: var(--primary-bg);
    font-weight: 600;
    margin: 0 0 0.875rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--primary-bg);
}

/* ── Responsive: Tabs horizontal scrollbar ─── */

@media (max-width: 768px) {
    #planer-app-container .hw-admin-main {
        gap: 14px;
    }

    #planer-app-container .hw-admin-bookings-danger .hw-field-row {
        grid-template-columns: 1fr;
    }

    #planer-app-container .hw-admin-users-table-card .hw-card-title {
        padding: 8px 12px 0;
    }

    #planer-app-container .hw-admin-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        gap: 2px;
        padding-bottom: 4px;
    }

    #planer-app-container .hw-admin-tab {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 10px 18px;
        font-size: 1.125rem;
        font-weight: 600;
    }

    #planer-app-container .hw-stat-row {
        gap: 10px;
    }

    #planer-app-container .hw-stat-item {
        padding: 14px 12px;
        flex: 1 1 100px;
    }

    #planer-app-container .hw-stat-value {
        font-size: 1.0625rem;
    }

    #planer-app-container .hw-stat-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    #planer-app-container .hw-stat-row {
        flex-direction: column;
        gap: 8px;
    }

    #planer-app-container .hw-stat-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 12px 16px;
    }

    #planer-app-container .hw-stat-value {
        font-size: 1.1rem;
        order: 2;
    }

    #planer-app-container .hw-stat-label {
        order: 1;
        text-transform: none;
        font-size: 0.9rem;
    }
}

/* ========================================
   15. Lokales Nachrichtensystem
   ======================================== */
#planer-app-container .hw-messages-main {
    display: grid;
    gap: 16px;
}
#planer-app-container .hw-messages-table .hw-msg-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
#planer-app-container .hw-messages-table .hw-msg-select-col {
    width: 42px;
    text-align: center;
}
#planer-app-container .hw-messages-table .hw-msg-actions form {
    margin: 0;
}
#planer-app-container .hw-message-detail-card .hw-message-body {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--text-color-dark);
    white-space: pre-wrap;
    line-height: 1.45;
}
#planer-app-container .hw-message-read-layout {
    display: grid;
    gap: 10px;
}
#planer-app-container .hw-message-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
}
#planer-app-container .hw-message-meta-item {
    margin: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #faf8f4;
    padding: 8px 10px;
}
#planer-app-container .hw-message-meta-label {
    display: block;
    font-size: 0.78rem;
    color: #8a7e70;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}
#planer-app-container .hw-message-body--read {
    background: #fffdf7;
}
#planer-app-container .hw-message-thread {
    margin-top: 14px;
}
#planer-app-container .hw-message-thread-title {
    font-size: 1rem;
    margin-bottom: 8px;
}
#planer-app-container .hw-message-thread-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #fff;
}
#planer-app-container .hw-message-thread-item--own {
    border-color: #c8d8c0;
    background: #f5f7f0;
}
#planer-app-container .hw-message-thread-meta {
    margin-bottom: 6px;
}
#planer-app-container .hw-message-thread-subject {
    margin: 0 0 6px 0;
}
#planer-app-container .hw-message-body--thread {
    background: #fff;
}
#planer-app-container .hw-message-detail-sep {
    margin: 14px 0;
}
#planer-app-container .hw-message-compose-card textarea {
    resize: vertical;
}
#planer-app-container .hw-recipient-autocomplete {
    position: relative;
}
#planer-app-container .hw-recipient-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 50;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    max-height: 220px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
#planer-app-container .hw-recipient-suggest li[role="option"] {
    padding: 8px 12px;
    cursor: pointer;
    line-height: 1.3;
}
#planer-app-container .hw-recipient-suggest li[role="option"]:hover,
#planer-app-container .hw-recipient-suggest li[role="option"]:focus {
    background: rgba(0, 0, 0, 0.06);
}
#planer-app-container .hw-recipient-suggest li.hw-recipient-suggest__active {
    background: rgba(10, 84, 8, 0.12);
    outline: none;
}

/* ========================================
   16. Harmonisierung Unterseiten (ohne Kalender)
   ======================================== */
body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) .page-header,
body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) .big-title-section {
    min-height: clamp(240px, 30vh, 320px);
}

body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-content-frame {
    font-size: 1rem;
    padding: 1rem 1.25rem 1.5rem;
}

body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-admin-header {
    margin-bottom: 20px;
    padding-bottom: 14px;
}

body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-admin-title,
body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-page-title {
    margin: 0 0 0.75rem;
}

body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-admin-subtitle {
    margin: -0.15rem 0 0.85rem;
}

body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-admin-tabs {
    gap: 8px;
}

body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-admin-main {
    margin-top: 8px;
    gap: 16px;
}

body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-card {
    padding: 20px;
    margin-bottom: 16px;
}

body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-card:last-child {
    margin-bottom: 0;
}

body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-card-title {
    margin: 0 0 0.75rem;
    padding-bottom: 0.4rem;
}

body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-field-row {
    gap: 12px 16px;
}

body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-form-actions {
    margin-top: 14px;
    gap: 8px;
}

/* Tabellen harmonisieren (ohne Kalender) */
body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-table-admin th,
body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-table-admin td,
body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-messages-table th,
body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-messages-table td {
    padding: 10px 12px;
    font-size: 0.98rem;
    line-height: 1.45;
    vertical-align: middle;
}

body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-admin-users-table-card .hw-table-admin th,
body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-admin-users-table-card .hw-table-admin td {
    padding: 10px 12px;
    font-size: 0.98rem;
    line-height: 1.45;
}

body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-action-buttons .hw-btn,
body.page-template-page-wiesenplaner-php .page-template-wiesenplaner.blog-post:not(.kalender) #planer-app-container .hw-msg-actions .hw-btn {
    padding: 4px 10px;
    font-size: 13px;
}

