:root {
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --primary-color: #2a2a72;
    --text-color: #333;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --sidebar-width: 250px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-color);
    overflow-x: hidden;
}

/* Auth / Fullscreen Views (Login) */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
}

.auth-container .card {
    margin: 0 auto;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.85);
    /* More opaque */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 1rem;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    height: calc(100vh - 90px);
}

.sidebar .nav-main,
.sidebar .nav-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar .nav-main {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.sidebar .nav-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 0.8rem;
}

.sidebar button {
    background: transparent;
    border: none;
    text-align: left;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.2s;
}

.sidebar button:hover {
    background: rgba(42, 42, 114, 0.1);
    color: var(--primary-color);
}

.sidebar button.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(42, 42, 114, 0.2);
}

.sidebar button.sidebar-subitem {
    margin-top: -0.25rem;
    padding: 0.55rem 1rem 0.55rem 2.2rem;
    font-size: 0.92rem;
}

.sidebar button.sidebar-subitem i {
    opacity: 0.8;
}

.sidebar .sidebar-submenu {
    display: none;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: -0.2rem;
    margin-left: 0.4rem;
    padding-left: 0.55rem;
    border-left: 1px solid rgba(42, 42, 114, 0.12);
}

.sidebar .sidebar-submenu.open {
    display: flex;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    width: calc(100% - var(--sidebar-width));
    min-width: 0;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.top-actions {
    display: flex;
    gap: 1rem;
}

.top-actions button {
    background: white;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #555;
    transition: 0.2s;
}

.top-actions button:hover {
    background: var(--primary-color);
    color: white;
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    /* Desktop */
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }

    .menu-toggle {
        display: block;
        margin-right: 1rem;
    }

    .top-bar {
        padding: 0.8rem;
    }
}

/* Common Components */
.card {
    background: rgba(255, 255, 255, 0.7);
    /* Slightly more opaque */
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    min-width: 0;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
}

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

#dashboard-stats {
    display: block;
}

.dashboard-shell {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.dashboard-hero-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-hero-card,
.dashboard-panel {
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72));
    box-shadow: 0 14px 34px rgba(148, 163, 184, 0.18);
}

.dashboard-hero-card {
    padding: 1.15rem 1.2rem;
    position: relative;
    overflow: hidden;
}

.dashboard-hero-card::after {
    content: '';
    position: absolute;
    inset: auto -20% -40% auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(42, 42, 114, 0.07);
    pointer-events: none;
    z-index: 0;
}

.dashboard-hero-card > * {
    position: relative;
    z-index: 1;
}

.dashboard-hero-card.is-primary {
    background: linear-gradient(135deg, rgba(42, 42, 114, 0.96), rgba(56, 88, 162, 0.9));
    color: white;
}

.dashboard-hero-card.is-primary .dashboard-kicker,
.dashboard-hero-card.is-primary .dashboard-hero-note {
    color: rgba(255, 255, 255, 0.82);
}

.dashboard-hero-card.is-accent {
    background: linear-gradient(135deg, rgba(12, 113, 76, 0.92), rgba(36, 148, 101, 0.88));
    color: white;
}

.dashboard-hero-card.is-accent .dashboard-kicker,
.dashboard-hero-card.is-accent .dashboard-hero-note {
    color: rgba(255, 255, 255, 0.82);
}

.dashboard-kicker {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.dashboard-hero-value {
    margin-top: 0.45rem;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1;
    font-weight: 700;
}

.dashboard-hero-note {
    margin-top: 0.45rem;
    font-size: 0.9rem;
    color: #4b5563;
    position: relative;
    z-index: 1;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(420px, 1.35fr);
    gap: 1rem;
}

.dashboard-panel {
    padding: 1.2rem;
}

.dashboard-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-panel h3 {
    margin-top: 0.25rem;
    font-size: 1.25rem;
    color: #1f2937;
}

.dashboard-panel-meta,
.dashboard-panel-note {
    font-size: 0.82rem;
    color: #64748b;
}

.dashboard-members-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.9rem;
}

.dashboard-subpanel {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    padding: 0.9rem;
    background: rgba(248, 250, 252, 0.8);
}

.dashboard-subtitle {
    font-size: 0.84rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.7rem;
}

.dashboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.dashboard-list-row,
.dashboard-account-row,
.dashboard-outlook-row,
.dashboard-mini-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.dashboard-list-row {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.dashboard-list-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.dashboard-mini-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.dashboard-mini-metric {
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.dashboard-mini-metric .label {
    font-size: 0.82rem;
    color: #64748b;
}

.dashboard-finance-grid,
.dashboard-outlook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.9rem;
}

.dashboard-currency-card,
.dashboard-outlook-card {
    border-radius: 16px;
    padding: 1rem;
    background: rgba(248, 250, 252, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.dashboard-currency-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.dashboard-currency-code,
.dashboard-outlook-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
}

.dashboard-account-list,
.dashboard-outlook-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.dashboard-account-row {
    font-size: 0.92rem;
    color: #475569;
}

.dashboard-outlook-row {
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 0.92rem;
}

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

.dashboard-outlook-row.is-emphasis {
    font-weight: 600;
}

.dashboard-positive {
    color: #0f8a1f;
}

.dashboard-negative {
    color: #dc2626;
}

.dashboard-neutral {
    color: #475569;
}

.dashboard-system-bar {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    font-size: 0.82rem;
    color: #64748b;
    padding: 0 0.1rem;
}

.dashboard-empty,
.dashboard-loading,
.dashboard-error {
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #475569;
}

.dashboard-error {
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.2);
    background: rgba(254, 242, 242, 0.92);
}

/* Utility */
.view-section {
    width: 100%;
    animation: fadeIn 0.3s ease-in-out;
    min-width: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inputs */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.table-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.table-container .data-table {
    min-width: 100%;
}

.finance-table {
    min-width: 1080px;
}

.campaign-table {
    min-width: 960px;
}

.finance-table th,
.finance-table td {
    vertical-align: top;
}

.finance-table th {
    white-space: normal;
}

.finance-th-wrap {
    display: inline-block;
    line-height: 1.15;
}

.finance-table th:nth-child(1),
.finance-table td:nth-child(1) {
    min-width: 110px;
}

.finance-table th:nth-child(2),
.finance-table td:nth-child(2) {
    min-width: 190px;
}

.finance-table th:nth-child(3),
.finance-table td:nth-child(3) {
    min-width: 170px;
}

.finance-table th:nth-child(5),
.finance-table td:nth-child(5) {
    min-width: 72px;
}

.finance-table th:nth-child(6),
.finance-table td:nth-child(6) {
    min-width: 120px;
}

.finance-table th:nth-child(7),
.finance-table td:nth-child(7) {
    min-width: 170px;
}

.finance-table th:nth-child(8),
.finance-table td:nth-child(8) {
    min-width: 125px;
}

.finance-table th:nth-child(9),
.finance-table td:nth-child(9) {
    min-width: 110px;
}

.finance-table th:nth-child(10),
.finance-table td:nth-child(10) {
    min-width: 110px;
}

.finance-table-bookings th:last-child,
.finance-table-bookings td:last-child {
    position: sticky;
    right: 0;
    background: #fff;
    box-shadow: -10px 0 12px rgba(255, 255, 255, 0.95);
}

.finance-table-bookings th:last-child {
    z-index: 2;
}

.finance-table-bookings td:last-child {
    z-index: 1;
}

.finance-actions-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 150px;
}

.finance-jump-controls {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin: 0 0 0.85rem;
}

.finance-jump-controls-bottom {
    margin: 0.85rem 0 0;
}

#finance-report-account-summary .stat-card {
    min-height: 100%;
}

.finance-report-account-meta {
    margin-top: 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.82rem;
    color: #4b5563;
}

.finance-report-account-meta strong {
    color: #1f2937;
}

.finance-report-tx-details {
    margin-top: 0.35rem;
}

.finance-report-tx-details summary {
    cursor: pointer;
    color: var(--primary-color);
    font-weight: 600;
    user-select: none;
}

.finance-report-tx-details[open] summary {
    margin-bottom: 0.6rem;
}

.finance-report-tx-table {
    min-width: 640px;
}

.finance-report-tx-table td,
.finance-report-tx-table th {
    padding: 0.55rem 0.6rem;
    font-size: 0.82rem;
}

.data-table th,
.data-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.member-sort-btn {
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.member-sort-btn .sort-indicator {
    opacity: 0.65;
    font-size: 0.85rem;
}

.member-sort-btn.is-active .sort-indicator {
    opacity: 1;
}

.member-filter-row th {
    padding-top: 6px;
    padding-bottom: 8px;
}

.member-filter-input {
    padding: 0.35rem 0.45rem;
    font-size: 0.85rem;
    min-width: 110px;
}

.member-empty-row {
    color: #666;
    text-align: center;
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 1px solid rgba(42, 42, 114, 0.25);
    padding: 0.45rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
}

.btn-icon {
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: white;
    color: var(--primary-color);
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.security-map-card {
    border: 1px solid rgba(42, 42, 114, 0.16);
    border-radius: 10px;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.55);
}

.security-map-toolbar {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    align-items: center;
}

.security-map {
    margin-top: 0.6rem;
    min-height: 360px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-nav h2 {
    min-width: 180px;
}

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

.calendar-actions select {
    width: auto;
    min-width: 150px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.45rem;
}

.cal-header {
    font-weight: 700;
    font-size: 0.9rem;
    color: #555;
    padding: 0.4rem 0.2rem;
}

.cal-day {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    min-height: 110px;
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cal-day.empty {
    background: rgba(255, 255, 255, 0.35);
    border-style: dashed;
}

.day-num {
    font-weight: 700;
    font-size: 0.85rem;
    color: #444;
}

.event-badge {
    border: none;
    border-radius: 6px;
    padding: 0.25rem 0.35rem;
    font-size: 0.72rem;
    text-align: left;
    cursor: pointer;
}

.event-badge.event-vis-public {
    background: rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.event-badge.event-vis-internal {
    background: rgba(59, 130, 246, 0.2);
    color: #1e40af;
}

.event-badge.event-vis-administrative {
    background: rgba(244, 114, 182, 0.25);
    color: #831843;
}

.calendar-legend {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
}

.cal-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.cal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.cal-dot.vis-public {
    background: #10b981;
}

.cal-dot.vis-internal {
    background: #3b82f6;
}

.cal-dot.vis-administrative {
    background: #f472b6;
}

.calendar-status {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #4b5563;
}

.calendar-action-overlay {
    z-index: 9500;
}

.calendar-action-panel {
    width: min(560px, calc(100vw - 2rem));
    max-width: 560px;
    height: auto;
    max-height: 88vh;
    margin: auto;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.calendar-action-meta {
    margin-top: 0;
    color: #4b5563;
    line-height: 1.45;
}

.calendar-action-buttons {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.calendar-action-buttons button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
}

@media (max-width: 640px) {
    .calendar-action-buttons {
        grid-template-columns: 1fr;
    }
}

.finance-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.finance-subtitle {
    margin-top: 0.3rem;
    color: #555;
    font-size: 0.9rem;
}

.finance-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.finance-booking-filters {
    display: grid;
    grid-template-columns: minmax(260px, 1.8fr) repeat(7, minmax(130px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    align-items: center;
}

#finance-card-bookings-list,
#finance-card-reports-filters {
    position: relative;
    overflow: visible;
}

#finance-card-bookings-list {
    z-index: 15;
}

#finance-card-reports-filters {
    z-index: 25;
}

.finance-booking-filters .form-control {
    width: 100%;
    min-height: 38px;
}

.finance-multi-filter {
    position: relative;
    min-width: 0;
}

.finance-multi-filter-summary {
    min-height: 38px;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    color: #374151;
    cursor: pointer;
    list-style: none;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.finance-multi-filter-summary::-webkit-details-marker {
    display: none;
}

.finance-multi-filter-summary::marker {
    content: "";
}

.finance-multi-filter-summary::after {
    content: "▾";
    color: #6b7280;
    font-size: 0.8rem;
}

.finance-multi-filter[open] .finance-multi-filter-summary::after {
    content: "▴";
}

.finance-multi-filter-menu {
    position: absolute;
    top: calc(100% + 0.3rem);
    left: 0;
    right: auto;
    z-index: 12;
    min-width: max(100%, 240px);
    max-width: min(340px, calc(100vw - 3rem));
    padding: 0.65rem;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
    display: grid;
    gap: 0.45rem;
    max-height: 260px;
    overflow-y: auto;
}

.finance-multi-filter-option {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.88rem;
    color: #374151;
    cursor: pointer;
}

.finance-multi-filter-option input {
    margin-top: 0.12rem;
    flex: 0 0 auto;
}

.finance-multi-filter-option span {
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}

.finance-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.75rem;
    color: #4b5563;
}

.finance-filter-field .form-control {
    margin-top: 0;
}

.finance-filter-summary {
    margin-bottom: 0.55rem;
    font-size: 0.85rem;
    color: #4b5563;
}

.finance-filter-warning {
    margin: -0.15rem 0 0.7rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid #f59e0b;
    border-radius: 10px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 0.88rem;
    font-weight: 600;
}

.finance-tab-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.finance-local-nav-shell {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 1.1rem;
    padding: 0.95rem 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(10px);
}

.finance-local-nav-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #475569;
}

.finance-local-nav {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.finance-local-nav-btn {
    border: 1px solid #cbd5e1;
    background: rgba(255, 255, 255, 0.92);
    color: #1f2937;
    border-radius: 999px;
    padding: 0.5rem 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.finance-local-nav-btn:hover {
    background: rgba(42, 42, 114, 0.08);
    border-color: rgba(42, 42, 114, 0.35);
}

.finance-local-nav-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 8px 18px rgba(42, 42, 114, 0.2);
}

.finance-tab-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #1f2937;
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.finance-tab-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.finance-panel {
    display: block;
}

.finance-member-actions {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    flex-wrap: wrap;
}

.finance-action-btn {
    border: 1px solid rgba(42, 42, 114, 0.25);
    background: #fff;
    color: var(--primary-color);
    border-radius: 6px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.finance-action-btn:hover {
    background: rgba(42, 42, 114, 0.08);
}

.finance-template-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1rem;
}

.finance-template-preview {
    min-height: 220px;
    white-space: pre-wrap;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.75rem;
    background: #f8fafc;
}

.finance-template-preview img,
.email-editor-html img {
    max-width: 250px;
    height: auto;
}

.finance-placeholder-accordion {
    margin-top: 0.85rem;
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    background: #f8fafc;
    overflow: hidden;
}

.finance-placeholder-accordion summary {
    cursor: pointer;
    padding: 0.8rem 0.95rem;
    font-weight: 600;
    color: #1f2937;
    user-select: none;
}

.finance-placeholder-help {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem 1rem;
    padding: 0 0.95rem 0.95rem;
}

.finance-placeholder-help div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.9rem;
}

.finance-placeholder-help code {
    font-size: 0.85rem;
    color: var(--primary-color);
}

.campaign-editor-hint {
    margin-top: 0.6rem;
    font-size: 0.88rem;
    color: #4b5563;
}

.campaign-placeholder-accordion {
    margin-top: 0.75rem;
}

.campaign-placeholder-note {
    margin: 0;
    padding: 0 0.95rem 0.95rem;
    font-size: 0.88rem;
    color: #4b5563;
}

.finance-placeholder-help span {
    color: #475569;
}

.btn-file {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.finance-rate-hint {
    margin-top: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.finance-rate-hint a {
    color: var(--primary-color);
    text-decoration: none;
}

.finance-lock-status,
.finance-import-status {
    margin-top: 0.7rem;
    font-size: 0.85rem;
    color: #4b5563;
}

.upload-area {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.8rem;
}

.upload-area #doc-cloud-wrap {
    display: contents;
}

.upload-area small {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    color: #4b5563;
}

.document-upload-form {
    align-items: stretch;
}

.document-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.document-field span {
    font-size: 0.85rem;
    color: #4b5563;
    font-weight: 600;
}

.document-field small {
    grid-column: auto;
}

.document-actions {
    display: flex;
    align-items: end;
    gap: 0.5rem;
}

.document-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(180px, 1fr));
    gap: 0.5rem;
    margin: 0.8rem 0;
}

@media (max-width: 1100px) {
    .finance-template-grid {
        grid-template-columns: 1fr;
    }

    .finance-booking-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .upload-area {
        grid-template-columns: 1fr;
    }

    .document-toolbar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .finance-booking-filters {
        grid-template-columns: 1fr;
    }
}

.help-legend {
    margin-top: 0.8rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.help-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.help-badge.is-public {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
    color: #047857;
}

.help-badge.is-internal {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.35);
    color: #1d4ed8;
}

.help-badge.is-team {
    background: rgba(244, 114, 182, 0.15);
    border-color: rgba(244, 114, 182, 0.35);
    color: #9d174d;
}

.help-note {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: #666;
}

.help-table-wrap {
    overflow-x: auto;
}

/* Finance extensions */
.finance-bucket-summary {
    margin-top: 0.8rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.finance-bucket-item {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    font-size: 0.9rem;
}

.finance-inline-form {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.finance-inline-form input,
.finance-inline-form select {
    width: 100%;
}

#event-modal {
    width: calc(100vw - 1rem);
    height: calc(100vh - 1rem);
    max-width: none;
    max-height: none;
    margin: 0.5rem auto;
    padding: 0;
    border: none;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}

#event-modal::backdrop {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
}

#event-form {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.event-modal-header {
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(180deg, rgba(249, 250, 251, 0.96), rgba(255, 255, 255, 0.92));
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.event-modal-title-wrap h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary-color);
}

#event-modal-subtitle {
    margin-top: 0.35rem;
    color: #4b5563;
    font-size: 0.9rem;
}

.event-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
}

.event-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 1rem;
    align-content: start;
}

.event-form-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
}

.event-form-field.span-2 {
    grid-column: span 2;
}

.event-form-field textarea {
    min-height: 220px;
    resize: vertical;
}

#event-form .modal-actions {
    margin: 0;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

#event-form .modal-actions .btn-danger {
    margin-right: auto;
}

#finance-modal {
    width: calc(100vw - 2rem);
    height: calc(100vh - 2rem);
    max-width: none;
    max-height: none;
    margin: 1rem auto;
    padding: 0;
    border: none;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}

#finance-modal::backdrop {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
}

#finance-form {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.finance-modal-header {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(180deg, rgba(249, 250, 251, 0.96), rgba(255, 255, 255, 0.92));
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.finance-modal-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex: 0 0 auto;
}

.finance-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.finance-modal-subtitle {
    margin-top: 0.3rem;
    color: #4b5563;
    font-size: 0.9rem;
}

.finance-modal-fields {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.9rem 1rem;
    align-content: start;
}

.finance-field {
    grid-column: span 12;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.95rem;
}

.finance-field.span-2 {
    grid-column: span 2;
}

.finance-field.span-3 {
    grid-column: span 3;
}

.finance-field.span-4 {
    grid-column: span 4;
}

.finance-field.span-5 {
    grid-column: span 5;
}

.finance-field.span-8 {
    grid-column: span 8;
}

.finance-field textarea {
    min-height: 70px;
    resize: vertical;
}

.finance-field input[type="file"] {
    padding: 0.45rem 0.5rem;
    background: rgba(255, 255, 255, 0.95);
}

.finance-field small {
    font-size: 0.78rem;
    color: #6b7280;
}

#finance-form .modal-actions {
    margin: 0;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.finance-inline-link {
    padding: 0;
    border: none;
    background: none;
    color: var(--primary-color);
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.finance-inline-link:hover {
    text-decoration: underline;
}

@media (max-width: 1100px) {
    .finance-modal-fields {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .finance-field.span-8,
    .finance-field.span-5,
    .finance-field.span-4,
    .finance-field.span-3 {
        grid-column: span 6;
    }

    .finance-field.span-2 {
        grid-column: span 3;
    }
}

@media (max-width: 720px) {
    #event-modal {
        width: calc(100vw - 0.5rem);
        height: calc(100vh - 0.5rem);
        margin: 0.25rem auto;
        border-radius: 12px;
    }

    .event-modal-header,
    .event-modal-body,
    #event-form .modal-actions {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .event-form-grid {
        grid-template-columns: 1fr;
    }

    .event-form-field.span-2 {
        grid-column: span 1;
    }

    #finance-modal {
        width: calc(100vw - 0.5rem);
        height: calc(100vh - 0.5rem);
        margin: 0.25rem auto;
        border-radius: 12px;
    }

    .finance-modal-fields {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .finance-field.span-8,
    .finance-field.span-5,
    .finance-field.span-4,
    .finance-field.span-3,
    .finance-field.span-2 {
        grid-column: span 1;
    }

    .finance-modal-header,
    #finance-form .modal-actions {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .finance-modal-header {
        flex-direction: column;
        align-items: stretch;
    }

    .finance-modal-header-actions .btn-primary,
    .finance-modal-header-actions .btn-secondary {
        width: 100%;
    }

    .finance-jump-controls {
        justify-content: stretch;
        flex-direction: column;
    }
}

.finance-receipt-actions {
    margin-top: 0.35rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}

.finance-receipt-link {
    border: none;
    background: transparent;
    padding: 0;
    color: var(--primary-color);
    font: inherit;
    font-size: 0.78rem;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
}

.finance-receipt-link:hover {
    text-decoration: underline;
}

/* Campaigns */
.campaign-timezone {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 0.35rem;
}

.campaign-status {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.campaign-actions-cell {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.campaign-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.campaign-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 1200px) {
    .dashboard-hero-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .campaign-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero-grid,
    .dashboard-main-grid,
    .dashboard-members-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-mini-metrics {
        grid-template-columns: 1fr;
    }

    .dashboard-system-bar {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .finance-bucket-summary {
        grid-template-columns: 1fr;
    }

    .finance-inline-form {
        grid-template-columns: 1fr;
    }
}

.help-table td,
.help-table th {
    vertical-align: top;
}

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

.help-list {
    margin-left: 1rem;
    margin-top: 0.4rem;
}

/* Badge */
.badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ─── Fullscreen Overlay (Member Edit, Campaign Edit) ─── */
.fullscreen-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.fullscreen-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.fullscreen-panel {
    background: #fff;
    border-radius: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    transform: translateY(20px);
    transition: transform 0.25s ease;
    overflow: hidden;
}

.fullscreen-overlay.active .fullscreen-panel {
    transform: translateY(0);
}

.fullscreen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.fullscreen-header h2 {
    font-size: 1.15rem;
    color: var(--primary-color);
    margin: 0;
}

.fullscreen-close-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #666;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
}

.fullscreen-close-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.fullscreen-body {
    padding: 1.5rem 2rem;
    overflow-y: auto;
    flex: 1;
}

.fullscreen-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* Form layout helpers */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    color: #374151;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Role checkboxes */
.role-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.4rem 1rem;
}

.role-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.3rem 0.2rem;
    border-radius: 6px;
    transition: background 0.15s;
}

.role-checkbox-label:hover {
    background: rgba(42, 42, 114, 0.06);
}

.role-checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Role badge (member table) */
.role-badge {
    display: inline-block;
    background: rgba(42, 42, 114, 0.08);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    margin: 1px 2px;
}

/* Status badge colors (German) */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
}

.status-badge.status-aktiv,
.status-badge.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.status-badge.status-passiv,
.status-badge.status-passive {
    background: rgba(156, 163, 175, 0.2);
    color: #4b5563;
}

.status-badge.status-gesch-ftlich,
.status-badge.status-business {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
}

.status-badge.status-ehrenmitglied,
.status-badge.status-honorary {
    background: rgba(234, 179, 8, 0.18);
    color: #92400e;
}

.status-badge.status-verstorben,
.status-badge.status-deceased {
    background: rgba(107, 114, 128, 0.15);
    color: #374151;
}

.status-badge.status-familie,
.status-badge.status-family {
    background: rgba(168, 85, 247, 0.12);
    color: #6b21a8;
}

.status-badge.status-gast,
.status-badge.status-guest {
    background: rgba(244, 114, 182, 0.12);
    color: #9d174d;
}

.status-badge.status-ehemalig,
.status-badge.status-former {
    background: rgba(120, 113, 108, 0.12);
    color: #57534e;
}

/* ─── Settings: Tag System ─── */
.settings-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.settings-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(42, 42, 114, 0.08);
    color: var(--primary-color);
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.settings-tag--team {
    background: rgba(42, 42, 114, 0.12);
    color: #1a237e;
}

.settings-tag--func {
    background: rgba(51, 105, 30, 0.1);
    color: #33691e;
}

.settings-tag--member {
    background: rgba(69, 90, 100, 0.1);
    color: #455a64;
}

.settings-tag-remove {
    background: none;
    border: none;
    color: inherit;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.5;
    padding: 0;
    line-height: 1;
    width: auto;
}

.settings-tag-remove:hover {
    opacity: 1;
    color: #dc2626;
}

.settings-add-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.settings-add-row input {
    max-width: 250px;
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
}

/* ─── Campaign Email Preview ─── */
.preview-frame-wrap {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0.75rem;
    background: #fff;
}

.preview-frame-wrap iframe {
    width: 100%;
    min-height: 400px;
    border: none;
}

.preview-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
}

.preview-tab {
    padding: 0.5rem 1.2rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: 0.15s;
}

.preview-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.preview-tab:hover {
    color: var(--primary-color);
}

/* ─── Bulk Action Bar (Member mass actions) ─── */
.bulk-action-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    color: #fff;
    padding: 0.65rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-radius: 12px;
    margin-top: 0.75rem;
    box-shadow: 0 -4px 20px rgba(42, 42, 114, 0.25);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 100;
    animation: bulkBarSlideUp 0.25s ease;
}

@keyframes bulkBarSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.bulk-action-bar .btn-small {
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    transition: 0.15s;
    font-weight: 500;
}

.bulk-action-bar .btn-small:hover {
    background: rgba(255, 255, 255, 0.3);
}

.bulk-action-bar .btn-danger {
    background: rgba(220, 38, 38, 0.8);
    border-color: rgba(220, 38, 38, 0.6);
}

.bulk-action-bar .btn-danger:hover {
    background: #dc2626;
}

/* Selected table row */
tr.row-selected {
    background: rgba(42, 42, 114, 0.06) !important;
}

tr.row-selected td {
    border-color: rgba(42, 42, 114, 0.12);
}

/* Danger button (standalone) */
.btn-danger {
    background: #dc2626;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.15s;
}

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

/* ─── Quill WYSIWYG Editor Overrides ─── */
.ql-toolbar.ql-snow {
    border-radius: 8px 8px 0 0;
    border-color: #d1d5db;
    background: #f9fafb;
}

.ql-container.ql-snow {
    border-radius: 0 0 8px 8px;
    border-color: #d1d5db;
    font-family: inherit;
    font-size: 0.95rem;
    min-height: 200px;
}

.ql-editor {
    min-height: 200px;
    line-height: 1.6;
}

.ql-editor.ql-blank::before {
    color: #9ca3af;
    font-style: normal;
}

.editor-mode-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 0.6rem;
}

.editor-mode-switch .btn-secondary.active {
    background: #2a2a72;
    color: #fff;
    border-color: #2a2a72;
}

.email-editor-shell {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.email-editor-textarea {
    min-height: 220px;
}

.email-editor-html {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.member-warning-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.member-warning-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    border: 1px solid #fecaca;
    background: #fee2e2;
    color: #b91c1c;
    cursor: help;
    font-weight: 700;
}

.member-warning-banner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 1rem;
    padding: 0.8rem 0.95rem;
    border-radius: 12px;
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #991b1b;
    font-weight: 600;
}

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

.reachability-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.reachability-card h4 {
    margin: 0 0 0.35rem;
}

.reachability-count {
    margin: 0 0 0.8rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
}

.reachability-list {
    margin: 0.8rem 0 0;
    padding-left: 1.1rem;
    color: #4b5563;
}

.reachability-details summary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    color: #2a2a72;
    font-weight: 600;
    user-select: none;
}

.reachability-details summary::-webkit-details-marker {
    color: #2a2a72;
}

.reachability-details[open] summary {
    margin-bottom: 0.15rem;
}

.reachability-empty {
    color: #6b7280;
    font-style: italic;
}
