/*
Theme Name: Blocksy Child
Template: blocksy
*/

/* --------------------------------------------
   CSS VARIABLEN (Beige/Off-White, warme Brauntöne)
   -------------------------------------------- */
:root {
    /* Primäre Brauntöne */
    --primary:     #7C5C2C;   /* Haupttext/Braun */
    --primary-dark:#A88047;   /* dunklere Variante für Hover/Active */

    /* Sekundärfarbe */
    --secondary:   #A88047;

    /* Status-Farben */
    --success:     #4caf50;
    --warning:     #ff9800;
    --danger:      #f44336;

    /* Hintergrund-Farben */
    --dark:        #7C5C2C;
    --light:       #FDFBF7;   /* Helles Off-White als Seiten-Hintergrund */
    --bg-card:     #F9F6F1;   /* Weißes Card-Hintergrund (leicht beiger) */

    /* Text-Farben */
    --text-primary:   #7C5C2C;
    --text-secondary: #A88047;

    /* Rahmen und Schatten */
    --border:      #D5CBB0;
    --shadow:      0 0.5rem 1rem rgba(0, 0, 0, 0.05);
    --shadow-sm:   0 0.125rem 0.25rem rgba(0, 0, 0, 0.03);

    /* Spezielle Farben */
    --household-border: #A88047;
}

/* --------------------------------------------
   RESET UND GRUNDLAYOUT
   -------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Spezielle Dashboard-Body-Styles */
body.page-template-page-dashboard,
body.page-template-page-dashboard html {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--light);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Dashboard-spezifische Anpassungen */
body.page-template-page-dashboard .container {
    padding-top: 0.5rem;
    padding-bottom: 0;
}

body.page-template-page-dashboard footer,
body.page-template-page-dashboard header {
    display: none !important;
}

/* --------------------------------------------
   CONTAINER UND GRUNDELEMENTE
   -------------------------------------------- */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

h1, h2, h3, h4, p, label, th, td {
    color: var(--text-primary);
}

/* --------------------------------------------
   STATISTIKKARTEN
   -------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.stat-card h3 {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.stat-card .value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .details {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stat-card .details .increase {
    color: var(--success);
}

.stat-card .details .decrease {
    color: var(--danger);
}

/* Spezielle Statistik-Kacheln */
.stat-card.stat-total {
    border-left: 4px solid var(--primary);
}

.stat-card.stat-confirmed {
    border-left: 4px solid var(--success);
}

.stat-card.stat-declined {
    border-left: 4px solid var(--danger);
}

.stat-card.stat-household {
    border-left: 4px solid var(--secondary);
}

/* --------------------------------------------
   BUTTON-CONTAINER UND NAVIGATION
   -------------------------------------------- */
.tabs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    margin-top: -1.9rem;
}

.tabs-left, .tabs-right {
    display: flex;
    gap: 0.75rem;
}

.tabs-center,
.search-bar-center {
    display: flex;
    flex: 1 1 0;
    justify-content: center;
    align-items: center;
    min-width: 0;
    gap: 0.75rem;
}

.search-bar-wrapper {
    position: static !important;
    left: unset !important;
    transform: none !important;
    margin: 0 !important;
    width: 100%;
}

.search-input-container {
    display: flex;
    align-items: center;
    border: 2px solid #a67c52;
    border-radius: 25px;
    background: var(--bg-card);
    height: 44px;
    box-shadow: none;
    padding: 0 1rem;
    width: 100%;
    max-width: 2000px;
    margin: 0 auto;
    transition: all 0.3s ease;
    z-index: 10;
}

.search-input-container input[type="text"],
.search-input-container input[type="search"] {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
    height: 100%;
    font-size: 1rem;
    padding: 0 0.5rem;
    flex: 1 1 0;
}

.search-input-container input[type="text"]:focus,
.search-input-container input[type="search"]:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Falls ein Tag-Input-Plugin verwendet wird (z.B. Tagify, Choices.js): */
.search-input-container .tagify,
.search-input-container .choices {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    min-height: 0 !important;
    height: 100% !important;
    padding: 0 !important;
}

.search-input-container .tagify__input,
.search-input-container .choices__input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    height: 100% !important;
    padding: 0 0.5rem !important;
}

.search-icon {
    font-size: 1.1rem;
    margin-left: 0.5rem;
    color: var(--text-secondary);
}

/* Stellen Sie sicher, dass die Suchleiste über anderen Elementen liegt */
.search-bar-wrapper {
    position: relative;
    z-index: 100;
}

.sort-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 0.5rem;
    color: var(--text-primary);
    transition: color 0.2s;
}
.sort-btn:hover {
    color: var(--primary-dark);
}

.sort-btn-in-input {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-secondary);
  transition: color 0.2s;
  z-index: 2;
}
.sort-btn-in-input:hover {
  color: var(--primary-dark);
}
.search-input-container input[type="text"] {
  padding-right: 2.5rem;
}

/* Einheitliche Button-Styles */
.tab,
.assign-tags-btn,
.add-guest-tab-btn,
.btn {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.2;
    min-height: 2.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Spezielles Styling für den "Gast hinzufügen" Button */
#addGuestBtn {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--text-primary);
}

#addGuestBtn:hover {
    background: var(--light);
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}

.tab:hover,
.assign-tags-btn:hover,
.add-guest-tab-btn:hover,
.btn:hover {
    background: var(--light);
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}

.tab.active {
    background: var(--text-primary);
    color: var(--bg-card);
    border-color: var(--primary-dark);
    box-shadow: var(--shadow);
}

/* Disabled States */
.assign-tags-btn:disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--bg-card);
    border-color: var(--border);
    color: var(--text-secondary);
}

.assign-tags-btn:not(:disabled):hover,
.btn:not(:disabled):hover {
    background-color: var(--light);
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}

/* Sekundäre Buttons */
.btn.secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--text-primary);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    min-height: 2.5rem;
    padding: 0.5rem 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    white-space: nowrap;
}

.btn.secondary:hover {
    background: var(--light);
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}

.btn.secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--bg-card);
    border-color: var(--border);
    color: var(--text-secondary);
}

/* --------------------------------------------
   SUCHLEISTE
   -------------------------------------------- */
.search-input-container .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--text-secondary);
    pointer-events: none;
}

.search-input-container input[type="text"] {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    font-size: 0.95rem;
    border-radius: 9999px;
    border: 2px solid var(--text-primary);
    background-color: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.search-input-container input[type="text"]:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.search-input-container input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(168, 128, 71, 0.2);
}

/* --------------------------------------------
   TABELLEN-LAYOUT
   -------------------------------------------- */
.fullwidth-table-container {
    position: absolute;
    top: calc(var(--header-height) + 19.5rem);
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.fullwidth-table-container .table-container {
    height: 100%;
    overflow-y: auto;
    overflow-x: auto;
    background: var(--bg-card);
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    background: var(--bg-card);
}

#guestsTable,
#guestsTable th,
#guestsTable td {
    border: none !important;
}

#guestsTable th,
#guestsTable td {
    border-bottom: 1px solid var(--border) !important;
    text-align: center;
    padding: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tabellen-Header */
#guestsTable th {
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 30;
    border: 1px solid transparent;
    box-sizing: border-box;
}

#guestsTable th:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 2px 8px rgba(124, 92, 44, 0.15);
    background: var(--bg-card);
}

/* Tabellen-Funktionalitäten */
th.draggable {
    cursor: move;
}

th.sortable {
    cursor: pointer;
}

.sort-indicator {
    margin-left: 0.25rem;
    font-size: 0.75rem;
}

/* Resize-Griff */
th .resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    cursor: col-resize;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 15;
}

th:hover .resize-handle {
    opacity: 1;
}

th .resize-handle:hover {
    background: var(--primary-dark);
    width: 6px;
    right: -1px;
}

/* Drag-States */
th.dragging {
    opacity: 0.6;
    background: var(--primary);
    color: var(--bg-card);
    transform: rotate(2deg);
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(124, 92, 44, 0.3);
}

th.drag-over {
    border-left: 3px solid var(--primary);
    background: rgba(124, 92, 44, 0.1);
}

/* Resize-States */
.table-container.resizing {
    cursor: col-resize;
}

.table-container.resizing th {
    pointer-events: none;
}

.table-container.resizing th.resizing-column {
    pointer-events: all;
    background: rgba(124, 92, 44, 0.1);
    border-right: 2px solid var(--primary);
}

/* Zeilen-Hover */
tr:hover {
    background: var(--light);
}

tr:hover td {
    background: var(--light);
}

/* --------------------------------------------
   HAUSHALT-GRUPPIERUNG UND AVATAR-ZELLEN
   -------------------------------------------- */

/* Basis für alle Avatar-Zellen */
.avatar-cell {
    position: relative !important;
    transition: all 0.3s ease !important;
}

/* Haushalt-Gruppierung Basis */
.household-group {
    position: relative !important;
    transition: all 0.3s ease !important;
}

.household-group td {
    border-bottom: none !important;
}

.household-group td:first-child {
    border-left: 4px solid var(--household-border) !important;
    position: relative !important;
}

.household-group.group-bottom td {
    border-bottom: 1px solid var(--border) !important;
}

/* Haushalt-Gruppierung: Obere Zeile */
.avatar-cell.group-top {
    border-left: 2px solid var(--household-border) !important;
    border-right: 2px solid var(--household-border) !important;
    border-top: 2px solid var(--household-border) !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
    border-bottom: none !important;
    background: var(--bg-card) !important;
}

/* Haushalt-Gruppierung: Mittlere Zeilen */
.avatar-cell.group-middle {
    border-left: 2px solid var(--household-border) !important;
    border-right: 2px solid var(--household-border) !important;
    border-top: none !important;
    border-bottom: none !important;
    background: var(--bg-card) !important;
}

/* Haushalt-Gruppierung: Untere Zeile */
.avatar-cell.group-bottom {
    border-left: 2px solid var(--household-border) !important;
    border-right: 2px solid var(--household-border) !important;
    border-bottom: 2px solid var(--household-border) !important;
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
    border-top: none !important;
    background: var(--bg-card) !important;
}

/* Haushalt-Gruppierung: Einzelne Zeile */
.avatar-cell.group-single {
    border: 2px solid var(--household-border) !important;
    border-radius: 12px !important;
    background: var(--bg-card) !important;
}

/* ===================================================
   WICHTIGER SNIPPET: Permanent Selection-Style
   für alle Haushalts-Gruppen (MUSS ERHALTEN BLEIBEN)
   =================================================== */

/* Obere Zeile */
#guestsTable .household-group .avatar-cell.group-top::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: -1px;
    border-left: 2px solid var(--text-primary);
    border-right: 2px solid var(--text-primary);
    border-top: 2px solid var(--text-primary);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    pointer-events: none;
    z-index: 1;
}

/* Mittlere Zeilen */
#guestsTable .household-group .avatar-cell.group-middle::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 8px;
    right: 8px;
    bottom: -1px;
    border-left: 2px solid var(--text-primary);
    border-right: 2px solid var(--text-primary);
    pointer-events: none;
    z-index: 1;
}

/* Untere Zeile */
#guestsTable .household-group .avatar-cell.group-bottom::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-left: 2px solid var(--text-primary);
    border-right: 2px solid var(--text-primary);
    border-bottom: 2px solid var(--text-primary);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    pointer-events: none;
    z-index: 1;
}

/* Single-Zeile (falls nur ein Haushaltseintrag) */
#guestsTable .household-group .avatar-cell.group-single::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 2px solid var(--text-primary);
    border-radius: 24px;
    pointer-events: none;
    z-index: 1;
}

/* Entferne horizontale Linien zwischen gruppierten Zeilen */
#guestsTable .household-group.group-top td,
#guestsTable .household-group.group-middle td {
    border-bottom: none !important;
}

/* ================= ENDE WICHTIGER SNIPPET ================= */

/* --------------------------------------------
   AUTO-HAUSHALT SPEZIELLE STYLES
   -------------------------------------------- */

.auto-household-row td:first-child {
    border-left: 4px solid #ff9800 !important;
}

.auto-household-row .avatar-cell.group-top,
.auto-household-row .avatar-cell.group-middle,
.auto-household-row .avatar-cell.group-bottom,
.auto-household-row .avatar-cell.group-single {
    border-color: #ff9800 !important;
}

.auto-household-row .guest-avatar {
    border-color: #ff9800 !important;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2) !important;
}

/* --------------------------------------------
   GAST-AVATAR
   -------------------------------------------- */
.guest-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.household-group .guest-avatar {
    border: 3px solid var(--household-border) !important;
    box-shadow: 0 0 0 2px rgba(168, 128, 71, 0.2) !important;
    z-index: 10 !important;
    position: relative !important;
}

.household-group .guest-avatar:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 0 0 4px rgba(168, 128, 71, 0.3) !important;
    z-index: 15 !important;
}

.auto-household-row .guest-avatar:hover {
    box-shadow: 0 0 0 4px rgba(255, 152, 0, 0.4) !important;
}

/* --------------------------------------------
   HOVER-EFFEKTE FÜR HAUSHALT-GRUPPEN
   -------------------------------------------- */
.household-group:hover {
    background: var(--light) !important;
}

.household-group:hover td {
    background: var(--light) !important;
}

.household-group:hover .avatar-cell {
    background: var(--light) !important;
}

.household-group:hover .avatar-cell.group-top,
.household-group:hover .avatar-cell.group-middle,
.household-group:hover .avatar-cell.group-bottom,
.household-group:hover .avatar-cell.group-single {
    border-color: var(--primary-dark) !important;
    background: var(--light) !important;
    box-shadow: 0 0 8px rgba(168, 128, 71, 0.3) !important;
}

.auto-household-row.household-group:hover .avatar-cell.group-top,
.auto-household-row.household-group:hover .avatar-cell.group-middle,
.auto-household-row.household-group:hover .avatar-cell.group-bottom,
.auto-household-row.household-group:hover .avatar-cell.group-single {
    border-color: #f57c00 !important;
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.4) !important;
}

/* --------------------------------------------
   TEMPORÄRE SELEKTION-GRUPPIERUNG
   -------------------------------------------- */
#guestsTable .avatar-cell.selection-top::before {
    content: '' !important;
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    right: 8px !important;
    bottom: -1px !important;
    border-left: 2px solid var(--text-primary) !important;
    border-right: 2px solid var(--text-primary) !important;
    border-top: 2px solid var(--text-primary) !important;
    border-top-left-radius: 24px !important;
    border-top-right-radius: 24px !important;
    pointer-events: none !important;
    z-index: 15 !important;
}

#guestsTable .avatar-cell.selection-middle::before {
    content: '' !important;
    position: absolute !important;
    top: -1px !important;
    left: 8px !important;
    right: 8px !important;
    bottom: -1px !important;
    border-left: 2px solid var(--text-primary) !important;
    border-right: 2px solid var(--text-primary) !important;
    pointer-events: none !important;
    z-index: 15 !important;
}

#guestsTable .avatar-cell.selection-bottom::before {
    content: '' !important;
    position: absolute !important;
    top: -1px !important;
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    border-left: 2px solid var(--text-primary) !important;
    border-right: 2px solid var(--text-primary) !important;
    border-bottom: 2px solid var(--text-primary) !important;
    border-bottom-left-radius: 24px !important;
    border-bottom-right-radius: 24px !important;
    pointer-events: none !important;
    z-index: 15 !important;
}

#guestsTable .avatar-cell.selection-single::before {
    content: '' !important;
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    border: 2px solid var(--text-primary) !important;
    border-radius: 24px !important;
    pointer-events: none !important;
    z-index: 15 !important;
}

#guestsTable tr.selection-group-top td,
#guestsTable tr.selection-group-middle td {
    border-bottom: none !important;
}

/* --------------------------------------------
   STATUS-BADGES UND TAGS
   -------------------------------------------- */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.status-badge.confirmed {
    background: #4caf50;
    color: white;
}

.status-badge.declined {
    background: #f44336;
    color: white;
}

.tags-cell {
    max-width: 200px;
    white-space: normal !important;
}

.guest-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    position: relative;
    transition: all 0.2s ease;
    cursor: default;
}

.guest-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tag-remove {
    margin-left: 0.25rem;
    font-weight: bold;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: background 0.2s ease;
}

.tag-remove:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* --------------------------------------------
   FLOATING ACTION BUTTON
   -------------------------------------------- */
.floating-action {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--bg-card);
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(124, 92, 44, 0.3);
    z-index: 1000;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: none;
}

.floating-action.show {
    display: block;
}

.floating-action:hover {
    transform: translateX(-50%) translateY(-5px);
    box-shadow: 0 12px 35px rgba(124, 92, 44, 0.4);
}

/* --------------------------------------------
   MODERNISIERTE MODALE FENSTER
   -------------------------------------------- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: modalBackdropFadeIn 0.3s ease;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    border-radius: 20px;
    padding: 0;
    max-width: 800px;
    width: 95%;
    max-height: 95vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    font-size: 1.8rem;
    color: white;
    margin: 0;
    font-weight: 700;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Moderne Form-Layout */
.modern-form-layout {
    padding: 2rem;
    max-height: calc(95vh - 140px);
    overflow-y: auto;
}

/* Header-Sektion mit Avatar */
.form-header-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--light) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-radius: 15px;
    border: 1px solid var(--border);
}

.companion-header {
    background: linear-gradient(135deg, #fff8e1 0%, rgba(255, 193, 7, 0.1) 100%);
    border: 1px solid #ffd54f;
}

/* Avatar Upload Container */
.avatar-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-width: 120px;
}

.current-avatar-display {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 4px solid var(--primary);
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(124, 92, 44, 0.2);
}

.current-avatar-display:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(124, 92, 44, 0.3);
}

.avatar-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
}

.companion-bg {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
}

.avatar-initials {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    z-index: 2;
}

.avatar-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.current-avatar-display:hover .avatar-upload-overlay {
    opacity: 1;
}

.upload-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.upload-text {
    font-size: 0.7rem;
    color: white;
    font-weight: 600;
}

.hidden-file-input {
    display: none;
}

.upload-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 600;
}

.upload-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 92, 44, 0.3);
}

.companion-upload {
    background: #ff9800;
}

.companion-upload:hover {
    background: #f57c00;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

/* Gast-Info Summary */
.guest-info-summary {
    flex: 1;
}

.guest-name {
    font-size: 1.8rem;
    color: var(--primary);
    margin: 0 0 1rem 0;
    font-weight: 700;
}

.guest-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 25px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    font-size: 1.2rem;
}

.stat-text {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Companion Header Spezial */
.companion-context {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.parent-guest-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.context-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.parent-guest-name {
    font-size: 1.4rem;
    color: var(--primary);
    font-weight: 700;
}

.companion-badge {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
}

/* Form-Sektionen */
.form-section {
    margin-bottom: 2.5rem;
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.5rem 0;
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 700;
}

.section-icon {
    font-size: 1.4rem;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

/* Form-Zeilen und Gruppen */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.form-group.half-width {
    flex: 1;
}

.form-group.third-width {
    flex: 1;
}

.form-group.two-thirds-width {
    flex: 2;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.label-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Moderne Input-Styles */
.modern-input,
.modern-select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
    /* Verbesserte Lesbarkeit */
    height: auto !important;
    line-height: 1.5 !important;
    min-height: 3.5rem !important;
    /* Text nicht abschneiden */
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

/* Spezifische Anpassungen für Select-Elemente */
.modern-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Fokus-Zustand für beide Elemente */
.modern-input:focus,
.modern-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
    text-overflow: clip;
}

/* Hover-Zustand für beide Elemente */
.modern-input:hover,
.modern-select:hover {
    border-color: var(--primary-light);
}

/* Anpassungen für date-Inputs */
input[type="date"].modern-input {
    padding-right: 0.5rem;
    min-height: 3.5rem;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8h8M8 4v4m4-4v4m-6 2h8m-8 4h8'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    border: 2px solid var(--border) !important;
    border-radius: 12px !important;
    color: var(--text-primary) !important;
    background-color: white !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    transition: all 0.3s ease !important;
    line-height: 1.5 !important;
}

/* Hover-Effekt für Datumsfelder */
input[type="date"].modern-input:hover {
    border-color: var(--primary-dark) !important;
}

/* Fokus-Effekt für Datumsfelder */
input[type="date"].modern-input:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(124, 92, 44, 0.15) !important;
}

.modern-input:hover,
.modern-select:hover {
    border-color: var(--primary-dark);
}

.modern-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.relationship-select option {
    padding: 0.5rem;
}

/* Form-Aktionen */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-color: var(--primary);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 92, 44, 0.3);
}

.btn.secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--text-primary);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    min-height: 2.5rem;
    padding: 0.5rem 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    white-space: nowrap;
}

.btn.secondary:hover {
    background: var(--light);
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}

.btn.secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--bg-card);
    border-color: var(--border);
    color: var(--text-secondary);
}

.save-btn {
    position: relative;
    overflow: hidden;
}

.save-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.save-btn:hover:before {
    left: 100%;
}

.btn-icon {
    font-size: 1.1rem;
}

/* Modal-Animationen */
@keyframes modalBackdropFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Scrollbar-Styling für Modal-Content */
.modern-form-layout::-webkit-scrollbar {
    width: 8px;
}

.modern-form-layout::-webkit-scrollbar-track {
    background: var(--light);
    border-radius: 4px;
}

.modern-form-layout::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.modern-form-layout::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* --------------------------------------------
   TAG-MANAGEMENT MODAL
   -------------------------------------------- */
.tags-management-section {
    margin-bottom: 1rem;
}

.tags-management-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    min-height: 50px;
    padding: 1rem;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: var(--light);
}

.existing-tag {
    position: relative;
    transition: all 0.3s ease;
}

.existing-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.delete-tag-btn:hover {
    background: rgba(255, 255, 255, 0.5) !important;
    transform: scale(1.1);
}

/* --------------------------------------------
   TAGS ZUWEISEN MODAL
   -------------------------------------------- */
.assign-tags-section {
    text-align: center;
}

.assign-tags-section h3 {
    margin: 1.5rem 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

#selectedGuestsInfo {
    background: var(--light);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-left: 4px solid var(--primary);
}

.available-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    min-height: 80px;
    padding: 1rem;
    border: 1px dashed var(--border);
    border-radius: 10px;
}

.selectable-tag {
    transition: all 0.3s ease !important;
    user-select: none;
}

.selectable-tag:hover {
    opacity: 1 !important;
    transform: scale(1.05) !important;
}

.assign-tags-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* --------------------------------------------
   RSVP-STATISTIKEN
   -------------------------------------------- */
.rsvp-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.rsvp-stat-item {
    background: var(--light);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.rsvp-stat-item h4 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.rsvp-stat-item .count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.chart-container {
    margin-top: 2rem;
    height: 300px;
}

/* --------------------------------------------
   ANIMATIONEN
   -------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes householdFormation {
    0% {
        border-color: transparent;
        transform: scale(0.95);
        opacity: 0.7;
    }
    50% {
        border-color: var(--household-border);
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        border-color: var(--household-border);
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.newly-grouped .avatar-cell {
    animation: householdFormation 0.8s ease-out !important;
}

/* --------------------------------------------
   RESPONSIVE DESIGN
   -------------------------------------------- */
@media (max-width: 1024px) {
    .search-input-container {
        width: 220px;
    }
    
    .modal-content {
        max-width: 700px;
    }
    
    .form-header-section {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .tabs-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    .tabs {
        flex: 1 1 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }

    .search-bar-wrapper {
        position: relative;
        left: auto;
        transform: none;
        margin-bottom: 0.5rem;
    }

    .search-input-container {
        width: 100%;
        max-width: 400px;
    }

    .tab,
    .assign-tags-btn,
    .add-guest-tab-btn,
    .btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

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

    .floating-action {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }

    th .resize-handle {
        width: 6px;
    }

    .avatar-cell.group-top,
    .avatar-cell.group-middle,
    .avatar-cell.group-bottom,
    .avatar-cell.group-single {
        border-width: 1px !important;
    }
    
    .avatar-cell.group-top,
    .avatar-cell.group-bottom,
    .avatar-cell.group-single {
        border-radius: 8px !important;
    }
    
    .household-group .guest-avatar {
        border-width: 2px !important;
    }
    
    /* Mobile Modal-Anpassungen */
    .modal-content {
        width: 98%;
        max-height: 98vh;
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.4rem;
    }
    
    .modern-form-layout {
        padding: 1.5rem;
    }
    
    .form-header-section {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .current-avatar-display {
        width: 80px;
        height: 80px;
    }
    
    .avatar-initials {
        font-size: 1.5rem;
    }
    
    .guest-name {
        font-size: 1.4rem;
    }
    
    .guest-stats {
        justify-content: center;
        gap: 1rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group.half-width,
    .form-group.third-width,
    .form-group.two-thirds-width {
        flex: none;
        width: 100%;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .section-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .modern-input,
    .modern-select {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
    
    .companion-context {
        text-align: center;
    }
    
    .parent-guest-name {
        font-size: 1.2rem;
    }
    
    .upload-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: none;
    }
    
    .modal-header {
        border-radius: 0;
        padding: 1rem;
    }
    
    .modern-form-layout {
        padding: 1rem;
        max-height: calc(100vh - 100px);
    }
    
    .form-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .current-avatar-display {
        width: 70px;
        height: 70px;
    }
    
    .guest-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stat-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .upload-button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* --------------------------------------------
   DEBUG UTILITIES
   -------------------------------------------- */
.debug-households .avatar-cell.group-top::after {
    content: 'TOP';
    position: absolute;
    top: 2px;
    right: 2px;
    background: red;
    color: white;
    font-size: 8px;
    padding: 1px 3px;
    border-radius: 2px;
    z-index: 20;
}

.debug-households .avatar-cell.group-middle::after {
    content: 'MID';
    position: absolute;
    top: 2px;
    right: 2px;
    background: orange;
    color: white;
    font-size: 8px;
    padding: 1px 3px;
    border-radius: 2px;
    z-index: 20;
}

.debug-households .avatar-cell.group-bottom::after {
    content: 'BOT';
    position: absolute;
    top: 2px;
    right: 2px;
    background: green;
    color: white;
    font-size: 8px;
    padding: 1px 3px;
    border-radius: 2px;
    z-index: 20;
}

.debug-households .avatar-cell.group-single::after {
    content: 'SINGLE';
    position: absolute;
    top: 2px;
    right: 2px;
    background: blue;
    color: white;
    font-size: 8px;
    padding: 1px 3px;
    border-radius: 2px;
    z-index: 20;
}

/* ============================================
   MODERNISIERTE TAGS-MANAGEMENT STYLES
   Diese Styles ersetzen die alten Tags-Styles
   ============================================ */

/* --------------------------------------------
   TAGS MODAL HEADER STYLES
   -------------------------------------------- */
.tags-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: 1px solid #5a67d8 !important;
}

.assign-tags-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    border: 1px solid #ed64a6 !important;
}

.tags-stats-container,
.selection-info-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

/* --------------------------------------------
   TAGS ICON DISPLAY
   -------------------------------------------- */
.tags-icon-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-width: 120px;
}

.tags-icon-placeholder {
    position: relative;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    overflow: visible;
}

.tags-main-icon {
    font-size: 3rem;
    z-index: 2;
}

.tags-floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-tag {
    position: absolute;
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.floating-tag:nth-child(1) {
    top: -10px;
    right: 10px;
    animation-delay: 0s;
}

.floating-tag:nth-child(2) {
    bottom: -5px;
    left: 15px;
    animation-delay: 1s;
}

.floating-tag:nth-child(3) {
    top: 20px;
    left: -10px;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-8px) rotate(5deg); }
    66% { transform: translateY(4px) rotate(-3deg); }
}

/* --------------------------------------------
   SELECTION AVATAR STACK
   -------------------------------------------- */
.selection-icon-display {
    min-width: 120px;
}

.selection-avatar-stack {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 80px;
}

.avatar-stack-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    border: 3px solid white;
    margin-left: -10px;
    position: relative;
    z-index: 1;
}

.avatar-stack-item:first-child {
    margin-left: 0;
}

.avatar-stack-more {
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--primary) !important;
    font-size: 0.8rem;
    z-index: 10;
}

/* --------------------------------------------
   TAGS SUMMARY SECTION
   -------------------------------------------- */
.tags-summary,
.selection-summary {
    flex: 1;
    color: white;
}

.tags-title,
.selection-title {
    font-size: 1.8rem;
    color: white;
    margin: 0 0 1rem 0;
    font-weight: 700;
}

.tags-overview {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.selection-details {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.selection-count {
    display: flex;
    gap: 1rem;
}

.count-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --------------------------------------------
   MODERNE TAGS LISTE
   -------------------------------------------- */
.modern-tags-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    min-height: 120px;
    padding: 1.5rem;
    border: 2px dashed var(--border);
    border-radius: 15px;
    background: var(--light);
}

.modern-tag-item {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

.modern-tag-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.tag-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.tag-display {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag-delete-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    color: #f44336 !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    cursor: pointer;
    font-size: 0.8rem !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0 !important;
    margin: 0 !important;
}

.tag-delete-btn:hover {
    background: #f44336 !important;
    color: white !important;
    transform: scale(1.1);
}

.tag-item-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.tag-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* --------------------------------------------
   MODERNE TAG AUSWAHL
   -------------------------------------------- */
.modern-tags-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    min-height: 150px;
    padding: 1.5rem;
    border: 2px dashed var(--border);
    border-radius: 15px;
    background: var(--light);
}

.selectable-tag-item {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.selectable-tag-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.selectable-tag-item.selected {
    border-color: var(--primary) !important;
    background: var(--light) !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 4px 20px rgba(124, 92, 44, 0.2) !important;
}

.selectable-tag-item.selected::before {
    content: '✅';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1.2rem;
    z-index: 2;
}

.selectable-tag-display {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
    margin-bottom: 0.5rem;
    min-height: 32px;
    justify-content: center;
}

.tag-select-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* --------------------------------------------
   FARB-INPUT VERBESSERUNGEN
   -------------------------------------------- */
.color-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modern-color-input {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.modern-color-input:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.color-preview {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #e91e63;
}

.color-presets {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.color-preset {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.color-preset:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------
   TAG VORSCHAU
   -------------------------------------------- */
.tag-preview-section {
    margin: 1rem 0;
}

.preview-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.tag-preview-container {
    padding: 1rem;
    background: var(--light);
    border-radius: 10px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-tag {
    font-size: 1rem !important;
    padding: 0.5rem 1rem !important;
    background: #e91e63 !important;
    color: white !important;
    border-radius: 20px !important;
    transition: all 0.3s ease;
}

/* --------------------------------------------
   AUSGEWÄHLTE TAGS VORSCHAU
   -------------------------------------------- */
.selected-tags-preview {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(124, 92, 44, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(124, 92, 44, 0.3);
}

.selected-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.selected-tag-item {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    position: relative;
}

/* --------------------------------------------
   ZUWEISUNGS-ZUSAMMENFASSUNG
   -------------------------------------------- */
.assignment-summary {
    background: var(--light);
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.summary-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.summary-content {
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.summary-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

/* --------------------------------------------
   BUTTON VERBESSERUNGEN
   -------------------------------------------- */
.create-tag-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    position: relative;
    overflow: hidden;
    border: none !important;
}

.create-tag-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3) !important;
}

.assign-tags-action-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    position: relative;
    overflow: hidden;
    border: none !important;
}

.assign-tags-action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.3) !important;
}

.assign-tags-action-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    background: #ccc !important;
    transform: none !important;
    box-shadow: none !important;
}

/* --------------------------------------------
   INFO BOXEN
   -------------------------------------------- */
.info-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(74, 144, 226, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 10px;
    font-size: 0.9rem;
}

.info-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-text {
    color: var(--text-primary);
}

.input-helper {
    margin-top: 0.5rem;
}

.input-helper small {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.tags-actions-info,
.selection-info-box {
    margin-top: 1rem;
}

.tags-grid-container,
.tags-selection-container {
    margin-bottom: 1rem;
}

/* --------------------------------------------
   RESPONSIVE ANPASSUNGEN
   -------------------------------------------- */
@media (max-width: 768px) {
    .tags-stats-container,
    .selection-info-container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .modern-tags-list,
    .modern-tags-selection {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .color-presets {
        justify-content: center;
    }
    
    .tags-overview {
        justify-content: center;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-group.two-thirds-width,
    .form-group.third-width {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .tags-icon-placeholder {
        width: 80px;
        height: 80px;
    }
    
    .tags-main-icon {
        font-size: 2rem;
    }
    
    .floating-tag {
        font-size: 1rem;
    }
    
    .modern-tag-item,
    .selectable-tag-item {
        padding: 0.75rem;
    }
    
    .tags-title,
    .selection-title {
        font-size: 1.4rem;
    }
    
    .modern-tags-list,
    .modern-tags-selection {
        padding: 1rem;
        min-height: 100px;
    }
}

/* --------------------------------------------
   ALTE TAGS-STYLES ÜBERSCHREIBEN
   -------------------------------------------- */
.tags-management-section {
    margin-bottom: 0; /* Reset für neue Struktur */
}

.tags-list {
    /* Wird durch .modern-tags-list ersetzt */
    display: none;
}

.available-tags {
    /* Wird durch .modern-tags-selection ersetzt */
    display: none;
}

.assign-tags-section {
    text-align: left; /* Reset center alignment */
}

.existing-tag {
    /* Wird durch .modern-tag-item ersetzt */
    display: none;
}

.selectable-tag {
    /* Wird durch .selectable-tag-item ersetzt */
    display: none;
}

/* --------------------------------------------
   HOUSEHOLD ASSIGNMENT MODAL STYLES
   -------------------------------------------- */

/* Household Header */
.household-header {
    background: linear-gradient(135deg, #3f51b5 0%, #673ab7 100%) !important;
    border: 1px solid #3f51b5 !important;
}

.household-stats-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.household-icon-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-width: 120px;
}

.household-icon-placeholder {
    position: relative;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.household-main-icon {
    font-size: 3rem;
    z-index: 2;
}

.household-summary {
    flex: 1;
    color: white;
}

.household-title {
    font-size: 1.8rem;
    color: white;
    margin: 0 0 1rem 0;
    font-weight: 700;
}

.household-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Selected Guests Display */
.selected-guests-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.guest-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Modern Households List */
.modern-households-list {
    max-height: 400px;
    overflow-y: auto;
    border: 2px dashed var(--border);
    border-radius: 15px;
    background: var(--light);
    padding: 1rem;
}

.modern-household-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.modern-household-item:last-child {
    margin-bottom: 0;
}

.modern-household-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.modern-household-item.selected {
    border-color: var(--primary) !important;
    background: var(--light) !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 4px 20px rgba(124, 92, 44, 0.2) !important;
}

.modern-household-item.selected::before {
    content: '✅';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1.2rem;
    z-index: 2;
}

.household-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

.household-main-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    cursor: pointer;
}

.household-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.household-details {
    flex: 1;
}

.household-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.household-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.household-member-count {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.household-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.household-delete-btn {
    background: rgba(244, 67, 54, 0.1) !important;
    border: 1px solid rgba(244, 67, 54, 0.3) !important;
    color: #f44336 !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    cursor: pointer;
    font-size: 1.1rem !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0 !important;
    margin: 0 !important;
}

.household-delete-btn:hover {
    background: #f44336 !important;
    color: white !important;
    border-color: #f44336 !important;
    transform: scale(1.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-message {
    margin: 0;
    font-style: italic;
    line-height: 1.6;
}

.empty-message small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Loading Message */
.loading-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Confirmation Section */
.confirmation-text {
    background: var(--light);
    border-radius: 10px;
    padding: 1rem;
    border-left: 4px solid var(--primary);
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1001;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    border-left-color: var(--success) !important;
}

.notification-error {
    border-left-color: var(--danger) !important;
}

.notification-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notification-text {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
}

/* Responsive Improvements for Household Modal */
@media (max-width: 768px) {
    .household-stats-container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .modern-households-list {
        max-height: 300px;
        padding: 0.75rem;
    }
    
    .household-item-header {
        padding: 0.75rem;
    }
    
    .household-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .household-name {
        font-size: 1rem;
    }
    
    .selected-guests-list {
        justify-content: center;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .household-icon-placeholder {
        width: 80px;
        height: 80px;
    }
    
    .household-main-icon {
        font-size: 2rem;
    }
    
    .household-title {
        font-size: 1.4rem;
    }
    
    .modern-household-item {
        margin-bottom: 0.5rem;
    }
    
    .household-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .household-main-content {
        width: 100%;
    }
    
    .household-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* --------------------------------------------
   CSS LOADED INDICATOR
   -------------------------------------------- */
.css-household-fixes-loaded {
    display: none;
    content: 'loaded';
}

/* Cropper-Modal Anpassungen */
#imageCropperModal .modal-content {
    max-width: 95vw !important;
    width: 95vw !important;
    max-height: 95vh !important;
    height: auto !important;
    display: flex;
    flex-direction: column;
}
#imageCropperModal .modal-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 1rem;
}
#imageCropperModal .cropper-container {
    max-width: 320px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
#imageCropperModal #cropperImage {
    max-width: 320px;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
#imageCropperModal .modal-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 2rem 1.5rem 2rem;
    background: none;
    border: none;
}
@media (max-width: 600px) {
  #imageCropperModal .modal-content {
    max-width: 100vw !important;
    width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }
  #imageCropperModal .modal-body {
    padding: 0.5rem !important;
  }
  #imageCropperModal .cropper-container {
    max-width: 95vw;
  }
  #imageCropperModal #cropperImage {
    max-width: 95vw;
  }
  #imageCropperModal .modal-footer {
    padding: 1rem 0.5rem 1.2rem 0.5rem;
  }
}

/* Verbesserte Darstellung für ausgewählte Option in .modern-select */
.modern-select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    /* Text nicht abschneiden */
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Verbesserte Lesbarkeit */
    height: auto !important;
    line-height: 1.5 !important;
    min-height: 3.5rem !important;
}

.modern-select option {
    white-space: normal !important;
    text-overflow: ellipsis !important;
    overflow: visible !important; /* Wichtig: overflow auf visible setzen */
    padding: 8px 12px;
    font-size: 1rem;
    line-height: 1.5;
}

/* Für Safari: Verbesserte Darstellung von Select-Elementen */
@media screen and (-webkit-min-device-pixel-ratio:0) {
  .modern-select {
    text-indent: 1px;
    text-overflow: ellipsis;
    padding-right: 30px;
  }
  
  .modern-select option {
    padding: 8px 12px;
  }
}

/* Styling für .modern-select anpassen - gleiche Größe wie Textfelder */
.modern-select {
    font-size: 1rem;
    padding: 0.875rem 1.25rem;
    text-align: left;
    cursor: pointer;
}

/* Zusätzliches Styling für Select-Elemente, um Text-Abschneiden zu verhindern */
.modern-select:focus {
    text-overflow: clip;
}

/* Verbesserte Darstellung für Select-Optionen */
.modern-select option {
    padding: 10px 15px;
    line-height: 1.5;
}

/* Anpassung der Dropdown-Pfeile für bessere Darstellung */
.modern-select::-ms-expand {
    display: none;
}

/* ============================================
   MODERNES HAUSHALT-MODAL DESIGN
   ============================================ */

/* Modal Container */
.modern-modal {
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.6);
}

.household-modal-content {
    max-width: 900px;
    width: 95vw;
    max-height: 95vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header Design */
.modern-modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.modern-modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: headerShimmer 6s ease-in-out infinite;
}

@keyframes headerShimmer {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.3; }
    50% { transform: scale(1.1) rotate(5deg); opacity: 0.1; }
}

.header-icon-section {
    flex-shrink: 0;
}

.header-icon-container {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-main-icon {
    font-size: 3rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-5px) scale(1.05); }
}

.header-floating-icons {
    position: absolute;
    inset: 0;
}

.floating-icon {
    position: absolute;
    font-size: 1.2rem;
    opacity: 0.7;
    animation: floatAround 8s ease-in-out infinite;
}

.floating-icon:nth-child(1) {
    top: 10%;
    right: 15%;
    animation-delay: 0s;
}

.floating-icon:nth-child(2) {
    bottom: 15%;
    left: 10%;
    animation-delay: 2s;
}

.floating-icon:nth-child(3) {
    top: 20%;
    left: 5%;
    animation-delay: 4s;
}

@keyframes floatAround {
    0%, 100% { transform: translate(0, 0) scale(0.8); opacity: 0.5; }
    25% { transform: translate(10px, -5px) scale(1); opacity: 0.8; }
    50% { transform: translate(-5px, -10px) scale(0.9); opacity: 0.6; }
    75% { transform: translate(-8px, 5px) scale(1.1); opacity: 0.7; }
}

.header-content {
    flex: 1;
}

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.modal-subtitle {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 400;
}

.modern-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,0.2);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modern-close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Body Layout */
.modern-modal-body {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Section Styling */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.section-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.selection-count-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(124, 92, 44, 0.3);
}

/* Ausgewählte Gäste */
.selected-guests-container {
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 2rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.no-selection-state {
    text-align: center;
    color: var(--text-secondary);
}

.no-selection-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-selection-state p {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.no-selection-state small {
    font-size: 0.9rem;
}

/* Haushalt-Optionen */
.household-choice-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.household-option {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.household-option:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(124, 92, 44, 0.1);
    transform: translateY(-2px);
}

.option-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.option-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.option-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.option-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Form Styling */
.modern-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.label-icon {
    font-size: 1.2rem;
}

/* Diese Regeln werden jetzt durch die gemeinsame Definition oben abgedeckt */
/* .modern-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
} */

/* Diese Regeln werden jetzt durch die gemeinsame Definition oben abgedeckt */
/* .modern-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 92, 44, 0.1);
} */

.input-helper {
    margin-top: 0.5rem;
}

.input-helper small {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Preview */
.household-preview {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-soft);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.preview-household-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.household-card-icon {
    font-size: 2rem;
}

.household-card-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.household-card-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Summary Card */
.summary-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.summary-value {
    font-weight: 700;
    color: var(--text-primary);
}

/* Footer */
.modern-modal-footer {
    padding: 2rem;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn.large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    min-height: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .household-modal-content {
        width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .household-choice-container {
        grid-template-columns: 1fr;
    }
    
    .modern-modal-header {
        padding: 1.5rem;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .modern-modal-body {
        padding: 1.5rem;
    }
}

.search-input-container.with-badge {
  display: flex;
  align-items: center;
  position: relative;
  background: white;
  border-radius: 9999px;
  border: 2px solid var(--text-primary);
  padding-left: 2.5rem;
  padding-right: 1rem;
}
.input-badge-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  width: 100%;
}
.filter-badge {
  display: flex;
  align-items: center;
  background: var(--filter-badge-bg, #e6f7ec);
  border: 1.5px solid var(--filter-badge-border, #4caf50);
  color: var(--filter-badge-color, #256029);
  border-radius: 999px;
  padding: 0.2rem 0.9rem 0.2rem 0.9rem;
  font-size: 1rem;
  margin-right: 0.5rem;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(76,175,80,0.07);
  position: relative;
  transition: background 0.2s, border 0.2s;
  padding-right: 0.9rem;
}
.filter-badge[data-type="Anreise"] {
  --filter-badge-bg: #e3f2fd;
  --filter-badge-border: #2196f3;
  --filter-badge-color: #0d47a1;
  box-shadow: 0 2px 8px rgba(33,150,243,0.07);
}
.filter-badge-x {
  margin-left: 0.2rem;
  cursor: pointer;
  font-size: 1.1em;
  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: opacity 0.2s, width 0.2s, margin-left 0.2s;
  display: inline-block;
}
.filter-badge:hover .filter-badge-x {
  opacity: 1;
  width: 1em;
  margin-left: 0.5rem;
  transition: padding-right 0.2s;
}

/* === Dropdown-Tabs für Dashboard === */
.tab-dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.3em;
}
.dropdown-arrow {
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

.tab-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}
.dropdown-menu {
  display: none;
  position: absolute;
  left: 0;
  top: 110%;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  min-width: 180px;
  z-index: 100;
  flex-direction: column;
}
.tab-dropdown.open .dropdown-menu {
  display: flex;
}
.dropdown-item {
  background: none;
  border: none;
  padding: 0.8em 1.2em;
  text-align: left;
  cursor: pointer;
  font-size: 1em;
  color: var(--text-primary);
  transition: background 0.2s;
}
.dropdown-item:hover {
  background: var(--light);
}

/* Dropdown Divider for Household Leader Feature */
.dropdown-divider {
  height: 1px;
  margin: 8px 0;
  background: #e5e7eb;
  border: none;
}

/* Special styling for household leader button */
.dropdown-item[data-tab="make-household-leader"] {
  color: var(--primary-dark);
  font-weight: 500;
}

.dropdown-item[data-tab="make-household-leader"]:hover {
  background: var(--light);
  color: var(--primary);
}
@media (max-width: 900px) {
  .tabs-left {
    flex-wrap: wrap;
    gap: 0.3rem;
  }
  .dropdown-menu {
    min-width: 120px;
    font-size: 0.95em;
  }
}

/* Spezielles Styling für den "Gast hinzufügen" Button */
.add-guest-tab-btn {
    background: var(--bg-card);
    color: var(--text-primary);
}

.add-guest-tab-btn:hover {
    background: var(--light);
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}

/* Gast-Typ-Auswahl */
.guest-type-selector {
    margin-bottom: 2rem;
}

.type-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.type-option:hover {
    border-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.type-option.active {
    border-color: var(--primary-dark);
    background: var(--light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.type-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.type-label {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Begleitpersonen-Bereich */
.companions-section {
    margin-top: 2rem;
    border-top: 1px dashed var(--border);
    padding-top: 2rem;
}

.companions-container {
    margin-bottom: 1.5rem;
}

.companion-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.companion-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.companion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.companion-title {
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.companion-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

.remove-companion-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-companion-btn:hover {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.add-companion-btn {
    width: 100%;
    justify-content: center;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    color: var(--text-secondary);
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.add-companion-btn:hover {
    background: var(--light);
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}

/* Browser-spezifische Autofill-Styles überschreiben */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px white inset !important;
    transition: background-color 5000s ease-in-out 0s;
    border: 2px solid var(--border) !important;
    border-radius: 12px !important;
    color: var(--text-primary) !important;
}

/* Einheitliche Darstellung für alle Eingabetypen erzwingen */
input[type="email"],
input[type="number"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    border: 2px solid var(--border) !important;
    border-radius: 12px !important;
    color: var(--text-primary) !important;
    background-color: white !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    padding: 0.875rem 1.25rem !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    transition: all 0.3s ease !important;
    min-height: 3.5rem !important;
    line-height: 1.5 !important;
}

/* Hover-Effekt für E-Mail und Zahlenfelder */
input[type="email"]:hover,
input[type="number"]:hover {
    border-color: var(--primary-dark) !important;
}

/* Fokus-Effekt für E-Mail und Zahlenfelder */
input[type="email"]:focus,
input[type="number"]:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(124, 92, 44, 0.15) !important;
}

/* Eingabefelder im "Gast hinzufügen" Modal */
#addGuestModal input[type="email"],
#addGuestModal input[type="number"],
#addGuestModal input[type="tel"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    border: 2px solid var(--border) !important;
    border-radius: 12px !important;
    color: var(--text-primary) !important;
    background-color: white !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    padding: 0.875rem 1.25rem !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    transition: all 0.3s ease !important;
    min-height: 3.5rem !important;
    line-height: 1.5 !important;
}

/* Hover-Effekt für Eingabefelder im "Gast hinzufügen" Modal */
#addGuestModal input[type="email"]:hover,
#addGuestModal input[type="number"]:hover,
#addGuestModal input[type="tel"]:hover {
    border-color: var(--primary-dark) !important;
}

/* Fokus-Effekt für Eingabefelder im "Gast hinzufügen" Modal */
#addGuestModal input[type="email"]:focus,
#addGuestModal input[type="number"]:focus,
#addGuestModal input[type="tel"]:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(124, 92, 44, 0.15) !important;
}

/* Datumsfelder im "Gast hinzufügen" Modal */
#addGuestModal input[type="date"].modern-input {
    padding-right: 0.5rem;
    min-height: 3.5rem;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8h8M8 4v4m4-4v4m-6 2h8m-8 4h8'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    border: 2px solid var(--border) !important;
    border-radius: 12px !important;
    color: var(--text-primary) !important;
    background-color: white !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    transition: all 0.3s ease !important;
    line-height: 1.5 !important;
}

/* Hover-Effekt für Datumsfelder im "Gast hinzufügen" Modal */
#addGuestModal input[type="date"].modern-input:hover {
    border-color: var(--primary-dark) !important;
}

/* Fokus-Effekt für Datumsfelder im "Gast hinzufügen" Modal */
#addGuestModal input[type="date"].modern-input:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(124, 92, 44, 0.15) !important;
}

/* Autofill-Stile für "Gast hinzufügen" Modal überschreiben */
#addGuestModal input:-webkit-autofill,
#addGuestModal input:-webkit-autofill:hover, 
#addGuestModal input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px white inset !important;
    transition: background-color 5000s ease-in-out 0s;
    border: 2px solid var(--border) !important;
    border-radius: 12px !important;
    color: var(--text-primary) !important;
}

/* Begleitpersonen-Formulare im "Gast hinzufügen" Modal */
#addGuestModal .companions-container input[type="email"],
#addGuestModal .companions-container input[type="number"],
#addGuestModal .companions-container input[type="tel"],
#addGuestModal .companions-container input[type="text"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    border: 2px solid var(--border) !important;
    border-radius: 12px !important;
    color: var(--text-primary) !important;
    background-color: white !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    padding: 0.875rem 1.25rem !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    transition: all 0.3s ease !important;
    min-height: 3.5rem !important;
    line-height: 1.5 !important;
}

/* Hover-Effekt für Begleitpersonen-Formulare */
#addGuestModal .companions-container input[type="email"]:hover,
#addGuestModal .companions-container input[type="number"]:hover,
#addGuestModal .companions-container input[type="tel"]:hover,
#addGuestModal .companions-container input[type="text"]:hover {
    border-color: var(--primary-dark) !important;
}

/* Fokus-Effekt für Begleitpersonen-Formulare */
#addGuestModal .companions-container input[type="email"]:focus,
#addGuestModal .companions-container input[type="number"]:focus,
#addGuestModal .companions-container input[type="tel"]:focus,
#addGuestModal .companions-container input[type="text"]:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(124, 92, 44, 0.15) !important;
}

/* Datumsfelder in Begleitpersonen-Formularen */
#addGuestModal .companions-container input[type="date"].modern-input {
    padding-right: 0.5rem;
    min-height: 3.5rem;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8h8M8 4v4m4-4v4m-6 2h8m-8 4h8'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    border: 2px solid var(--border) !important;
    border-radius: 12px !important;
    color: var(--text-primary) !important;
    background-color: white !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    transition: all 0.3s ease !important;
    line-height: 1.5 !important;
}

/* Hover-Effekt für Datumsfelder in Begleitpersonen-Formularen */
#addGuestModal .companions-container input[type="date"].modern-input:hover {
    border-color: var(--primary-dark) !important;
}

/* Fokus-Effekt für Datumsfelder in Begleitpersonen-Formularen */
#addGuestModal .companions-container input[type="date"].modern-input:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(124, 92, 44, 0.15) !important;
}

/* Vorname und Nachname im Hauptformular des "Gast hinzufügen" Modals */
#addGuestModal input[type="text"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    border: 2px solid var(--border) !important;
    border-radius: 12px !important;
    color: var(--text-primary) !important;
    background-color: white !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    padding: 0.875rem 1.25rem !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    transition: all 0.3s ease !important;
    min-height: 3.5rem !important;
    line-height: 1.5 !important;
}

/* Hover-Effekt für Vorname und Nachname */
#addGuestModal input[type="text"]:hover {
    border-color: var(--primary-dark) !important;
}

/* Fokus-Effekt für Vorname und Nachname */
#addGuestModal input[type="text"]:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(124, 92, 44, 0.15) !important;
}

/* --------------------------------------------
   MODERNE HAUSHALTS-VERWALTUNG
   -------------------------------------------- */

/* Modal Styling */
.modern-household-management {
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2) !important;
    overflow: hidden !important;
}

.modern-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    padding: 2rem !important;
    border-radius: 0 !important;
    border: none !important;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-icon .household-icon {
    font-size: 3rem;
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.3));
}

.header-text h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: white !important;
}

.header-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
    font-weight: 400;
}

.modern-close {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
}

.modern-close:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: scale(1.1) !important;
}

/* Body Styling */
.modern-body {
    padding: 0 !important;
    background: #f8fafc !important;
}

/* Toolbar */
.household-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: white;
    border-bottom: 2px solid #e2e8f0;
    gap: 1rem;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 2000px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #64748b;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.household-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    background: #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    white-space: nowrap;
}

/* Container */
.households-container {
    padding: 1.5rem 2rem 2rem 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

/* Loading/Empty/Error States */
.loading-state, .empty-state, .error-state {
    text-align: center;
    padding: 3rem 1rem;
}

.loading-spinner {
    font-size: 2.5rem;
    animation: spin 1s linear infinite;
}

.empty-icon, .error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.loading-state p, .empty-state h3, .error-state h3 {
    margin: 1rem 0 0.5rem 0;
    font-size: 1.2rem;
    color: #475569;
}

.empty-state p, .error-state p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

/* Household Cards Grid */
.household-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.household-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.household-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.household-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.household-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.household-title .household-icon {
    font-size: 1.5rem;
    color: #667eea;
}

.household-name {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.household-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.member-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    border: 2px solid;
}

.member-count.status-empty {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.member-count.status-active {
    color: #059669;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.status-icon {
    font-size: 1.1rem;
}

.created-date {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* Card Actions */
.card-actions {
    display: flex;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
    background: #f8fafc;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid;
    text-decoration: none;
}

.rename-btn {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.rename-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.delete-btn.delete-safe {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

.delete-btn.delete-safe:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.delete-btn.delete-warning {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.delete-btn.delete-warning:hover {
    background: #d97706;
    border-color: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-icon {
    font-size: 1rem;
}

.btn-text {
    font-size: 0.9rem;
}

/* Modal Footer */
.modal-footer {
    padding: 1.5rem 2rem;
    background: white;
    border-top: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .household-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .household-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .search-container {
        max-width: none;
    }
    
    .household-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .modal-footer {
        flex-direction: column-reverse;
    }
}