/* ═══════════════════════════════════════
   GUEST LIST MANAGER
═══════════════════════════════════════ */

/* Dashboard counters */
.guests-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.guests-counter {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border-left: 3px solid var(--border);
    transition: var(--transition);
}
.guests-counter:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}
.guests-counter[data-type="total"] {
    border-left-color: var(--txt-m);
}
.guests-counter[data-type="confirmed"] {
    border-left-color: var(--sage);
}
.guests-counter[data-type="declined"] {
    border-left-color: var(--terra);
}
.guests-counter[data-type="pending"] {
    border-left-color: #d4a84b;
}
.guests-counter[data-type="plusones"] {
    border-left-color: var(--terra-l);
}
.guests-counter[data-type="meals"] {
    border-left-color: var(--sage-d);
    flex-direction: column;
    align-items: stretch;
}
.counter-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--cream);
    flex-shrink: 0;
}
.guests-counter[data-type="total"] .counter-icon {
    color: var(--txt-m);
}
.guests-counter[data-type="confirmed"] .counter-icon {
    color: var(--sage);
}
.guests-counter[data-type="declined"] .counter-icon {
    color: var(--terra);
}
.guests-counter[data-type="pending"] .counter-icon {
    color: #d4a84b;
}
.guests-counter[data-type="plusones"] .counter-icon {
    color: var(--terra-l);
}
.counter-data {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}
.counter-value {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--txt);
    line-height: 1;
}
.counter-label {
    font-size: 0.68rem;
    color: var(--txt-l);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 400;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.guests-counter-chart .counter-label {
    margin-bottom: 6px;
}
.meal-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.meal-bar-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    color: var(--txt-m);
}
.meal-bar-label {
    width: 60px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.meal-bar-track {
    flex: 1;
    height: 6px;
    background: var(--cream-d);
    border-radius: 3px;
    overflow: hidden;
}
.meal-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}
.meal-bar-count {
    width: 20px;
    font-weight: 500;
}

/* Filters */
.guests-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.guests-filters input[type="text"] {
    flex: 1;
    min-width: 180px;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.82rem;
    color: var(--txt);
    transition: border-color 0.2s;
}
.guests-filters input[type="text"]:focus {
    border-color: var(--terra-l);
    outline: none;
}
.guests-filter-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fff;
    font-family: inherit;
    font-size: 0.72rem;
    color: var(--txt-m);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.filter-pill:hover {
    border-color: var(--terra-l);
    color: var(--terra);
}
.filter-pill.active {
    background: var(--terra);
    border-color: var(--terra);
    color: #fff;
    font-weight: 500;
}
.pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pill-dot-confirmed {
    background: var(--sage);
}
.pill-dot-invited {
    background: #d4a84b;
}
.pill-dot-declined {
    background: var(--terra);
}
.pill-dot-notinvited {
    background: var(--txt-xl);
}
.filter-pill.active .pill-dot {
    background: rgba(255, 255, 255, 0.7);
}

/* Quick-add row */
.guests-quick-add {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px dashed var(--cream-d);
}
.qa-input {
    flex: 1;
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid var(--cream-d);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.78rem;
    color: var(--txt);
    transition: border-color 0.2s;
}
.qa-input:focus {
    border-color: var(--terra-l);
    outline: none;
}
.qa-input select,
.guests-quick-add select {
    flex: 0 0 120px;
}
.guests-quick-add .btn span {
    display: none;
}

/* Status badges in table */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.status-badge-confirmed {
    background: rgba(107, 155, 122, 0.12);
    color: var(--sage-d);
}
.status-badge-invited {
    background: rgba(212, 168, 75, 0.1);
    color: #9a7c2e;
}
.status-badge-declined {
    background: rgba(200, 88, 42, 0.08);
    color: var(--terra);
}
.status-badge-not_invited {
    background: rgba(0, 0, 0, 0.04);
    color: var(--txt-xl);
}
.status-badge-tentative {
    background: rgba(100, 100, 200, 0.08);
    color: #6060a0;
}

/* Tag pills in table */
.tag-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    background: var(--cream);
    color: var(--txt-m);
    margin: 1px 2px;
}
.tag-pill-famille {
    background: rgba(107, 155, 122, 0.12);
    color: var(--sage-d);
}
.tag-pill-amis {
    background: rgba(200, 88, 42, 0.08);
    color: var(--terra);
}
.tag-pill-collegues {
    background: rgba(100, 100, 200, 0.08);
    color: #6060a0;
}
.tag-pill-cortege {
    background: rgba(212, 168, 75, 0.1);
    color: #9a7c2e;
}
.tag-pill-temoins {
    background: rgba(180, 80, 180, 0.08);
    color: #8a408a;
}

/* Household badge in guest table */
.guest-household-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.58rem;
    color: var(--txt-l);
    font-weight: 300;
    margin-top: 2px;
}
.guest-household-badge svg {
    flex-shrink: 0;
}

/* Plus-one indicator */
.plusone-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.68rem;
    color: var(--sage-d);
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.plusone-badge svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Guest table row actions */
.guest-actions {
    display: flex;
    gap: 2px;
    align-items: center;
}
.guest-action-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--txt-l);
    transition: var(--transition);
}
.guest-action-btn:hover {
    background: var(--cream);
    color: var(--terra);
}
.guest-action-btn svg {
    width: 14px;
    height: 14px;
}
.guest-action-btn.send-msg-btn:hover {
    color: var(--sage);
    background: rgba(143, 168, 135, 0.12);
}
.guest-action-btn.guest-kebab-btn {
    color: var(--txt-l);
}
.guest-action-btn.guest-kebab-btn:hover {
    background: var(--cream);
    color: var(--txt);
}

/* Kebab menu — single element appended to <body>, positioned via JS with position:fixed */
#guest-kebab-menu {
    display: none;
    position: fixed;
    z-index: 9999;
    background: #fff;
    border: 1px solid var(--cream-d);
    border-radius: 8px;
    box-shadow: 0 6px 28px rgba(44, 24, 16, 0.18);
    min-width: 190px;
    overflow: hidden;
    animation: menuIn 0.12s ease;
}
#guest-kebab-menu button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(44, 24, 16, 0.05);
    cursor: pointer;
    font-family: "Jost", sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--txt2);
    text-align: left;
    transition: background 0.12s;
    appearance: none;
    -webkit-appearance: none;
}
#guest-kebab-menu button:last-child {
    border-bottom: none;
}
#guest-kebab-menu button:first-child {
    color: var(--sage);
}
#guest-kebab-menu button:first-child:hover {
    background: rgba(143, 168, 135, 0.09);
    color: #3d7040;
}
#guest-kebab-menu button:hover {
    background: var(--cream);
    color: var(--txt);
}
#guest-kebab-menu button.delete {
    color: #c0392b;
}
#guest-kebab-menu button.delete:hover {
    background: rgba(192, 57, 43, 0.06);
}

/* ═══════════════════════════════════════════
   SHARED KEBAB MENU & TABLE HELPERS
   (Events, Households, Questions + Guests)
═══════════════════════════════════════════ */

/* 3-dot kebab trigger button — mirrors guest-action-btn guest-kebab-btn */
.kebab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    color: var(--txt-l);
    transition:
        background 0.15s,
        color 0.15s;
}
.kebab-btn:hover {
    background: var(--cream);
    color: var(--txt);
}

/* Shared dropdown menu */
.guest-actions-menu {
    display: none;
    position: fixed;
    z-index: 9999;
    background: #fff;
    border: 1px solid var(--cream-d);
    border-radius: 8px;
    box-shadow: 0 6px 28px rgba(44, 24, 16, 0.18);
    overflow: hidden;
    animation: menuIn 0.12s ease;
}
.menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(44, 24, 16, 0.05);
    cursor: pointer;
    font-family: "Jost", sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--txt2);
    text-align: left;
    transition: background 0.12s;
    appearance: none;
    -webkit-appearance: none;
}
.menu-item:last-child {
    border-bottom: none;
}
.menu-item:hover {
    background: var(--cream);
    color: var(--txt);
}
.menu-item-danger {
    color: var(--terra) !important;
}
.menu-item-danger:hover {
    background: rgba(192, 57, 43, 0.06) !important;
}

/* Shared td helper classes */
.td-primary {
    font-weight: 500;
    color: var(--txt);
    font-size: 0.85rem;
}
.td-secondary {
    font-size: 0.8rem;
    color: var(--txt-l);
}
.td-sub {
    font-size: 0.7rem;
    color: var(--txt-l);
}
.td-empty {
    color: var(--txt-l);
    font-size: 0.8rem;
}
.td-drag {
    width: 24px;
    padding-left: 8px !important;
    color: var(--txt-l);
    cursor: grab;
    opacity: 0.5;
}
.th-drag {
    width: 32px;
}

/* Member avatars in table cell */
.td-members-cell {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.td-member-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--sage);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}
.td-member-avatar.primary {
    background: var(--terra);
    box-shadow:
        0 0 0 2px #fff,
        0 0 0 3px var(--terra);
}
.td-members-more {
    font-size: 0.7rem;
    color: var(--txt-l);
}
.td-members-count {
    font-size: 0.75rem;
    color: var(--txt-l);
    margin-left: 4px;
}

/* Required field marker */
span.required {
    color: var(--terra);
    font-weight: 600;
}

/* Guest modal form */
.gm-row {
    display: flex;
    gap: 12px;
}
.gm-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gm-field label {
    font-size: 0.72rem;
    color: var(--txt-m);
    font-weight: 500;
}
.gm-field input,
.gm-field select,
.gm-field textarea {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.82rem;
    color: var(--txt);
    transition: border-color 0.2s;
}
.gm-field input:focus,
.gm-field select:focus,
.gm-field textarea:focus {
    border-color: var(--terra-l);
    outline: none;
}

.gm-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.gm-tag-check {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 14px;
    border: 1px solid var(--border);
    font-size: 0.72rem;
    color: var(--txt-m);
    cursor: pointer;
    transition: var(--transition);
}
.gm-tag-check:has(input:checked) {
    background: var(--terra-bg);
    border-color: var(--terra-l);
    color: var(--terra);
}
.gm-tag-check input {
    display: none;
}

/* Dietary preset chips */
.dietary-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.dietary-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 14px;
    border: 1px solid var(--border);
    font-size: 0.72rem;
    color: var(--txt-m);
    cursor: pointer;
    transition: var(--transition);
}
.dietary-chip:hover {
    border-color: var(--sage);
    color: var(--sage-d);
}
.dietary-chip:has(input:checked) {
    background: var(--sage-bg);
    border-color: var(--sage);
    color: var(--sage-d);
}
.dietary-chip input {
    display: none;
}
.gm-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--txt-m);
    cursor: pointer;
}
.gm-toggle-label input {
    accent-color: var(--terra);
    width: 16px;
    height: 16px;
}

/* Empty state */
.guests-empty {
    text-align: center;
    padding: 60px 20px;
}
.guests-empty svg {
    width: 64px;
    height: 64px;
    color: var(--txt-xl);
    opacity: 0.5;
    margin-bottom: 16px;
}
.guests-empty h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.2rem;
    color: var(--txt-m);
    margin-bottom: 8px;
}
.guests-empty p {
    font-size: 0.82rem;
    color: var(--txt-l);
    margin-bottom: 20px;
}

/* ── Guests Mobile Responsive ────── */
@media (max-width: 768px) {
    .guests-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
    .guests-counter-chart {
        grid-column: span 2;
    }
    .guests-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .guests-filter-pills {
        order: -1;
    }
    .filter-right {
        flex-wrap: wrap;
    }
    .guests-quick-add {
        flex-wrap: wrap;
    }
    .qa-input {
        min-width: calc(50% - 6px);
        flex: 1 1 calc(50% - 6px);
    }
    .guests-quick-add select.qa-input {
        flex: 1 1 calc(50% - 6px);
    }
    .gm-row {
        flex-direction: column;
        gap: 10px;
    }

    /* Guest table → card list on mobile */
    .table-wrap {
        box-shadow: none;
        background: transparent;
        overflow: visible;
    }
    #guests-tbody {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    #guests-tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        background: #fff;
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
        padding: 12px 14px;
        border-left: 3px solid var(--terra);
    }
    #guests-tbody tr:hover td {
        background: transparent;
    }
    #guests-tbody thead,
    #guests-table thead {
        display: none;
    }
    #guests-tbody table {
        border-collapse: separate;
    }

    /* Column visibility: show only key cols */
    #guests-tbody .td-check {
        width: auto;
        padding: 0;
    }
    #guests-tbody .td-email,
  #guests-tbody td:nth-child(4),  /* groupe */
  #guests-tbody td:nth-child(6)   /* repas  */ {
        display: none;
    }

    /* Name column — takes full row width */
    #guests-tbody td:nth-child(2) {
        flex: 1;
        min-width: 0;
        font-weight: 500;
        font-size: 0.85rem;
        color: var(--txt);
        padding: 0;
        border: none;
    }
    /* Status */
    #guests-tbody td:nth-child(5) {
        padding: 0;
        border: none;
    }
    /* Plus one */
    #guests-tbody td:nth-child(7) {
        padding: 0;
        border: none;
        margin-left: auto;
    }
    /* Actions */
    #guests-tbody .td-actions {
        padding: 0;
        border: none;
        width: auto;
    }

    /* Hide table header row entirely */
    #guests-table thead tr {
        display: none;
    }

    /* ── Events / Households / Questions — same card layout as guests ── */
    #events-tbody,
    #households-tbody,
    #questions-tbody {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    #events-tbody tr,
    #households-tbody tr,
    #questions-tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        background: #fff;
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
        padding: 12px 14px;
        border-left: 3px solid var(--terra);
    }
    #events-tbody tr:hover td,
    #households-tbody tr:hover td,
    #questions-tbody tr:hover td {
        background: transparent;
    }

    /* Hide thead for these tables */
    #events-table thead,
    #households-table thead,
    #questions-table thead {
        display: none;
    }

    /* Empty state rows — no card style */
    #events-tbody tr:has(.empty-card),
    #households-tbody tr:has(.empty-card),
    #questions-tbody tr:has(.empty-card) {
        background: transparent;
        box-shadow: none;
        border-left: none;
        padding: 0;
    }

    /* Events mobile: name takes full width, hide location+tags */
    #events-tbody td:nth-child(1) {
        flex: 1;
        min-width: 0;
        font-weight: 500;
        padding: 0;
        border: none;
        color: var(--txt);
    }
    #events-tbody td:nth-child(2) {
        padding: 0;
        border: none;
        font-size: 0.75rem;
    }
    #events-tbody td:nth-child(3),  /* location */
    #events-tbody td:nth-child(4) {
        display: none;
    } /* tags */
    #events-tbody td:nth-child(5) {
        padding: 0;
        border: none;
        font-size: 0.75rem;
        margin-left: auto;
    }
    #events-tbody .td-actions {
        padding: 0;
        border: none;
        width: auto;
    }

    /* Households mobile: name takes full width, hide address */
    #households-tbody td:nth-child(1) {
        flex: 1;
        min-width: 0;
        font-weight: 500;
        padding: 0;
        border: none;
        color: var(--txt);
    }
    #households-tbody td:nth-child(2) {
        padding: 0;
        border: none;
    }
    #households-tbody td:nth-child(3) {
        display: none;
    } /* address */
    #households-tbody .td-actions {
        padding: 0;
        border: none;
        width: auto;
        margin-left: auto;
    }

    /* Questions mobile: drag hidden, question takes full width, hide if-attending sub */
    #questions-tbody .td-drag {
        display: none;
    }
    #questions-tbody td:nth-child(2) {
        flex: 1;
        min-width: 0;
        padding: 0;
        border: none;
    }
    #questions-tbody td:nth-child(3) {
        padding: 0;
        border: none;
    }
    #questions-tbody td:nth-child(4) {
        padding: 0;
        border: none;
    }
    #questions-tbody .td-actions {
        padding: 0;
        border: none;
        width: auto;
        margin-left: auto;
    }
}
@media (max-width: 480px) {
    .guests-dashboard {
        grid-template-columns: 1fr 1fr;
    }
    .guests-counter {
        padding: 12px 14px;
    }
    .counter-value {
        font-size: 1.3rem;
    }
    .guests-counter-chart {
        grid-column: span 2;
    }
    .filter-pill {
        padding: 4px 8px;
        font-size: 0.65rem;
    }
    .guests-quick-add {
        flex-direction: column;
    }
    .qa-input {
        min-width: 100%;
        padding: 9px 12px;
        font-size: 0.85rem;
    }
    .guests-quick-add .btn {
        width: 100%;
        justify-content: center;
        gap: 6px;
        padding: 10px 8px;
        font-size: 0.54rem;
        letter-spacing: 2px;
        text-transform: uppercase;
    }
    .guests-quick-add .btn span {
        display: inline;
    }
    .guest-actions {
        gap: 2px;
    }
    .guest-action-btn {
        width: 24px;
        height: 24px;
    }
}

/* ══════════════════════════════════════
   GUEST SUB-NAVIGATION
══════════════════════════════════════ */
.guests-subnav {
    display: flex;
    gap: 2px;
    padding: 4px;
    background: rgba(44, 32, 22, 0.03);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    border: 1px solid rgba(44, 32, 22, 0.06);
}
.subnav-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--txt-m);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.subnav-btn svg {
    opacity: 0.5;
    flex-shrink: 0;
}
.subnav-btn:hover {
    background: rgba(255, 255, 255, 0.7);
    color: var(--txt);
}
.subnav-btn.active {
    background: #fff;
    color: var(--txt);
    box-shadow: var(--shadow-sm);
    font-weight: 500;
}
.subnav-btn.active svg {
    opacity: 1;
    color: var(--terra);
}

.guest-subtab {
    display: none;
}
.guest-subtab.active {
    display: block;
    animation: subtabIn 0.25s ease;
    overflow-x: hidden;
}
@keyframes subtabIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtab-header {
    margin-bottom: 24px;
}
.subtab-header h2 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 400;
    font-size: 1.3rem;
    color: var(--txt);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.subtab-desc {
    font-size: 0.74rem;
    color: var(--txt-m);
    line-height: 1.6;
    margin-bottom: 16px;
    font-weight: 300;
    max-width: 600px;
}
.field-hint {
    font-size: 0.68rem;
    color: var(--txt-l);
    line-height: 1.5;
    margin: 2px 0 8px;
    font-weight: 300;
}

/* ══════════════════════════════════════
   EMPTY CARDS
══════════════════════════════════════ */
.empty-card {
    text-align: center;
    padding: 48px 24px;
    background: rgba(255, 255, 255, 0.6);
    border: 2px dashed rgba(44, 32, 22, 0.1);
    border-radius: 16px;
}
.empty-card svg {
    color: var(--txt-xl);
    margin-bottom: 12px;
}
.empty-card h3 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 400;
    font-size: 1.1rem;
    color: var(--txt-m);
    margin-bottom: 6px;
}
.empty-card p {
    font-size: 0.74rem;
    color: var(--txt-l);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ══════════════════════════════════════
   EVENT CARDS
══════════════════════════════════════ */
.events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.event-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    border: 1px solid rgba(44, 32, 22, 0.08);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}
.event-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--terra);
    border-radius: 4px 0 0 4px;
}
.event-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}
.event-card-name {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--txt);
    letter-spacing: 0.3px;
}
.event-card-actions {
    display: flex;
    gap: 4px;
}
.event-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}
.event-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: var(--txt-m);
}
.event-meta-item svg {
    width: 13px;
    height: 13px;
    opacity: 0.5;
}
.event-card-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.event-card-count {
    font-size: 0.68rem;
    color: var(--txt-l);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(44, 32, 22, 0.06);
}

/* ══════════════════════════════════════
   HOUSEHOLD CARDS
══════════════════════════════════════ */
.households-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.household-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    border: 1px solid rgba(44, 32, 22, 0.08);
    transition: all 0.25s ease;
}
.household-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.household-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.household-card-name {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--txt);
    display: flex;
    align-items: center;
    gap: 8px;
}
.household-card-name svg {
    width: 16px;
    height: 16px;
    color: var(--terra);
    opacity: 0.6;
}
.household-members {
    margin-bottom: 8px;
}
.household-member {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 0.74rem;
    color: var(--txt-m);
}
.household-member .member-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--cream-d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--txt-m);
    flex-shrink: 0;
}
.household-member.primary .member-avatar {
    background: var(--terra-bg);
    color: var(--terra);
}
.household-address {
    font-size: 0.68rem;
    color: var(--txt-l);
    line-height: 1.5;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(44, 32, 22, 0.06);
}

.household-members-select {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid rgba(44, 32, 22, 0.1);
    border-radius: 8px;
    padding: 8px;
}
.hm-member-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.74rem;
    color: var(--txt-m);
    transition: background 0.15s ease;
}
.hm-member-option:hover {
    background: rgba(44, 32, 22, 0.03);
}
.hm-member-option input {
    accent-color: var(--terra);
}

/* ══════════════════════════════════════
   QUESTION CARDS
══════════════════════════════════════ */
.questions-list {
    margin-bottom: 24px;
}
.question-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px 22px;
    border: 1px solid rgba(44, 32, 22, 0.08);
    margin-bottom: 10px;
    transition: all 0.25s ease;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.question-card:hover {
    box-shadow: var(--shadow-sm);
}
.question-card-drag {
    cursor: grab;
    padding: 4px;
    color: var(--txt-xl);
    flex-shrink: 0;
    margin-top: 2px;
}
.question-card-drag svg {
    width: 14px;
    height: 14px;
}
.question-card-body {
    flex: 1;
    min-width: 0;
}
.question-card-text {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--txt);
    margin-bottom: 4px;
}
.question-card-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.question-type-badge {
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(107, 155, 122, 0.1);
    color: var(--sage-d);
}
.question-type-badge.required {
    background: rgba(200, 88, 42, 0.08);
    color: var(--terra);
}
.question-card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

/* Question templates */
.questions-templates {
    border-top: 1px solid rgba(44, 32, 22, 0.08);
    padding-top: 20px;
    margin-top: 8px;
}
.questions-templates h3 {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--txt-m);
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}
.questions-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.template-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid rgba(44, 32, 22, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 0.72rem;
    color: var(--txt-m);
    text-align: left;
}
.template-card:hover {
    border-color: var(--terra);
    background: var(--terra-bg);
    color: var(--terra);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.template-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ══════════════════════════════════════
   MEALS CONFIG
══════════════════════════════════════ */
.meals-config-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(44, 32, 22, 0.08);
    margin-bottom: 16px;
}
.meals-config-section h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--txt);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}
.meals-config-desc {
    font-size: 0.72rem;
    color: var(--txt-m);
    margin-bottom: 14px;
    font-weight: 300;
}
.meals-options-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.meal-option-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(44, 32, 22, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(44, 32, 22, 0.06);
    transition: all 0.15s ease;
}
.meal-option-row:hover {
    background: rgba(44, 32, 22, 0.04);
}
.meal-option-row.editing {
    background: rgba(184, 149, 106, 0.06);
    border-color: var(--terra-l);
}
.meal-edit-input {
    flex: 1;
    min-width: 0;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.82rem;
    color: var(--txt);
    background: var(--bg2);
    transition: border-color 0.2s;
}
.meal-edit-input:focus {
    border-color: var(--terra-l);
    outline: none;
}
.meal-edit-color {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px;
    cursor: pointer;
    background: transparent;
    flex-shrink: 0;
}
.meal-option-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.meal-option-name {
    flex: 1;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--txt);
}
.meal-option-count {
    font-size: 0.7rem;
    color: var(--txt-l);
    font-weight: 300;
}
.meal-option-actions {
    display: flex;
    gap: 4px;
}

.meals-add-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.meals-input {
    flex: 1;
    padding: 9px 14px;
    border: 1px dashed rgba(44, 32, 22, 0.15);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.78rem;
    background: transparent;
    color: var(--txt);
}
.meals-input:focus {
    outline: none;
    border-color: var(--terra);
    border-style: solid;
}
.meals-color-input {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    background: transparent;
}

.dietary-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.dietary-tag {
    font-size: 0.68rem;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(107, 155, 122, 0.08);
    color: var(--sage-d);
    border: 1px solid rgba(107, 155, 122, 0.15);
    font-weight: 400;
}

.meals-summary {
    margin-bottom: 16px;
}
.meals-summary-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(44, 32, 22, 0.04);
}
.meals-summary-row:last-child {
    border-bottom: none;
}
.meals-summary-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.meals-summary-label {
    flex: 1;
    font-size: 0.76rem;
    color: var(--txt-m);
}
.meals-summary-count {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--txt);
}
.meals-summary-bar {
    width: 80px;
    height: 6px;
    background: rgba(44, 32, 22, 0.06);
    border-radius: 3px;
    overflow: hidden;
}
.meals-summary-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}
.meals-export-actions {
    display: flex;
    gap: 8px;
}

/* ══════════════════════════════════════
   RESPONSIVE: Sub-nav + new panels
══════════════════════════════════════ */
@media (max-width: 768px) {
    .guests-subnav {
        gap: 0;
        padding: 3px;
    }
    .subnav-btn {
        padding: 7px 10px;
        font-size: 0.66rem;
        gap: 5px;
    }
    .subnav-btn svg {
        width: 12px;
        height: 12px;
    }
    .events-list,
    .households-list {
        grid-template-columns: 1fr;
    }
    .questions-template-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .meals-add-row {
        flex-wrap: wrap;
    }
}
@media (max-width: 480px) {
    .guests-subnav {
        gap: 0;
        padding: 2px;
        justify-content: space-between;
    }
    .subnav-btn {
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 8px 4px;
        flex: 1;
        min-width: 0;
    }
    .subnav-btn svg {
        width: 17px;
        height: 17px;
        opacity: 0.7;
    }
    .subnav-btn span {
        display: block;
        font-size: 0.52rem;
        line-height: 1.1;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    .subnav-btn.active svg {
        opacity: 1;
    }
}

/* ═══ CSV Import Modal ═══ */
.import-dropzone {
    border: 2px dashed #d5cec4;
    background: #faf8f5;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.import-dropzone:hover,
.import-dropzone.drag-over {
    border-color: var(--terra, #c67b5c);
    background: #fef7f3;
}
.import-dropzone svg {
    color: #bbb;
    margin-bottom: 12px;
}
.import-dropzone p {
    color: #888;
    margin: 6px 0;
}
.import-browse-btn {
    margin-top: 8px;
    cursor: pointer;
}
.import-hint {
    font-size: 12px !important;
    color: #aaa !important;
}

.import-info {
    color: #666;
    margin-bottom: 16px;
    font-size: 14px;
}
.import-mapping-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px 12px;
    align-items: center;
    margin-bottom: 24px;
}
.import-mapping-grid .map-csv-col {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    padding: 8px 12px;
    background: #f5f2ee;
    border-radius: 6px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}
.import-mapping-grid .map-arrow {
    color: #bbb;
    font-size: 18px;
    text-align: center;
}
.import-mapping-grid select {
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}
.import-preview-section {
    margin-top: 16px;
}
.import-preview-section h4 {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.import-preview-table-wrap {
    overflow-x: auto;
    max-height: 200px;
    border: 1px solid #eee;
    border-radius: 8px;
}
.import-preview-table {
    font-size: 12px;
}
.import-preview-table th {
    background: #f5f2ee;
    position: sticky;
    top: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.import-preview-table td {
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.import-options {
    margin-top: 16px;
    padding: 12px;
    background: #f9f8f6;
    border-radius: 8px;
}
.import-option-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}
.import-option-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--terra, #c67b5c);
}

.import-results {
    text-align: center;
    padding: 24px 0;
}
.import-results .result-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.import-results .result-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}
.import-results .result-detail {
    font-size: 14px;
    color: #888;
    margin: 4px 0;
}
.import-results .result-success {
    color: #5a9a68;
}
.import-results .result-warning {
    color: #c67b5c;
}

