/* ============================================
   En Ville — Main Stylesheet
   ============================================ */

/* ---- CSS Custom Properties (Theme) ---- */
:root {
    /* Brand colors */
    --brand-orange: #FF5C35;
    --brand-orange-hover: #e04f2a;
    --brand-orange-glow: rgba(255, 92, 53, 0.25);
    --primary-color: #FF5C35;
    --primary-light: #FF7A5C;
    --primary-dark: #CC4A2A;
    --primary-hover: #E6512F;

    /* Accent */
    --accent-color: #FF8C66;
    --accent-light: #FFA88A;

    /* Backgrounds */
    --background-color: #07080F;
    --background-secondary: #0E1020;
    --background-card: #111328;

    /* Text */
    --text-primary: #F0F0FF;
    --text-secondary: #8080B0;
    --text-muted: #505078;
    --text-inverse: #07080F;

    /* Borders */
    --border-color: #1a1c30;
    --border-light: #12142a;

    /* Topbar */
    --topbar-height: 64px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.7);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;

    /* Fonts */
    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Outfit', sans-serif;

    /* Neon Category colors */
    --cat-musique: #FF2D55;
    --cat-bar: #BF5AF2;
    --cat-restaurant: #FF9F0A;
    --cat-sport: #30D158;
    --cat-art: #00C7FF;
    --cat-festival: #FFD60A;
    --cat-pleinair: #00E5B0;
    --cat-prive: #7F8C8D;
    --cat-famille: #FF375F;
    --cat-autre: #95A5A6;
}

/* Font overrides */
body, input, button, select, textarea {
    font-family: var(--font-body);
}

h1, h2, .page-header h1, .metric-value {
    font-family: var(--font-display);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ---- Liquid Glass System ---- */
.glass,
.metric-card,
.section-card,
.modal,
.notification-dropdown,
.user-dropdown,
.ev-event-card,
.event-card-enhanced,
.discovery-event-card {
    background: rgba(14, 16, 32, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color var(--transition-normal),
                box-shadow var(--transition-normal);
}

.glass:hover,
.metric-card:hover,
.ev-event-card:hover,
.event-card-enhanced:hover,
.discovery-event-card:hover {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ---- Neon Category Glow ---- */
.event-card-badge,
.category-badge,
.cat-badge {
    text-shadow: 0 0 8px currentColor;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Root-level horizontal containment. Prevents mobile browsers (DDG,
       Chrome Android, Safari) from auto-zooming-out when a descendant
       overflows. `hidden` = fallback for older engines; `clip` = modern
       (no BFC so position:fixed still works). */
    overflow-x: hidden;
    overflow-x: clip;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    /* overflow: clip clips visually without creating a scroll container —
       overflow-x: hidden on body defeats position:fixed on Chrome/Android */
    overflow-x: clip;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* ---- Layout ---- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.main-wrapper {
    flex: 1;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
}

.main-content {
    flex: 1;
    padding: 24px;
    margin-top: var(--topbar-height);
}

/* ---- Topbar ---- */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    z-index: 900;
    transition: left var(--transition-normal), background-color var(--transition-normal);
}

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

.search-container input {
    width: 100%;
    min-width: 0;
    padding: 10px 16px 10px 42px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--background-secondary);
    color: var(--text-primary);
    font-size: 14px;
    min-height: 44px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-container input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-container input::placeholder {
    color: var(--text-muted);
}

.search-container .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
}

/* Language toggle button (topbar) */
.lang-toggle-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s;
    white-space: nowrap;
}
.lang-toggle-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(255, 140, 102, 0.08);
}

.notification-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    position: relative;
    transition: all var(--transition-fast);
}

.notification-btn:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
}

.notification-btn .notif-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #EF4444;
    border-radius: 50%;
    border: 2px solid var(--background-color);
}

/* User avatar dropdown */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: none;
    cursor: pointer;
    min-height: 44px;
    transition: all var(--transition-fast);
    color: var(--text-primary);
}

.user-menu-trigger:hover {
    background: var(--background-secondary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.user-menu-trigger .user-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.user-menu-trigger .chevron {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.user-menu.open .chevron {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    /* background & border handled by Liquid Glass system */
    border-radius: var(--radius-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
    z-index: 1100;
}

.user-menu.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: background var(--transition-fast);
    min-height: 44px;
}

.user-dropdown-item:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.user-dropdown-item:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.user-dropdown-item:hover {
    background: var(--background-secondary);
}

.user-dropdown-item i {
    width: 18px;
    text-align: center;
    color: var(--text-secondary);
}

/* Notification count badge inside dropdown row */
.dropdown-notif-badge {
    margin-left: auto;
    background: var(--primary-color, #FF5C35);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dropdown-divider {
    border-top: 1px solid var(--border-color);
    margin: 4px 0;
}

/* ---- Page Header ---- */
.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ---- Dashboard Ticker (Layout A) ---- */
.dashboard-ticker {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 10px 0;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
}

.dashboard-ticker .ticker-track {
    display: flex;
    gap: 48px;
    animation: ticker-scroll 18s linear infinite;
    white-space: nowrap;
}

.dashboard-ticker .ticker-item {
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.dashboard-ticker .ticker-item i {
    color: #FFD700;
}

/* ---- KPI Metric Cards ---- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.metrics-compact {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.metrics-compact .metric-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
}

.metrics-compact .metric-content {
    min-width: 0;
}

.metrics-compact .metric-value {
    font-size: 22px;
}

.metrics-compact .metric-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metric-card {
    /* background & border handled by Liquid Glass system */
    border-radius: var(--radius-md);
    padding: 20px;
    transition: box-shadow var(--transition-fast), border-color var(--transition-normal);
}

.metric-card:hover {
    /* hover handled by Liquid Glass system */
}

.metric-card .metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.metric-card .metric-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.metric-card .metric-change {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.metric-change.positive {
    background: rgba(48, 209, 88, 0.1);
    color: #30D158;
}

.metric-change.negative {
    background: rgba(231, 76, 60, 0.1);
    color: #FF2D55;
}

.metric-card .metric-value {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 2px;
}

.metric-card .metric-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ---- Section Cards ---- */
.section-card {
    /* background & border handled by Liquid Glass system */
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    transition: border-color var(--transition-normal);
}

.section-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.section-card .card-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.section-card .card-body {
    padding: 20px;
}

/* ---- Live Map Card (shared across layouts) ---- */
.live-map-card {
    margin-bottom: 24px;
}

/* ---- Map ---- */
.map-container {
    width: 100%;
    height: 500px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

#event-map {
    width: 100%;
    height: 100%;
}

.map-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--background-card);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 36px;
    user-select: none;
}

.filter-chip:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.filter-chip.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.filter-chip .chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---- Chart Grid ---- */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.charts-grid .section-card:only-child {
    grid-column: 1 / -1;
}

.chart-container {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.chart-container .chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.chart-container .chart-header h3 {
    font-size: 15px;
    font-weight: 600;
}

.chart-placeholder {
    width: 100%;
    height: 300px;
    background: var(--background-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ---- Top 10 List ---- */
.top10-list {
    list-style: none;
}

.top10-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.top10-item:last-child {
    border-bottom: none;
}

.top10-rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--background-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.top10-item:nth-child(1) .top10-rank {
    background: #F59E0B;
    color: white;
}

.top10-item:nth-child(2) .top10-rank {
    background: #94A3B8;
    color: white;
}

.top10-item:nth-child(3) .top10-rank {
    background: #CD7F32;
    color: white;
}

.top10-info {
    flex: 1;
    min-width: 0;
}

.top10-info .top10-title {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top10-info .top10-venue {
    font-size: 12px;
    color: var(--text-muted);
}

.top10-count {
    text-align: right;
    flex-shrink: 0;
}

.top10-count .count-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-color);
}

.top10-count .count-label {
    font-size: 11px;
    color: var(--text-muted);
}

.top10-bar {
    width: 80px;
    height: 6px;
    background: var(--background-secondary);
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.top10-bar .bar-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--accent-color);
    transition: width var(--transition-normal);
}

/* ---- Activity Feed ---- */
.activity-feed {
    list-style: none;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-icon.rsvp { background: rgba(59, 130, 246, 0.1); color: var(--accent-color); }
.activity-icon.checkin { background: rgba(48, 209, 88, 0.1); color: #30D158; }
.activity-icon.event { background: rgba(191, 90, 242, 0.1); color: #BF5AF2; }

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-content .activity-text {
    font-size: 14px;
    line-height: 1.4;
}

.activity-content .activity-text strong {
    font-weight: 600;
}

.activity-content .activity-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---- Event Creation Form ---- */
.form-section {
    margin-bottom: 24px;
}

.form-section-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

/* Bilingual tab bar for create event form */
.bilingual-tabs {
    margin-bottom: 16px;
}
.bilingual-tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
}
.bilingual-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.bilingual-tab:hover {
    color: var(--text-primary);
}
.bilingual-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}
.bilingual-check {
    color: #30D158;
    font-size: 12px;
    font-weight: 700;
}
.bilingual-panel {
    animation: fadeIn 0.15s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group label .required {
    color: #EF4444;
}

.form-control {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--background-color);
    color: var(--text-primary);
    font-size: 14px;
    min-height: 44px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .form-control {
    padding-right: 44px;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    width: 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    opacity: 0.35;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: opacity var(--transition-fast);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.password-toggle:hover {
    opacity: 0.75;
}

.password-toggle:focus {
    outline: none;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    min-height: 44px;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: #2563EB;
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--background-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-danger {
    background: #EF4444;
    color: white;
}

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

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
    min-height: 36px;
}

.btn-block {
    width: 100%;
}

/* ---- RSVP Buttons ---- */
.rsvp-buttons {
    display: flex;
    gap: 8px;
}

.btn-interesse {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.btn-interesse:hover, .btn-interesse.active {
    background: var(--accent-color);
    color: white;
}

.btn-jyvais {
    background: rgba(48, 209, 88, 0.1);
    color: #30D158;
    border: 1px solid #30D158;
}

.btn-jyvais:hover, .btn-jyvais.active {
    background: #30D158;
    color: white;
}

.btn-checkin {
    background: rgba(191, 90, 242, 0.1);
    color: #BF5AF2;
    border: 1px solid #BF5AF2;
}

.btn-checkin:hover, .btn-checkin.active {
    background: #BF5AF2;
    color: white;
}

/* ---- Settings Panel ---- */
.settings-section {
    margin-bottom: 32px;
}

.settings-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.settings-subsection {
    padding: 16px;
    background: var(--card-bg, rgba(255,255,255,0.03));
    border: 1px solid var(--border-color, rgba(255,255,255,0.06));
    border-radius: 10px;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    gap: 16px;
}

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

.setting-info {
    flex: 1;
}

.setting-info .setting-label {
    font-size: 14px;
    font-weight: 500;
}

.setting-info .setting-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-color);
    border-radius: 26px;
    transition: var(--transition-fast);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent-color);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* ---- Modals ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    padding: 20px;
    overscroll-behavior: contain;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    /* background handled by Liquid Glass system */
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform var(--transition-fast);
}

.modal-overlay.open .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    flex: 1;
    min-height: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* ===========================================================
   Modal Stack — layered event-detail browsing
   =========================================================== */
.modal-stack-overlay {
    transition: opacity 260ms ease, background-color 260ms ease;
}
.modal-stack-overlay .modal-stack-card {
    transform: translateY(40px) scale(1);
    opacity: 0;
    transition: transform 280ms cubic-bezier(0.22, 0.9, 0.3, 1),
                opacity 240ms ease,
                filter 280ms ease;
    transform-origin: center top;
    border: 1px solid var(--cat-color-border, transparent);
    box-shadow: var(--shadow-lg), 0 0 32px -4px var(--cat-color-glow, transparent);
}
.modal-stack-overlay.open .modal-stack-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Pushed-back modals sit behind the top one: scaled down + dimmed */
.modal-stack-overlay.modal-pushed {
    background: rgba(0, 0, 0, 0.25);
    pointer-events: none; /* only top is interactive */
}
.modal-stack-overlay.modal-pushed .modal-stack-card {
    /* Each extra depth level nudges the card further up + smaller */
    transform: translateY(calc(-14px * var(--modal-depth, 1)))
               scale(calc(1 - 0.04 * var(--modal-depth, 1)));
    filter: brightness(0.82) saturate(0.9);
    opacity: 0.85;
}

/* Back button in header */
.modal-stack-overlay .modal-back {
    background: none;
    border: none;
    font-size: 16px;
    color: var(--text-muted);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    margin-right: 4px;
}
.modal-stack-overlay .modal-back:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
}
.modal-stack-overlay .modal-header {
    gap: 8px;
}
.modal-stack-overlay .modal-header h2 {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Similar events strip inside event modal body */
.ev-similar-strip {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}
.ev-similar-strip-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ev-similar-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.ev-similar-card {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.ev-similar-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.ev-similar-card-cover {
    height: 90px;
    background-color: var(--background-tertiary, #1c2338);
    position: relative;
    overflow: hidden;
}
.ev-similar-card-cover .ev-similar-cat {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
}
.ev-similar-card-body {
    padding: 8px 10px 10px;
}
.ev-similar-card-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ev-similar-card-date {
    font-size: 10.5px;
    color: var(--text-muted);
}
.ev-similar-empty {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
    padding: 4px 0;
}

/* ---- Map Popup ---- */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    min-width: 260px;
}

.map-popup {
    padding: 16px;
}

.map-popup .popup-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    color: white;
}

.map-popup .popup-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.map-popup .popup-venue {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.map-popup .popup-datetime {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.map-popup .popup-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    padding: 8px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.map-popup .popup-stat {
    text-align: center;
}

.map-popup .popup-stat .stat-num {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-color);
}

.map-popup .popup-stat .stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.map-popup .popup-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ---- Tabs ---- */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    min-height: 44px;
    transition: all var(--transition-fast);
}

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

.tab-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ---- Auth Pages ---- */
.auth-container {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--background-secondary);
}

.auth-container.active {
    display: flex;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--background-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

.auth-card .auth-brand {
    text-align: center;
    margin-bottom: 32px;
}

.auth-card .auth-brand .brand-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-color);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 12px;
}

.auth-card .auth-brand h1 {
    font-size: 22px;
    font-weight: 700;
}

.auth-card .auth-brand p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--background-color);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    min-height: 44px;
    transition: all var(--transition-fast);
}

.btn-social:hover {
    background: var(--background-secondary);
    border-color: var(--text-muted);
}

/* Google rendered button wrapper — centers and sizes it like our .btn-social */
.google-signin-wrapper {
    display: flex;
    justify-content: center;
    min-height: 44px;
}
.google-signin-wrapper > div {
    width: 100% !important;
}
.google-signin-wrapper iframe {
    width: 100% !important;
    border-radius: var(--radius-sm) !important;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 13px;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer a {
    font-weight: 500;
}

a.ev-dropdown-terms-link {
    text-decoration: none;
    color: var(--text-secondary);
}

.ev-terms-login-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}

.ev-terms-login-note a {
    color: var(--accent-color);
    text-decoration: underline;
}

.ev-terms-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.5;
}

.ev-terms-checkbox-label input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: var(--accent-color);
    cursor: pointer;
}

.ev-terms-checkbox-label a {
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 500;
}

/* ---- Toast Notifications ---- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: var(--background-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    min-width: 300px;
    max-width: 450px;
    animation: toastIn 300ms ease;
}

.toast.success { border-left: 4px solid #30D158; }
.toast.error { border-left: 4px solid #EF4444; }
.toast.info { border-left: 4px solid var(--accent-color); }

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

/* ---- Skeleton Loading ---- */
.skeleton {
    background: linear-gradient(90deg, var(--background-secondary) 25%, var(--border-light) 50%, var(--background-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- Responsive: Mobile ---- */
@media (max-width: 768px) {
    .search-container {
        flex: 1;
        min-width: 0;
        max-width: none;
    }

    .search-container input {
        min-width: 0;
        width: 100%;
        font-size: 13px;
        padding: 8px 12px 8px 36px;
        min-height: 38px;
    }

    .search-container .search-icon {
        left: 10px;
        font-size: 13px;
    }

    .topbar {
        padding: 0 10px;
        gap: 8px;
    }

    .topbar-right {
        gap: 6px;
        flex-shrink: 0;
    }

    .theme-toggle,
    .notification-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .user-menu-trigger {
        padding: 4px 6px !important;
    }

    .user-avatar {
        width: 30px !important;
        height: 30px !important;
        font-size: 12px !important;
    }

    .user-menu-trigger .chevron {
        display: none;
    }

    .user-menu-trigger .user-name {
        display: none;
    }

    .notification-dropdown {
        right: -60px;
        width: 300px;
    }

    .main-content {
        padding: 12px;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .metrics-compact {
        grid-template-columns: repeat(2, 1fr);
    }

    .metrics-compact .metric-card {
        gap: 10px;
        padding: 10px 12px;
    }

    .metrics-compact .metric-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .metrics-compact .metric-value {
        font-size: 18px;
    }

    .dashboard-ticker {
        margin-bottom: 14px;
    }

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

    .map-container {
        height: 350px;
    }

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

}

@media (max-width: 480px) {
    .topbar-right .notification-btn {
        display: none;
    }

    .auth-card {
        padding: 24px;
    }

    .rsvp-buttons {
        flex-direction: column;
    }

    /* Layout A: single-column KPIs on small phones */
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    /* Layout C: tighter feed on small phones */
    .feed-card {
        margin-bottom: 12px;
    }

    .feed-card-actions .btn {
        padding: 8px 4px;
        font-size: 11px;
    }

    /* Layout D: more space for list, less for map */
    .mapsplit-map {
        height: 35vh;
        min-height: 200px;
    }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ---- Calendar ---- */
.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-nav .btn-nav {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--background-card);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--transition-fast);
}

.calendar-nav .btn-nav:hover {
    background: var(--background-secondary);
}

.calendar-nav .calendar-title {
    font-size: 18px;
    font-weight: 600;
    min-width: 200px;
    text-align: center;
}

.calendar-views {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.calendar-views .view-btn {
    padding: 8px 16px;
    border: none;
    background: var(--background-card);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    min-height: 44px;
    transition: all var(--transition-fast);
    border-right: 1px solid var(--border-color);
}

.calendar-views .view-btn:last-child {
    border-right: none;
}

.calendar-views .view-btn:hover {
    background: var(--background-secondary);
}

.calendar-views .view-btn.active {
    background: var(--accent-color);
    color: white;
}

/* Week View */
.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.calendar-week .day-header {
    background: var(--primary-color);
    color: white;
    padding: 10px 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.calendar-week .day-cell {
    background: var(--background-card);
    min-height: 120px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    transition: background var(--transition-fast);
}

.calendar-week .day-cell:hover {
    background: var(--background-secondary);
}

.calendar-week .day-cell.today {
    background: rgba(59, 130, 246, 0.05);
}

.calendar-week .day-cell.other-month {
    opacity: 0.4;
}

.calendar-week .day-number {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.calendar-week .day-cell.today .day-number {
    background: var(--accent-color);
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-event-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 6px;
    margin-bottom: 3px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
    font-weight: 500;
}

.calendar-event-chip:hover {
    opacity: 0.85;
    transform: translateX(2px);
}

.calendar-event-chip .chip-time {
    font-weight: 600;
    flex-shrink: 0;
}

.calendar-event-chip .chip-score {
    margin-left: auto;
    background: rgba(255,255,255,0.25);
    padding: 0 4px;
    border-radius: 3px;
    font-size: 10px;
    flex-shrink: 0;
}

.day-more {
    font-size: 11px;
    color: var(--accent-color);
    cursor: pointer;
    padding: 2px 0;
    font-weight: 500;
}

/* Day View */
.calendar-day {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.day-event-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-left: 4px solid var(--accent-color);
}

.day-event-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.day-event-time {
    text-align: center;
    min-width: 50px;
    flex-shrink: 0;
}

.day-event-time .time-hour {
    font-size: 18px;
    font-weight: 700;
}

.day-event-time .time-period {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.day-event-info {
    flex: 1;
    min-width: 0;
}

.day-event-info .event-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-event-info .event-venue {
    font-size: 12px;
    color: var(--text-muted);
}

.day-event-stats {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.day-event-stats .stat {
    text-align: center;
}

.day-event-stats .stat-num {
    font-size: 16px;
    font-weight: 700;
}

.day-event-stats .stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.popularity-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    flex-shrink: 0;
}

.popularity-badge i {
    font-size: 10px;
}

/* Month View */
.calendar-month {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.calendar-month .day-header {
    background: var(--primary-color);
    color: white;
    padding: 10px 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.calendar-month .day-cell {
    background: var(--background-card);
    min-height: 80px;
    padding: 6px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.calendar-month .day-cell:hover {
    background: var(--background-secondary);
}

.calendar-month .day-cell.today {
    background: rgba(59, 130, 246, 0.05);
}

.calendar-month .day-cell.other-month {
    opacity: 0.3;
}

.calendar-month .day-number {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.calendar-month .day-cell.today .day-number {
    background: var(--accent-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.event-dots {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.event-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.month-event-count {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Responsive calendar */
@media (max-width: 768px) {
    .calendar-week {
        grid-template-columns: 1fr;
    }

    .calendar-week .day-header {
        display: none;
    }

    .calendar-week .day-cell {
        min-height: auto;
        padding: 12px;
        border-bottom: 1px solid var(--border-color);
    }

    .calendar-week .day-number {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .calendar-month {
        grid-template-columns: repeat(7, 1fr);
    }

    .calendar-month .day-cell {
        min-height: 50px;
        padding: 4px;
    }

    .calendar-month .event-dots {
        display: none;
    }

    .day-event-stats {
        display: none;
    }

    .calendar-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-nav {
        justify-content: center;
    }

    .calendar-views {
        justify-content: center;
    }
}

/* ---- Map Date Navigation ---- */
.map-date-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.map-date-bar .date-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-date-bar .date-label {
    font-size: 14px;
    font-weight: 600;
    min-width: 120px;
    text-align: center;
}

.mini-calendar-wrapper {
    position: relative;
}

.mini-calendar-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--background-card);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.mini-calendar-toggle:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.mini-calendar-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    margin-top: 4px;
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 12px;
    display: none;
    min-width: 280px;
}

.mini-calendar-dropdown.open {
    display: block;
}

.mini-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.mini-cal-header button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.mini-cal-header button:hover {
    background: var(--background-secondary);
    color: var(--accent-color);
}

.mini-cal-title {
    font-size: 13px;
    font-weight: 600;
}

.mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.mini-cal-grid .day-hdr {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 4px 0;
    text-transform: uppercase;
}

.mini-cal-grid .day-cell {
    font-size: 12px;
    padding: 6px 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text-primary);
}

.mini-cal-grid .day-cell:hover {
    background: var(--accent-color);
    color: white;
}

.mini-cal-grid .day-cell.today {
    font-weight: 700;
    background: var(--background-secondary);
    color: var(--accent-color);
}

.mini-cal-grid .day-cell.selected {
    background: var(--accent-color);
    color: white;
    font-weight: 700;
}

.mini-cal-grid .day-cell.other-month {
    color: var(--text-muted);
    opacity: 0.5;
}

/* ---- Geocoding / Address Search ---- */
.address-input-wrapper {
    position: relative;
}

.address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: var(--shadow-md);
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.address-suggestions.open {
    display: block;
}

.address-suggestion {
    padding: 10px 12px;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}

.address-suggestion:hover {
    background: var(--background-secondary);
}

.address-suggestion:last-child {
    border-bottom: none;
}

.address-suggestion .suggestion-main {
    font-weight: 500;
    color: var(--text-primary);
}

.address-suggestion .suggestion-secondary {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Existing events on create map */
.create-map-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.create-map-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.create-map-legend .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ---- Link Preview ---- */
.link-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--background-secondary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.link-preview:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

/* ---- Notifications Dropdown ---- */
.notification-wrapper {
    position: relative;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 340px;
    max-height: 420px;
    /* background & border handled by Liquid Glass system */
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.notification-dropdown.open {
    display: block;
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.notif-clear {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 12px;
}

.notif-clear:hover {
    text-decoration: underline;
}

.notif-list {
    overflow-y: auto;
    max-height: 360px;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.15s;
    font-size: 13px;
}

.notif-item:hover {
    background: var(--background-secondary);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item--invite {
    cursor: default;
    align-items: flex-start;
}
.notif-item--invite:hover {
    background: inherit;
}
.notif-invite-btns {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.notif-accept-btn,
.notif-decline-btn {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}
.notif-accept-btn {
    background: #30D158;
    color: #000;
}
.notif-decline-btn {
    background: var(--background-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.notif-accept-btn:hover { opacity: 0.85; }
.notif-decline-btn:hover { opacity: 0.75; }

.invite-declined-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    border-radius: 8px;
    color: #FF3B30;
    font-size: 13px;
    margin-bottom: 16px;
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    color: white;
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-text {
    line-height: 1.4;
    color: var(--text-primary);
}

.notif-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.notif-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

@media (max-width: 480px) {
    .notification-dropdown {
        width: calc(100vw - 32px);
        right: -60px;
    }
}

/* ---- Layout Switcher ---- */
.layout-switcher {
    display: flex;
    gap: 4px;
    background: var(--background-secondary);
    padding: 4px;
    border-radius: var(--radius-sm);
}

.layout-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    transition: all 0.2s;
}

.layout-btn:hover {
    color: var(--accent-color);
    background: var(--background-card);
}

.layout-btn.active {
    background: var(--accent-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.page-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

/* ---- Layout B: Discovery ---- */
.discovery-hero {
    text-align: center;
    padding: 24px 0 32px;
}

.discovery-hero h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.discovery-hero p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.discovery-search-bar {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
}

.discovery-search-input {
    flex: 1;
    padding: 14px 20px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    background: var(--background-card);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.discovery-search-input:focus {
    border-color: var(--accent-color);
}

.discovery-search-btn {
    padding: 14px 24px;
    border: 2px solid var(--accent-color);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.discovery-search-btn:hover {
    background: var(--accent-light);
}

.discovery-date-pills {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.discovery-section {
    margin-bottom: 32px;
}

.discovery-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.discovery-happening-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.discovery-happening-grid::-webkit-scrollbar {
    height: 4px;
}

.discovery-happening-grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.discovery-event-card {
    /* background & border handled by Liquid Glass system */
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}

.discovery-event-card:hover {
    /* glass hover + lift */
    transform: translateY(-2px);
}

.discovery-event-card .card-image {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: rgba(255,255,255,0.8);
    position: relative;
}

.discovery-event-card .card-image .live-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #FF2D55;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.discovery-event-card .card-content {
    padding: 14px 16px;
}

.discovery-event-card .card-content h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discovery-event-card .card-content .card-venue {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.discovery-event-card .card-content .card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

.discovery-event-card.live-card {
    min-width: 280px;
    scroll-snap-align: start;
    flex-shrink: 0;
}

.discovery-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.discovery-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

/* ---- Layout C: Feed ---- */
.feed-ticker {
    background: var(--primary-color);
    color: white;
    padding: 10px 0;
    overflow: hidden;
    margin-bottom: 24px;
    border-radius: var(--radius-md);
}

.ticker-track {
    display: flex;
    gap: 48px;
    animation: ticker-scroll 18s linear infinite;
    white-space: nowrap;
}

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.ticker-item {
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ticker-item i {
    color: var(--accent-light);
}

.feed-container {
    max-width: 680px;
    margin: 0 auto;
}

.feed-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
    padding-bottom: 4px;
}

.feed-card {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.feed-card:hover {
    box-shadow: var(--shadow-md);
}

.feed-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.feed-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.feed-card-meta {
    flex: 1;
    min-width: 0;
}

.feed-card-meta .feed-venue {
    font-weight: 600;
    font-size: 14px;
}

.feed-card-meta .feed-time {
    font-size: 12px;
    color: var(--text-muted);
}

.feed-card-image {
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    color: rgba(255,255,255,0.6);
    position: relative;
    cursor: pointer;
}

.feed-card-image .feed-score {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.feed-card-body {
    padding: 16px;
}

.feed-card-body h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
    cursor: pointer;
}

.feed-card-body h3:hover {
    color: var(--accent-color);
}

.feed-card-body .feed-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feed-card-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
}

.feed-card-actions {
    display: flex;
    gap: 0;
    border-top: 1px solid var(--border-color);
}

.feed-card-actions .btn {
    flex: 1;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--border-color);
    padding: 12px;
    font-size: 13px;
}

.feed-card-actions .btn:last-child {
    border-right: none;
}

.feed-load-more {
    text-align: center;
    padding: 20px;
}

/* ---- Layout D: Map Split ---- */
.mapsplit-container {
    display: flex;
    height: calc(100vh - var(--topbar-height) - 130px);
    min-height: 500px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.mapsplit-list {
    width: 40%;
    min-width: 320px;
    overflow-y: auto;
    background: var(--background-card);
    border-right: 1px solid var(--border-color);
}

.mapsplit-filters {
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--background-card);
    z-index: 2;
}

.mapsplit-results-count {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

.mapsplit-event-item {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.15s;
}

.mapsplit-event-item:hover,
.mapsplit-event-item.highlighted {
    background: var(--background-secondary);
}

.mapsplit-event-item.highlighted {
    border-left: 3px solid var(--accent-color);
}

.mapsplit-event-thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: rgba(255,255,255,0.8);
}

.mapsplit-event-info {
    flex: 1;
    min-width: 0;
}

.mapsplit-event-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mapsplit-event-info .ms-venue {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.mapsplit-event-info .ms-date {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.mapsplit-event-info .ms-stats {
    display: flex;
    gap: 10px;
    font-size: 11px;
}

.mapsplit-map {
    flex: 1;
    min-height: 400px;
}

#mapsplit-map-container {
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {

    /* ---- Layout A: Dashboard mobile fixes ---- */
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .metric-card {
        padding: 14px;
    }

    .metric-card .metric-value {
        font-size: 24px;
    }

    .metric-card .metric-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .live-map-card .map-container {
        height: 220px !important;
    }

    /* ---- Layout B: Discovery mobile fixes ---- */
    .discovery-hero {
        padding: 16px 0 20px;
    }

    .discovery-hero h2 {
        font-size: 22px;
    }

    .discovery-hero p {
        font-size: 13px;
    }

    .discovery-search-input {
        padding: 10px 14px;
        font-size: 14px;
    }

    .discovery-search-btn {
        padding: 10px 16px;
    }

    .discovery-featured-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .discovery-event-card.live-card {
        min-width: 240px;
    }

    .discovery-event-card .card-image {
        height: 130px;
    }

    .discovery-section {
        margin-bottom: 24px;
    }

    .discovery-section h2 {
        font-size: 18px;
    }

    /* ---- Layout C: Feed mobile fixes ---- */
    .feed-container {
        max-width: 100%;
    }

    .feed-ticker {
        margin-bottom: 16px;
    }

    .feed-card-header {
        padding: 10px 12px;
    }

    .feed-card-body {
        padding: 12px;
    }

    .feed-card-body h3 {
        font-size: 15px;
    }

    .feed-card-image {
        font-size: 40px;
    }

    .feed-card-actions .btn {
        padding: 10px 8px;
        font-size: 12px;
    }

    .feed-card-stats {
        gap: 10px;
        font-size: 12px;
    }

    /* ---- Layout D: Map Split mobile fixes ---- */
    .mapsplit-container {
        flex-direction: column;
        height: auto;
        min-height: 0;
    }

    /* Hide the redundant live map card on Map Split layout — the split already has its own map */
    .mapsplit-container ~ .live-map-card,
    .live-map-card + .mapsplit-container {
        /* Keep mapsplit, hide live map via JS instead */
    }

    .mapsplit-list {
        width: 100%;
        min-width: 0;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        overflow-y: visible;
    }

    .mapsplit-map {
        height: 45vh;
        min-height: 250px;
    }

    .mapsplit-event-item {
        padding: 10px 12px;
        gap: 10px;
    }

    .mapsplit-event-thumb {
        width: 56px;
        height: 56px;
        font-size: 20px;
    }

    /* ---- Shared header ---- */
    .page-header-flex {
        flex-direction: column;
        align-items: stretch;
    }

    .layout-switcher {
        justify-content: center;
    }
}

/* ---- QR Modal ---- */
#qr-modal .modal-footer {
    flex-wrap: wrap;
}

#qr-modal .modal-footer .btn {
    min-width: 140px;
}

@media (max-width: 480px) {
    #qr-modal .modal-footer {
        flex-direction: column;
    }
    #qr-modal .modal-footer .btn {
        width: 100%;
    }
    #qr-card {
        padding: 20px !important;
    }
    #qr-card h3 {
        font-size: 16px !important;
    }
}

/* ---- Utility classes ---- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }

/* ============================================
   Cover Image Upload
   ============================================ */
.cover-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 0;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    overflow: hidden;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cover-upload-area:hover {
    border-color: var(--accent-color);
    background: var(--background-secondary);
}
.cover-upload-placeholder {
    text-align: center;
    padding: 32px;
}
.cover-upload-preview {
    position: relative;
    width: 100%;
    min-height: 160px;
}
.cover-upload-preview img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.cover-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s;
}
.cover-remove-btn:hover {
    background: rgba(231,76,60,0.9);
}

/* ---- Private Event Toggle ---- */
.private-event-toggle {
    margin: 4px 0 20px;
    padding: 16px 20px;
    background: rgba(191, 90, 242, 0.06);
    border: 1px solid rgba(191, 90, 242, 0.2);
    border-radius: var(--radius-md);
}
.private-toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}
.private-toggle-label input[type="checkbox"] {
    display: none;
}
.private-toggle-ui {
    width: 44px;
    height: 24px;
    background: var(--border-color);
    border-radius: 12px;
    position: relative;
    flex-shrink: 0;
    transition: background 0.25s ease;
}
.private-toggle-ui::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: transform 0.25s ease;
}
.private-toggle-label input:checked + .private-toggle-ui {
    background: #BF5AF2;
}
.private-toggle-label input:checked + .private-toggle-ui::after {
    transform: translateX(20px);
}
.private-toggle-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.private-toggle-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 8px 0 0 56px;
    line-height: 1.5;
}

/* ---- Privacy Toggle Button (modal footer + my events cards) ---- */
.btn-privacy-toggle {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.btn-privacy-toggle:hover {
    border-color: rgba(191, 90, 242, 0.4);
    color: #BF5AF2;
}
.btn-privacy-toggle.btn-private-active {
    background: rgba(191, 90, 242, 0.12);
    border-color: rgba(191, 90, 242, 0.4);
    color: #BF5AF2;
}

/* ---- Invite Panel (inside event detail modal) ---- */
.invite-panel {
    margin-top: 20px;
    border: 1px solid rgba(191, 90, 242, 0.25);
    border-radius: 10px;
    overflow: hidden;
}
.invite-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(191, 90, 242, 0.08);
    font-size: 13px;
    font-weight: 600;
    color: #BF5AF2;
}
/* no toggle button anymore — panel always open */
#invite-panel-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.invite-search-row { position: relative; }
.invite-search-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    box-sizing: border-box;
}
.invite-search-input:focus { outline: none; border-color: #BF5AF2; }
.invite-search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    z-index: 200;
    display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    max-height: 200px;
    overflow-y: auto;
}
.isd-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
}
.isd-item:hover { background: var(--background-secondary); }
.isd-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.invite-link-row { display: flex; gap: 8px; flex-wrap: wrap; }
.invite-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
}
.invite-list-loading { text-align: center; color: var(--text-muted); padding: 12px; }
.invite-empty { font-size: 13px; color: var(--text-muted); text-align: center; padding: 8px 0; margin: 0; }
.invite-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--background-secondary);
    border-radius: 8px;
    font-size: 13px;
}
.invite-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.invite-avatar-fallback {
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(191, 90, 242, 0.2);
    color: #BF5AF2;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.invite-name { flex: 1; color: var(--text-primary); }
.invite-status { font-size: 14px; }
.invite-remove {
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    padding: 2px 6px; border-radius: 4px; font-size: 12px;
    transition: color 0.15s, background 0.15s;
}
.invite-remove:hover { color: var(--danger-color); background: rgba(255,59,48,0.1); }
.btn-invite-manage {
    background: rgba(191, 90, 242, 0.08);
    border: 1px solid rgba(191, 90, 242, 0.3);
    color: #BF5AF2;
    padding: 6px 12px; border-radius: 8px; font-size: 13px;
    cursor: pointer; transition: background 0.2s;
}
.btn-invite-manage:hover { background: rgba(191, 90, 242, 0.18); }

/* ---- Event Card Cover Image ---- */
.event-card-enhanced {
    overflow: hidden;
}
.event-card-cover {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #0a0c1a;
}
/* Blurred ambient layer — same image fills edges with soft context */
.event-card-cover::before {
    content: '';
    position: absolute;
    inset: -24px;
    background-image: var(--cover-img-url, none);
    background-size: cover;
    background-position: center;
    filter: blur(22px) saturate(1.6) brightness(0.5);
    z-index: 0;
}
.event-card-cover .cover-photo {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
    filter: drop-shadow(0 2px 18px rgba(0, 0, 0, 0.55));
    transition: transform 0.4s ease;
}
.event-card-enhanced:hover .cover-photo {
    transform: scale(1.04);
}
.event-card-cover::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 72px;
    background: linear-gradient(to top, rgba(10, 12, 26, 0.92) 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}
.event-card-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 3;
    padding: 4px 10px;
    border-radius: 4px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
/* Fallback when cover image fails to load */
.ev-cover-fallback::before {
    display: none;
}
.ev-cover-fallback-icon {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.2);
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
/* Similar events thumbnail */
.ev-similar-card-cover .cover-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}
/* Event detail popup cover */
.ev-detail-cover {
    margin: -20px -20px 16px -20px;
    height: 260px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    position: relative;
    background: #0a0c1a;
}
.ev-detail-cover::before {
    content: '';
    position: absolute;
    inset: -24px;
    background-image: var(--cover-img-url, none);
    background-size: cover;
    background-position: center;
    filter: blur(22px) saturate(1.6) brightness(0.5);
    z-index: 0;
}
.ev-detail-cover::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(10,12,26,0.7) 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}
.ev-detail-cover .cover-photo {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
    filter: drop-shadow(0 2px 18px rgba(0,0,0,0.55));
}

/* ============================================
   Event Detail — Address mini-map
   ============================================ */

/* Tappable address button inside detail modal */
.ev-detail-addr-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: inherit;
    font-size: inherit;
    text-align: left;
    display: inline;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
    font-family: inherit;
}
.ev-detail-addr-btn:hover {
    color: var(--accent-color);
}

/* Collapsible mini-map container */
.ev-detail-minimap {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-radius: 8px;
    margin-top: 8px;
}
.ev-detail-minimap.open {
    max-height: 200px;
}
.ev-detail-minimap-inner {
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}
.ev-detail-minimap-inner .leaflet-container {
    height: 100%;
    border-radius: 8px;
}

/* "Get directions" overlay link on the mini-map */
.ev-detail-minimap-directions {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 1000;
    background: var(--background-primary, #0a0c1a);
    color: var(--accent-color, #7c3aed);
    border: 1px solid var(--border-color, rgba(255,255,255,0.12));
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}
.ev-detail-minimap-directions:hover {
    background: var(--background-secondary, #12142a);
}

/* ============================================
   Profile Page
   ============================================ */
.profile-header-card {
    background: var(--background-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 20px;
}
.profile-banner {
    height: 120px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
}
.profile-info-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 0 24px 24px;
    margin-top: -40px;
}
.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}
.profile-avatar-large {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    border: 4px solid var(--background-card);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.profile-avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    border: 2px solid var(--background-card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: background 0.2s;
}
.profile-avatar-edit:hover {
    background: var(--accent-light);
}
.profile-details {
    padding-top: 44px;
    min-width: 0;
}
.profile-details h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 2px;
}
.profile-username {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.profile-bio {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.profile-joined {
    font-size: 13px;
    color: var(--text-muted);
}
.profile-joined i {
    margin-right: 4px;
}

/* ---- Profile Stats Grid ---- */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.profile-stat-card {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}
.profile-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 4px;
}
.profile-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .profile-info-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .profile-details {
        padding-top: 8px;
    }
    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Settings - Enhanced
   ============================================ */
.settings-avatar-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.settings-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}
.connected-accounts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.connected-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--background-secondary);
}
.connected-account-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn-success {
    background: #30D158 !important;
    color: white !important;
    border-color: #30D158 !important;
}

/* ============================================
   Social Login Buttons (Auth Modal)
   ============================================ */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0;
}
.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--background-card);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.btn-social:hover {
    background: var(--background-secondary);
    border-color: var(--text-muted);
}
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--text-muted);
    font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}
.auth-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}
.auth-footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}
.btn-block {
    width: 100%;
}

/* ============================================
   EV LAYOUT — Full-width, no legacy topbar
   ============================================ */

[data-theme="ev"] .topbar {
    display: none !important;
}

[data-theme="ev"] .app-layout {
    grid-template-columns: 1fr;
    min-height: 100svh; /* svh = small viewport height, never taller than visible area on Android */
}

[data-theme="ev"] .main-wrapper {
    margin-left: 0;
    min-height: 100svh;
    min-width: 0; /* flex child — without this, intrinsic scroll-row width stretches parent past viewport */
    max-width: 100vw;
}

[data-theme="ev"] .main-content {
    padding: 0;
    margin-top: 0;
    max-width: 100%;
    min-width: 0; /* flex child containment */
}

[data-theme="ev"] #page-dashboard,
[data-theme="ev"] .page {
    min-width: 0;
    max-width: 100%;
}

[data-theme="ev"] .hp-page {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Dashboard: hero starts at top (sticky, no offset needed) */
[data-theme="ev"] #page-dashboard {
    padding-top: 0;
}

[data-theme="ev"] .page:not(#page-dashboard):not(#page-create-event) {
    padding: 240px 40px 40px;
}

@media (max-width: 768px) {
    [data-theme="ev"] .page:not(#page-dashboard):not(#page-create-event) {
        padding: 230px 16px 20px;
    }
}

/* EV Top Navigation */
.ev-topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    background: transparent;
    position: relative;
    z-index: 10;
}

/* EV sticky wrapper: header + ticker stick together */
.ev-sticky-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    background: rgba(14, 16, 32, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.04);
}


/* EV unified header: brand centered top, nav below */
/* padding-top clears the fixed GUW (top:20px + height:44px + 4px gap = 68px) */
.ev-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 68px 40px 10px;
    gap: 8px;
    transition: padding 0.35s ease;
}

.ev-sticky-top.scrolled .ev-header {
    padding: 10px 40px 6px;
}
#ev-persistent-nav.scrolled {
    padding: 10px 40px 6px;
}

/* ---- Sticky search bar (below ticker / nav) ---- */
.ev-sticky-search {
    padding: 0 40px 14px;
    max-height: 60px;
    overflow: visible;
    transition: max-height 0.35s ease, padding-bottom 0.35s ease, opacity 0.35s ease;
    opacity: 1;
    position: relative;
}
/* Tighter padding when scrolled so no empty gap under the search bar */
.ev-sticky-top.scrolled .ev-sticky-search,
#ev-persistent-nav.scrolled .ev-sticky-search {
    padding-bottom: 6px;
}

.ev-tagline {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(28px, 4vw, 52px);
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--primary-color);
    text-shadow: 0 0 28px rgba(255, 92, 53, 0.35);
    line-height: 1;
    text-align: center;
    width: 100%;
    transition: font-size 0.35s ease, letter-spacing 0.35s ease, opacity 0.35s ease;
}

.ev-sticky-top.scrolled .ev-tagline,
#ev-persistent-nav.scrolled .ev-tagline {
    font-size: clamp(16px, 2vw, 26px);
    letter-spacing: 3px;
    opacity: 0.7;
}

.ev-tagline .accent {
    color: var(--primary-color);
}

.ev-header .ev-topnav-links {
    justify-content: center;
}

.ev-header .ev-topnav-right {
    display: none;
}

/* New: flat single-row nav (no brand above) — kept for persistent nav */
.ev-nav-row-only {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 40px 14px;
    position: relative;
}

.ev-nav-row-only .ev-topnav-right {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
}

.ev-nav-stacked {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 40px 8px;
}

.ev-nav-stacked .ev-nav-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    width: 100%;
}

.ev-nav-stacked .ev-topnav-right {
    position: absolute;
    right: 40px;
    top: 20px;
}

.ev-topnav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ev-topnav-brand .brand-logo {
    font-size: 38px;
}

.ev-topnav-brand .brand-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 38px;
    letter-spacing: 5px;
    color: #30D158;
    text-transform: uppercase;
}

.ev-topnav-links {
    display: flex;
    align-items: center;
    gap: 48px;
    margin-top: 0;
    transition: margin-top 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ev-topnav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
    transition: color var(--transition-fast);
    cursor: pointer;
}

.ev-topnav-links a:hover,
.ev-topnav-links a.active {
    color: var(--primary-color);
    font-weight: 700;
}

.ev-topnav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Legacy — kept for any residual references */
.ev-avatar-btn { display: none !important; }

/* ============================================
   Phase 2: Living Atmosphere
   ============================================ */

/* ---- 2.1 Circadian Background Engine ---- */
body {
    transition: background 2s ease;
    background-size: 200% 200%;
}

/* Twilight (18h-21h): warm dusk purples */
body.circadian-twilight {
    background: linear-gradient(135deg, #1a0a2e 0%, #16213e 40%, #0f3460 70%, #1a0a2e 100%);
    background-size: 200% 200%;
    animation: circadian-drift 30s ease-in-out infinite;
}

/* Peak Night (21h-02h): electric deep blue with neon veins */
body.circadian-peak {
    background: linear-gradient(135deg, #07080F 0%, #0a0e27 30%, #12052e 60%, #07080F 100%);
    background-size: 200% 200%;
    animation: circadian-drift 25s ease-in-out infinite;
}

/* Late Night (02h-05h): cool misty, subdued */
body.circadian-latenight {
    background: linear-gradient(135deg, #060810 0%, #0b1220 40%, #0a1015 70%, #060810 100%);
    background-size: 200% 200%;
    animation: circadian-drift 40s ease-in-out infinite;
}

/* Day (05h-18h): open sky — lighter blues so the app breathes during daylight */
body.circadian-day {
    background: linear-gradient(160deg, #1a3560 0%, #2a5082 35%, #1e4070 65%, #162d55 100%);
    background-size: 200% 200%;
    animation: circadian-drift 35s ease-in-out infinite;
}

/* Glass cards pick up a slightly cooler, lighter tint in day mode */
body.circadian-day .glass,
body.circadian-day .metric-card,
body.circadian-day .section-card,
body.circadian-day .modal,
body.circadian-day .notification-dropdown,
body.circadian-day .user-dropdown,
body.circadian-day .ev-event-card,
body.circadian-day .event-card-enhanced,
body.circadian-day .discovery-event-card {
    background: rgba(20, 50, 100, 0.45);
    border-color: rgba(255, 255, 255, 0.12);
}

@keyframes circadian-drift {
    0%   { background-position: 0% 0%; }
    25%  { background-position: 100% 50%; }
    50%  { background-position: 50% 100%; }
    75%  { background-position: 0% 50%; }
    100% { background-position: 0% 0%; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    body.circadian-twilight,
    body.circadian-peak,
    body.circadian-latenight,
    body.circadian-day {
        animation: none;
        background-size: 100% 100%;
    }
}

/* ---- 2.2 Pulse Animation on Live/Trending Events ---- */
@media (prefers-reduced-motion: no-preference) {
    @keyframes pulse-glow {
        0%, 100% { box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04); }
        50%      { box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04),
                               0 0 18px var(--pulse-color, rgba(191, 90, 242, 0.35)); }
    }

    @keyframes pulse-glow-subtle {
        0%, 100% { box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04); }
        50%      { box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04),
                               0 0 12px var(--pulse-color, rgba(255, 214, 10, 0.25)); }
    }

    .card-live {
        animation: pulse-glow 2s ease-in-out infinite;
        --pulse-color: rgba(191, 90, 242, 0.35);
    }

    .card-trending {
        animation: pulse-glow-subtle 3s ease-in-out infinite;
        --pulse-color: rgba(255, 214, 10, 0.25);
    }

    /* Live cards get priority over trending */
    .card-live.card-trending {
        animation: pulse-glow 2s ease-in-out infinite;
    }
}

/* Pulsing dot indicator for live events — softened so it doesn't compete with RSVP title colors */
.live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #FF2D55;
    margin-right: 6px;
    vertical-align: middle;
}

@media (prefers-reduced-motion: no-preference) {
    @keyframes dot-pulse {
        0%, 100% { opacity: 1; transform: scale(1); }
        50%      { opacity: 0.4; transform: scale(1.6); }
    }
    .live-dot {
        animation: dot-pulse 1.4s ease-in-out infinite;
    }
}

/* ---- 2.3 "Le Pulse" Score Branding ---- */
.pulse-score {
    color: #FFD60A;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(255, 214, 10, 0.4);
    font-family: var(--font-body);
    letter-spacing: 0.3px;
}

.pulse-score i {
    margin-right: 4px;
    font-size: 0.9em;
}

/* Vote ripple on RSVP buttons */
.btn-interesse,
.btn-jyvais {
    position: relative;
    overflow: hidden;
}

.vote-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 214, 10, 0.3);
    transform: scale(0);
    animation: ripple-expand 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes ripple-expand {
    0%   { transform: scale(0); opacity: 1; }
    100% { transform: scale(4); opacity: 0; }
}

/* ============================================
   PHASE 3: POLISH & PERSONALITY
   ============================================ */

/* ---- 3.2 Dynamic User Avatar Rings ---- */
.avatar-ring-explorer {
    box-shadow: 0 0 0 2px #00C7FF, 0 0 8px rgba(0, 199, 255, 0.4);
    transition: box-shadow 0.4s ease;
}

.avatar-ring-voter {
    box-shadow: 0 0 0 2px #FF9F0A, 0 0 8px rgba(255, 159, 10, 0.5);
    transition: box-shadow 0.4s ease;
}

.avatar-ring-host {
    box-shadow: 0 0 0 2px #FFD60A, 0 0 10px rgba(255, 214, 10, 0.6);
    transition: box-shadow 0.4s ease;
}

/* ---- 3.3 Countdown Border on "Starting Soon" Cards ---- */
.starting-soon {
    --countdown-pct: 100;
    position: relative;
    isolation: isolate;
}

@media (prefers-reduced-motion: no-preference) {
    .starting-soon::before {
        content: '';
        position: absolute;
        inset: -2px;
        border-radius: calc(var(--radius-md) + 2px);
        background: conic-gradient(
            #FF9F0A calc(var(--countdown-pct) * 1%),
            rgba(255, 159, 10, 0.12) calc(var(--countdown-pct) * 1%)
        );
        z-index: -1;
        animation: none;
    }
}

/* Reduced motion fallback: simple amber border */
@media (prefers-reduced-motion: reduce) {
    .starting-soon {
        border-color: #FF9F0A !important;
        box-shadow: 0 0 0 2px rgba(255, 159, 10, 0.3);
    }
}

/* ---- Pending Events Badge on Avatar ---- */
.guw-pending-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #FF9F0A;
    color: #000;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 6px rgba(255, 159, 10, 0.6);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 6px rgba(255, 159, 10, 0.6); }
    50%       { box-shadow: 0 0 12px rgba(255, 159, 10, 0.9); }
}

/* ---- Email Verification Banner ---- */
.email-verify-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(255, 159, 10, 0.15);
    border-bottom: 1px solid rgba(255, 159, 10, 0.4);
    backdrop-filter: blur(12px);
    font-size: 13px;
    color: var(--text-primary);
}

.email-verify-banner i {
    color: #FF9F0A;
    flex-shrink: 0;
}

.email-verify-banner span {
    flex: 1;
}

.verify-resend-btn {
    background: rgba(255, 159, 10, 0.2);
    border: 1px solid rgba(255, 159, 10, 0.5);
    color: #FF9F0A;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition-fast);
}

.verify-resend-btn:hover {
    background: rgba(255, 159, 10, 0.35);
}

.verify-dismiss-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

/* ============================================================
   BOTTOM NAV + EVENTS PAGE + MAP PAGE
   (merged from ev-revamp.css — 2026-04-21)
   ============================================================ */

/* ============================================================
   BOTTOM NAV — mobile only (max-width: 768px)
   Scenario A: 4 tabs + raised centre FAB
   ============================================================ */
.ev-bottom-nav {
  display: none; /* desktop: hidden */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: 64px;
  transform: translateZ(0); /* force GPU layer — prevents nav from disappearing on Android viewport resize */
  background: rgba(10, 10, 22, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (max-width: 768px) {
  .ev-bottom-nav { display: flex; }

  /* Push main content above bottom nav */
  .main-content { padding-bottom: 76px; }

  /* Map page: no extra padding (sheet handles clearance) */
  body.page-map .main-content { padding-bottom: 0; }

  /* Hide legacy topbar on hero pages — hp-hero provides search + id */
  body.page-dashboard .topbar,
  body.page-map       .topbar { display: none; }

  /* Events page: hide the hero (we use our own ctrl bar instead) */
  body.page-events #hp-hero-root { display: none !important; pointer-events: none; }
}

.ev-bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 10px;
  color: rgba(255, 255, 255, 0.38);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.18s;
  flex: 1;
  border: none;
  background: none;
  position: relative;
}
.ev-bnav-item i    { font-size: 20px; transition: transform 0.18s; }
.ev-bnav-item span { font-size: 10px; font-weight: 500; letter-spacing: 0.3px; }
.ev-bnav-item.active {
  color: var(--accent-color, #FF5C35);
}
.ev-bnav-item.active::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  height: 32px;
  background: rgba(255, 92, 53, 0.14);
  border-radius: 10px;
  z-index: 0;
}
.ev-bnav-item.active i,
.ev-bnav-item.active span { position: relative; z-index: 1; }
.ev-bnav-item.active i     { transform: scale(1.12); }

/* Centre FAB */
.ev-bnav-fab-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 4px;
}

.ev-bnav-fab {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color, #FF5C35) 0%, #FF3366 100%);
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(255, 92, 53, 0.52), 0 2px 6px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s, box-shadow 0.14s;
  margin-bottom: 14px; /* Float above nav bar */
}
.ev-bnav-fab:active {
  transform: scale(0.91);
  box-shadow: 0 3px 10px rgba(255, 92, 53, 0.38);
}

/* ============================================================
   EVENTS PAGE — content offset driven by hp-hero height
   ============================================================ */

/* Clamp the page itself — prevents any child causing viewport expansion */
#page-events {
  padding: 0 !important;   /* Override legacy styles.css 230px top padding */
  margin: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

.ev-page-content {
  /* Uses CSS var set by _measureHero(); falls back to 200px if not yet measured */
  padding-top: var(--hp-hero-full, 200px);
  padding-left: 12px;
  padding-right: 12px;
  transition: padding-top 0.25s ease;
  /* Belt-and-suspenders: prevent horizontal overflow causing mobile zoom-out */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Events page: no hero, no topbar (EV theme) → ctrl bar sits flush at top */
body.page-events .ev-page-content {
  padding-top: 0; /* JS will override on desktop via _applyHeroOffset */
  padding-left: 0;
  padding-right: 0;
}

/* ── Sticky controls bar ── */
.ev-ctrl-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 22, 0.97);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ev-ctrl-sort {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.ev-ctrl-sort::-webkit-scrollbar { display: none; }

.ev-ctrl-search-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}
.ev-ctrl-search-btn:active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* ── Inline search row (replaces sort pills when active) ── */
.ev-ctrl-search-row {
  align-items: center;
  gap: 8px;
}
.ev-ctrl-search-back {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
}
.ev-ctrl-search-input {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  padding: 7px 14px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.ev-ctrl-search-input:focus {
  border-color: var(--accent-color, #FF5C35);
}
.ev-ctrl-search-input::placeholder {
  color: rgba(255,255,255,0.35);
}

/* Distance pill: muted when Near Me is off (distance sort has no effect without location) */
#ev-sort-distance:not(.near-me-active) {
  opacity: 0.5;
}

.ev-ctrl-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.ev-ctrl-actions-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-shrink: 1;
}
.ev-ctrl-actions-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Desktop-only toolbar — hidden on mobile, shown via desktop.css @media block */
.ev-desktop-toolbar {
  display: none;
}

.ev-view-toggle {
  display: flex;
  gap: 2px;
}

/* Slim sort pills in ctrl bar */
.ev-ctrl-sort .ev-sort-pill {
  flex-shrink: 0;
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.ev-ctrl-sort .ev-sort-pill.active {
  background: var(--accent-color, #FF5C35);
  border-color: var(--accent-color, #FF5C35);
  color: #fff;
  font-weight: 600;
}

/* Slim "Près de moi" label — hide text on very small screens */
@media (max-width: 380px) {
  .ev-ctrl-near-label { display: none; }
}

/* ── Compact event row ── */
.ev-compact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px 11px 15px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
  overflow: hidden;
}
.ev-compact-row:hover  {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}
.ev-compact-row:active { background: rgba(255, 255, 255, 0.10); }

.ev-compact-thumb {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  flex-shrink: 0;
  object-fit: cover;
}
.ev-compact-dot {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0.85;
}

.ev-compact-body {
  flex: 1;
  min-width: 0;
}
.ev-compact-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.92);
}
.ev-compact-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev-compact-right {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.ev-compact-time {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
}
.ev-compact-stats {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  gap: 6px;
}
.ev-compact-stats .going  { color: #30D158; }
.ev-compact-stats .inter  { color: var(--accent-color, #FF5C35); }
.ev-compact-stats .here   { color: #BF5AF2; }

/* Left accent bar — colored by category */
.ev-compact-badge {
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
}

/* ── Time-of-day group header ── */
.ev-timegroup { margin-bottom: 4px; }
.ev-timegroup-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 4px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}
.ev-timegroup-header span:first-child { font-size: 14px; }

/* ── Date pills as week selector ── */
.ev-date-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 12px;
  scrollbar-width: none;
}
.ev-date-pills::-webkit-scrollbar { display: none; }
.ev-date-pill {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.ev-date-pill.active {
  background: var(--accent-color, #FF5C35);
  border-color: var(--accent-color, #FF5C35);
  color: #fff;
  font-weight: 700;
}

/* All block children of the content area stay inside their column */
.ev-page-content *,
.ev-page-content *::before,
.ev-page-content *::after {
  box-sizing: border-box;
  max-width: 100%;
}

/* Scrollable rows are exempt from max-width (they scroll internally) */
.ev-date-pills,
.ev-sort-row {
  max-width: none;
}

/* Filter count badge on filter button */
.ev-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--accent-color, #FF5C35);
  color: #fff;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  margin-left: 4px;
}

/* ============================================================
   GLOBAL SEARCH DROPDOWN (.global-search-dropdown / .gsd-*)
   ============================================================ */

.global-search-dropdown {
    background: var(--background-card, #12141f);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.3);
    overflow: hidden;
    max-height: 70vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}
.global-search-dropdown::-webkit-scrollbar { display: none; }

.gsd-section-label {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.gsd-section-label i { font-size: 10px; }

.gsd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background var(--transition-fast, 150ms ease);
}
.gsd-item:active,
.gsd-item:hover { background: var(--background-secondary); }

.gsd-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.gsd-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--background-secondary);
    color: var(--text-primary);
    background-size: cover;
    background-position: center;
}

.gsd-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gsd-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gsd-sub {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gsd-badge {
    background: var(--primary-color, #FF5C35);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    flex-shrink: 0;
    white-space: nowrap;
}

.gsd-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color, #FF5C35);
    border-top: 1px solid var(--border-color);
    cursor: pointer;
    transition: background var(--transition-fast, 150ms ease);
}
.gsd-footer:hover { background: var(--background-secondary); }

.gsd-empty {
    padding: 18px 14px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Inline search result sections (within events-list container) ── */
.ev-search-section { margin-bottom: 4px; }
.ev-search-voir-plus {
  width: 100%;
  text-align: center;
  padding: 10px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-color, #FF5C35);
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.3px;
}
.ev-search-voir-plus:hover { text-decoration: underline; }

/* ============================================================
   MAP PAGE — Full-screen Google Maps DNA
   ============================================================ */
#page-map {
  padding: 0 !important;
  margin: 0;
  overflow: hidden;
}

.ev-map-fullscreen {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* Height + marginTop set by map.js init() */
}

/* Leaflet map fills the container */
.ev-map-fullscreen #event-map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ── Floating top bar ── */
.ev-map-topbar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 500;
  display: flex;
  gap: 8px;
  align-items: center;
}

.ev-map-search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 10, 22, 0.88);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  padding: 11px 14px;
  color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.ev-map-search-wrap i { font-size: 13px; flex-shrink: 0; }

.ev-map-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
}
.ev-map-search-input::placeholder { color: rgba(255,255,255,0.38); }

.ev-map-filter-fab {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(10, 10, 22, 0.88);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.ev-map-filter-fab.has-filter {
  background: var(--accent-color, #FF5C35);
  border-color: var(--accent-color, #FF5C35);
}

.ev-map-filter-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 17px;
  height: 17px;
  background: #ff3b30;
  color: #fff;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(10, 10, 22, 0.9);
}

/* ── Segment pills floating over map ── */
.ev-map-segments {
  position: absolute;
  top: 70px;
  left: 12px;
  right: 12px;
  z-index: 500;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ev-map-segments::-webkit-scrollbar { display: none; }

.ev-map-seg {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 15px;
  background: rgba(10, 10, 22, 0.84);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,0.28);
}
.ev-map-seg.active {
  background: var(--accent-color, #FF5C35);
  border-color: var(--accent-color, #FF5C35);
  color: #fff;
  box-shadow: 0 3px 14px rgba(255, 92, 53, 0.42);
}

/* Pulsing live dot */
.ev-map-live-dot {
  width: 7px;
  height: 7px;
  background: #ff3b30;
  border-radius: 50%;
  flex-shrink: 0;
  animation: ev-live-pulse 1.2s ease-in-out infinite;
}
@keyframes ev-live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.48; transform: scale(0.72); }
}

/* ── Hero hidden on map page (Pin Theatre — full-bleed map) ── */
body.page-map #hp-hero-root { display: none !important; pointer-events: none; }

/* ── Near-me FAB ── */
.ev-map-near-fab {
  position: absolute;
  bottom: 80px;
  right: 14px;
  z-index: 500;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(10, 10, 22, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, bottom 0.28s cubic-bezier(0.34, 1.26, 0.64, 1);
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.ev-map-near-fab.active {
  background: var(--accent-color, #FF5C35);
  border-color: var(--accent-color, #FF5C35);
  color: #fff;
}
/* Bump near-me FAB up when pin card is open */
.ev-map-fullscreen.ev-map-card-open .ev-map-near-fab { bottom: 160px; }

/* ── Pin Theatre: single event card ── */
.ev-map-pin-card {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 600;
  height: 120px;
  background: rgba(10, 10, 22, 0.97);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  padding: 0 16px;
  cursor: pointer;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.34, 1.26, 0.64, 1);
}
.ev-map-pin-card.open { transform: translateY(0); }
.ev-map-pin-card:active { background: rgba(20, 20, 38, 0.99); }

/* Close button */
.ev-map-pin-card-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  flex-shrink: 0;
}
.ev-map-pin-card-close:hover { background: rgba(255, 255, 255, 0.18); }

/* Card inner layout */
.ev-map-pin-card-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding-right: 32px;
  pointer-events: none;
}
.ev-map-pin-card-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.ev-map-pin-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.ev-map-pin-card-body {
  flex: 1;
  min-width: 0;
}
.ev-map-pin-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}
.ev-map-pin-card-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.ev-map-pin-card-meta i { font-size: 10px; }
.ev-map-pin-card-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #ff3b30;
}
.ev-map-pin-card-fox {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-color, #FF5C35);
}
.ev-map-pin-card-chevron {
  color: rgba(255, 255, 255, 0.25);
  font-size: 14px;
  flex-shrink: 0;
}

/* Desktop: centered card, max width */
@media (min-width: 769px) {
  .ev-map-pin-card {
    left: 50%;
    right: auto;
    width: 420px;
    transform: translateX(-50%) translateY(100%);
    border-radius: 20px 20px 0 0;
  }
  .ev-map-pin-card.open { transform: translateX(-50%) translateY(0); }
  .ev-map-near-fab { bottom: 80px; }
}

/* ── Custom map markers ── */
.ev-map-marker-wrap { background: none !important; border: none !important; }

.ev-map-marker {
  width: var(--m-size, 36px) !important;
  height: var(--m-size, 36px) !important;
  min-width: var(--m-size, 36px);
  min-height: var(--m-size, 36px);
  max-width: var(--m-size, 36px);
  max-height: var(--m-size, 36px);
  border-radius: 50%;
  background: var(--m-color, #FF5C35);
  border: 3px solid rgba(255,255,255,0.9);
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.ev-map-marker.ev-marker-selected {
  transform: scale(1.25);
  box-shadow: 0 0 0 3px var(--m-color, #FF5C35), 0 4px 16px rgba(0,0,0,0.4);
  z-index: 1000;
}
.ev-map-marker.ev-marker-dim { opacity: 0.35; }

/* Live / Fox pulse on marker */
.ev-map-marker.ev-marker-live {
  animation: ev-marker-pulse 1.8s ease-in-out infinite;
}
@keyframes ev-marker-pulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(0,0,0,0.35), 0 0 0 0 var(--m-color, #FF5C35); }
  50%       { box-shadow: 0 2px 10px rgba(0,0,0,0.35), 0 0 0 8px transparent; }
}

.ev-marker-count { pointer-events: none; }

/* RSVP badge — small pill anchored bottom-right of the marker circle */
.ev-map-marker { position: relative; }
.ev-marker-rsvp {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  border: 2px solid #fff;
  pointer-events: none;
  z-index: 10;
}
.ev-marker-rsvp--interested { background: #FFB800; color: #fff; }
.ev-marker-rsvp--going      { background: #22C55E; color: #fff; }
.ev-marker-rsvp--there      { background: #3B82F6; color: #fff; }

/* ── Custom cluster ── */
.ev-map-cluster-wrap { background: none !important; border: none !important; }

.ev-map-cluster {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px;
  min-height: 44px;
  max-width: 44px;
  max-height: 44px;
  border-radius: 50%;
  background: var(--m-color, #FF5C35);
  border: 3px solid rgba(255,255,255,0.9);
  box-shadow: 0 3px 14px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  cursor: pointer;
}

/* ── hp-mobile-nav (legacy) — force hidden globally ── */
#hp-mobile-nav { display: none !important; }

/* ═══════════════════════════════════════════════════════════
   HERO SEGMENT PILLS — Urgency/time strip (dashboard + events)
   ═══════════════════════════════════════════════════════════ */
.hp-hero-segs {
  display: flex;
  gap: 8px;
  padding: 0;
  margin-top: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hp-hero-segs::-webkit-scrollbar { display: none; }

/* Hide on map page — map has its own segment pills */
body.page-map .hp-hero-segs { display: none; }

.hp-hero-seg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.hp-hero-seg:active { transform: scale(0.95); }

.hp-hero-seg.active {
  background: #FF5C35;
  border-color: #FF5C35;
  color: #fff;
}

/* Live pill — pulsing red dot (keeps red accent when active) */
.hp-hero-seg--live.active {
  background: rgba(255,59,48,0.22);
  border-color: rgba(255,59,48,0.65);
  color: #ff3b30;
}
.hp-hero-seg-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3b30;
  flex-shrink: 0;
  animation: hp-seg-pulse 1.4s ease infinite;
}
@keyframes hp-seg-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

/* Compact hero — shrink pill row slightly */
.hp-hero--compact .hp-hero-segs {
  margin-top: 6px;
}
.hp-hero--compact .hp-hero-seg {
  padding: 4px 10px;
  font-size: 12px;
}

/* ============================================================
   CE SOIR FAB — pulsing gold orb (centre tab)
   ============================================================ */
.ev-bnav-fab-wrap { position: relative; }

.ev-bnav-cesoir {
  position: relative;
  width: 54px;
  height: 54px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  margin-top: -16px;
  padding: 0;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
}

/* Fox button image */
.ev-bnav-fox-img {
  width: 72px;
  height: 72px;
  min-width: 72px;
  object-fit: contain;
  border-radius: 50%;
  animation: ev-fox-pulse 2.4s ease-in-out infinite;
  filter: drop-shadow(0 4px 14px rgba(255, 111, 0, 0.55));
  display: block;
}

@keyframes ev-fox-pulse {
  0%, 100% { transform: scale(1);    filter: drop-shadow(0 4px 14px rgba(255, 111, 0, 0.55)); }
  50%       { transform: scale(1.1); filter: drop-shadow(0 6px 22px rgba(255, 111, 0, 0.85)); }
}

.ev-bnav-cesoir:active .ev-bnav-fox-img { transform: scale(0.92); animation: none; }

/* ============================================================
   3D DICE — Surprends-moi tab
   ============================================================ */
.ev-dice-wrap {
  width: 22px;
  height: 22px;
  perspective: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ev-dice {
  width: 20px;
  height: 20px;
  position: relative;
  transform-style: preserve-3d;
  animation: ev-dice-idle 6s ease-in-out infinite;
}

.ev-dice-face {
  position: absolute;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  color: #111;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.ev-dice-front  { transform: rotateY(0deg)    translateZ(10px); }
.ev-dice-back   { transform: rotateY(180deg)  translateZ(10px); }
.ev-dice-right  { transform: rotateY(90deg)   translateZ(10px); }
.ev-dice-left   { transform: rotateY(-90deg)  translateZ(10px); }
.ev-dice-top    { transform: rotateX(90deg)   translateZ(10px); }
.ev-dice-bottom { transform: rotateX(-90deg)  translateZ(10px); }

@keyframes ev-dice-idle {
  0%   { transform: rotateX(0deg)   rotateY(0deg); }
  20%  { transform: rotateX(-18deg) rotateY(28deg); }
  40%  { transform: rotateX(-90deg) rotateY(90deg); }
  60%  { transform: rotateX(12deg)  rotateY(185deg); }
  80%  { transform: rotateX(90deg)  rotateY(270deg); }
  100% { transform: rotateX(0deg)   rotateY(360deg); }
}

.ev-bnav-item:active .ev-dice {
  animation: ev-dice-tap 0.42s ease-in-out forwards;
}

@keyframes ev-dice-tap {
  0%   { transform: rotateX(0deg)    rotateY(0deg); }
  50%  { transform: rotateX(-180deg) rotateY(270deg); }
  100% { transform: rotateX(-360deg) rotateY(540deg); }
}

/* Lottie dice icon */
.ev-dice-lottie {
  width: 30px;
  height: 30px;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.35));
}

/* ============================================================
   CE SOIR MODAL — story carousel
   ============================================================ */
.ev-cesoir-overlay {
  display: none;
  position: fixed;
  inset: 0;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1100;
}
.ev-cesoir-overlay.active { display: flex; }

.ev-cesoir-modal {
  width: 100%;
  max-width: 440px;
  height: 88vh;
  background: #0a0a16;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Progress bars */
.ev-cesoir-progress {
  display: flex;
  gap: 4px;
  padding: 10px 12px 0;
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
}

.ev-cs-prog-bar {
  height: 2px;
  flex: 1;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  overflow: hidden;
}

.ev-cs-prog-fill {
  height: 100%;
  background: #fff;
  width: 0%;
  border-radius: 2px;
}

.ev-cs-prog-fill--done   { width: 100%; }
.ev-cs-prog-fill--active { animation: ev-cs-prog 5s linear forwards; }

@keyframes ev-cs-prog {
  from { width: 0%; }
  to   { width: 100%; }
}

/* Header */
.ev-cesoir-header {
  position: absolute;
  top: 20px; left: 12px; right: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ev-cesoir-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  flex: 1;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.ev-cesoir-freeze,
.ev-cesoir-close {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.18s;
  flex-shrink: 0;
}
.ev-cesoir-freeze:active,
.ev-cesoir-close:active { background: rgba(255, 255, 255, 0.28); }

/* Carousel */
.ev-cesoir-carousel-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.ev-cesoir-carousel {
  display: flex;
  height: 100%;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Card */
.ev-cs-card {
  min-width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.ev-cs-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ev-cs-card-no-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  color: rgba(255,255,255,0.2);
}

.ev-cs-card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 60px 20px 28px;
  background: linear-gradient(to top,
    rgba(0,0,0,0.90) 0%,
    rgba(0,0,0,0.55) 50%,
    transparent 100%);
}

.ev-cs-card-rank {
  font-size: 10px;
  font-weight: 800;
  color: #FFB300;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.ev-cs-card-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.ev-cs-card-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.72);
  margin-bottom: 10px;
}

.ev-cs-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ev-cs-card-here {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #BF5AF2;
  background: rgba(191, 90, 242, 0.18);
  padding: 3px 8px;
  border-radius: 10px;
}
.ev-cs-card-here i { font-size: 7px; }

.ev-cs-card-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  padding: 3px 8px;
  border-radius: 10px;
}

/* Arrows */
.ev-cesoir-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.18s;
}
.ev-cesoir-arrow:active     { background: rgba(255,255,255,0.28); }
.ev-cesoir-arrow--left      { left: 10px; }
.ev-cesoir-arrow--right     { right: 10px; }
.ev-cesoir-arrow[disabled]  { opacity: 0.25; pointer-events: none; }

/* Dots */
.ev-cesoir-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 10px 12px 18px;
  flex-shrink: 0;
}

.ev-cs-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.ev-cs-dot.active {
  background: #FFB300;
  transform: scale(1.3);
}

/* "Autre événement" button in event modal (surprise mode) */
.ev-surprends-autre {
  background: rgba(255, 160, 0, 0.1) !important;
  border: 1px solid rgba(255, 160, 0, 0.4) !important;
  color: #FFB300 !important;
}
.ev-surprends-autre:hover {
  background: rgba(255, 160, 0, 0.2) !important;
}

/* ============================================================
   CE SOIR MODAL — Surprends-moi footer chip
   ============================================================ */
.ev-cesoir-footer {
  display: flex;
  justify-content: center;
  padding: 0 16px 20px;
  flex-shrink: 0;
}

.ev-cesoir-surprends-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 179, 0, 0.12);
  border: 1px solid rgba(255, 179, 0, 0.35);
  border-radius: 24px;
  padding: 8px 20px;
  color: #FFB300;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, transform 0.15s;
  letter-spacing: 0.2px;
}
.ev-cesoir-surprends-chip:active {
  background: rgba(255, 179, 0, 0.24);
  transform: scale(0.97);
}
.ev-cesoir-dice-lottie {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ============================================================
   STANDALONE LANGUAGE PILL — fixed top-right, always visible
   ============================================================ */
.ev-lang-pill {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1150;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.75);
  padding: 5px 12px;
  border-radius: 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ev-lang-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.32);
}
/* Map page has its own topbar occupying top-right — hide pill there (hub has lang toggle) */
body.page-map .ev-lang-pill { display: none; }

/* ============================================================
   PROFILE TAB — 5th bottom-nav slot
   ============================================================ */
.ev-bnav-profile {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
}

/* Silhouette icon (logged-out) */
.ev-hub-anon-icon {
  font-size: 22px;
  color: rgba(255, 255, 255, 0.55);
  display: block;
  transition: color 0.2s;
}
.ev-bnav-profile:hover .ev-hub-anon-icon { color: rgba(255,255,255,0.85); }

/* Avatar bubble (logged-in) */
.ev-hub-tab-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.2);
  margin: 0 auto;
}

/* New-content pulse dot */
.ev-hub-tab-dot {
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color, #FF5C35);
  border: 2px solid var(--background-color, #07080F);
  animation: ev-hub-pulse 2s ease-in-out infinite;
}

@keyframes ev-hub-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,92,53,0.6); }
  50%       { transform: scale(1.15); box-shadow: 0 0 0 5px rgba(255,92,53,0); }
}

/* ── WHAT'S NEW: pulse boost when has-new ───────────────── */
#ev-bnav-profile.has-new .ev-hub-tab-dot {
  animation: ev-wnp-ring 1.4s ease-out infinite;
}
@keyframes ev-wnp-ring {
  0%   { transform: scale(1);   box-shadow: 0 0 0 0   rgba(255, 59, 48, 0.8); }
  60%  { transform: scale(1.2); box-shadow: 0 0 0 6px rgba(255, 59, 48, 0);   }
  100% { transform: scale(1);   box-shadow: 0 0 0 0   rgba(255, 59, 48, 0);   }
}

/* ── ADMIN pending moderation dot ──────────────────────── */
.ev-admin-pending-dot {
  right: calc(50% - 26px);
  background: #ef4444;
  animation: ev-admin-pending-ring 1.4s ease-out infinite;
}
@keyframes ev-admin-pending-ring {
  0%   { transform: scale(1);   box-shadow: 0 0 0 0   rgba(239, 68, 68, 0.8); }
  60%  { transform: scale(1.2); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);   }
  100% { transform: scale(1);   box-shadow: 0 0 0 0   rgba(239, 68, 68, 0);   }
}

/* ── WHAT'S NEW: popover card ───────────────────────────── */
.ev-whats-new-popover {
  position: fixed;
  bottom: calc(64px + 10px);
  right: 12px;
  background: rgba(28, 28, 36, 0.97);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 14px 16px;
  min-width: 200px;
  max-width: 280px;
  z-index: 901;
  cursor: pointer;
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}
.ev-whats-new-popover.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.ev-wnp-headline {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 5px;
}
.ev-wnp-breakdown {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.6;
}

/* ============================================================
   PROFILE HUB PANEL
   ============================================================ */
/* Minimal anchor — NO full-screen inset so iOS Safari fixed children work */
.ev-hub {
  position: fixed;
  bottom: 64px;
  right: 0;
  z-index: 1099;
  pointer-events: none;
}

/* Backdrop lives independently at full-screen — only inserted when open */
.ev-hub-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1098;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
body.hub-open .ev-hub-backdrop {
  opacity: 1;
  pointer-events: all;
}

/* Panel — slides up from bottom-right */
.ev-hub-panel {
  position: relative;
  width: min(360px, 100vw);
  max-height: calc(100svh - 100px);
  overflow-y: auto;
  background: #12131f;
  border-radius: 20px 20px 0 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom: none;
  overscroll-behavior: contain;
  opacity: 0;
  transform: translateY(24px);
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.34, 1.3, 0.64, 1), visibility 0s linear 0.26s;
  pointer-events: none;
}
.ev-hub.open .ev-hub-panel {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.34, 1.3, 0.64, 1), visibility 0s linear 0s;
  pointer-events: all;
}

/* ── Header (avatar + name + settings CTA) ── */
.ev-hub-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 20px 20px 0 0;
}
.ev-hub-header:hover { background: rgba(255,255,255,0.04); }

.ev-hub-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.12);
}

.ev-hub-info { flex: 1; min-width: 0; }
.ev-hub-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-hub-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
}

.ev-hub-arrow {
  font-size: 13px;
  color: rgba(255,255,255,0.3);
  flex-shrink: 0;
}

/* ── Divider ── */
.ev-hub-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 0 16px;
}

/* ── Section header (notifications) ── */
.ev-hub-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 6px;
}
.ev-hub-section-header span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(255,255,255,0.4);
}
.ev-hub-notif-clear {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  padding: 2px 0;
  transition: color 0.15s;
}
.ev-hub-notif-clear:hover { color: rgba(255,255,255,0.65); text-decoration: underline; }

/* ── Notification list ── */
.ev-hub-notif-list {
  padding: 4px 0;
  max-height: 280px;
  overflow-y: auto;
}
.ev-hub-notif-list .notif-item {
  cursor: pointer;
  padding: 10px 16px;
  transition: background 0.15s;
}
.ev-hub-notif-list .notif-item:hover { background: rgba(255,255,255,0.04); }
.ev-hub-notif-list .notif-empty {
  padding: 20px 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  text-align: center;
}

/* ── Generic item (admin link, logout) ── */
.ev-hub-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.ev-hub-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.ev-hub-item i { font-size: 15px; width: 18px; text-align: center; color: rgba(255,255,255,0.45); }
.ev-hub-item-danger { color: #FF453A; }
.ev-hub-item-danger i { color: #FF453A; }
.ev-hub-item-danger:hover { background: rgba(255,69,58,0.08); }

/* ── Terms link ── */
.ev-hub-terms-link {
  display: block;
  text-align: center;
  padding: 12px 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  transition: color 0.15s;
}
.ev-hub-terms-link:hover { color: rgba(255,255,255,0.6); }

/* ── Admin badge ── */
.ev-hub-badge {
  margin-left: auto;
  background: #FF9F0A;
  color: #000;
  font-size: 10px;
  font-weight: 800;
  border-radius: 10px;
  padding: 2px 7px;
  line-height: 1.4;
}

/* ── Logged-out login button ── */
.ev-hub-auth-section {
  padding: 24px 16px;
}
.ev-hub-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.ev-hub-login-btn:hover {
  background: #ff7355;
  transform: translateY(-1px);
}
.ev-hub-login-btn i { font-size: 15px; }

/* ── Hub logged-out nudge ── */
.ev-hub-loggedout-nudge {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}

/* ── Hub see-all button ── */
.ev-hub-see-all {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}

/* ── Hub RSVP rows ── */
.ev-hub-rsvp-list {
  padding: 4px 0 8px;
}
.ev-hub-rsvp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.ev-hub-rsvp-row:hover { background: rgba(255,255,255,0.05); }
.ev-hub-rsvp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ev-hub-rsvp-dot.jy_vais    { background: #30d158; }
.ev-hub-rsvp-dot.interesse  { background: #ff9f0a; }
.ev-hub-rsvp-info {
  flex: 1;
  min-width: 0;
}
.ev-hub-rsvp-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-hub-rsvp-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-top: 1px;
}
.ev-hub-rsvp-empty {
  padding: 10px 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

/* ── Mes RSVPs chip (events ctrl bar) ── */
.ev-myrsvps-chip { display: none; }
.ev-myrsvps-chip.auth-visible { display: flex; }
.ev-myrsvps-chip.active {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.5);
  color: #a5b4fc;
}

/* ── Invite friends modal ── */
.ev-invite-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 1100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.ev-invite-modal {
  background: #1c1c24;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ev-invite-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ev-invite-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.ev-invite-modal-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}
.ev-invite-follower-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px 0;
}
.ev-invite-follower-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.ev-invite-follower-row:hover { background: rgba(255,255,255,0.05); }
.ev-invite-follower-row.selected { background: rgba(99,102,241,0.15); }
.ev-invite-follower-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  object-fit: cover;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ev-invite-follower-info { flex: 1; min-width: 0; }
.ev-invite-follower-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.ev-invite-follower-status {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-top: 1px;
}
.ev-invite-follower-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.ev-invite-follower-row.selected .ev-invite-follower-check {
  background: #6366f1;
  border-color: #6366f1;
}
.ev-invite-modal-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.ev-invite-send-btn {
  width: 100%;
  padding: 13px;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.ev-invite-send-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ============================================================
   VIBE PREFERENCES (settings page)
   ============================================================ */
.vibe-prefs-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vibe-cat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--background-secondary, rgba(255,255,255,0.04));
  border-radius: 10px;
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
}
.vibe-cat-dot {
  font-size: 18px;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}
.vibe-cat-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}
.vibe-level-btns {
  display: flex;
  gap: 4px;
}
.vibe-level-btn {
  background: none;
  border: 1px solid var(--border-color, rgba(255,255,255,0.12));
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  opacity: 0.45;
}
.vibe-level-btn:hover { opacity: 0.75; transform: scale(1.1); }
.vibe-level-btn.active {
  opacity: 1;
  border-color: var(--primary-color, #6366f1);
  background: rgba(99,102,241,0.12);
  transform: scale(1.12);
}


/* =========================================================
   TOOLS PAGE
   ========================================================= */
body.page-tools #hp-hero-root { display: none !important; pointer-events: none; }
body.page-tools .ev-page-content { padding-top: 0 !important; }

/* =========================================================
   CREATE EVENT PAGE — Native App Style
   ========================================================= */

/* Hide hero + topbar; reset main-content offset */
body.page-create-event #hp-hero-root    { display: none !important; pointer-events: none; }
body.page-create-event .topbar          { display: none !important; }
body.page-create-event .main-content    { margin-top: 0; padding: 0; }

/* Native app nav bar (replaces topbar on this page) */
.ev-create-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    align-items: center;
    padding: 0 8px;
    background: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 200;
}
body.page-create-event .ev-create-nav { display: flex; }

.ev-create-nav-back {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--accent-color);
    font-size: 18px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.ev-create-nav-back:hover { background: rgba(255,255,255,0.06); }

.ev-create-nav-title {
    flex: 1;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    font-family: var(--font-display);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.ev-create-nav-spacer { width: 44px; flex-shrink: 0; }

@media (max-width: 768px) {
    .ev-create-nav { left: 0; }
}

/* Page: offset by nav bar height */
body.page-create-event #page-create-event {
    padding-top: var(--topbar-height);
    padding-bottom: 80px;
}

/* Cover image hero (full-bleed, top of form) */
.ev-create-cover-hero {
    width: 100%;
    height: 160px;
    position: relative;
    cursor: pointer;
    background: var(--background-card);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ev-create-cover-hero:hover { background: var(--background-card); }

.ev-create-cover-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    pointer-events: none;
}
.ev-create-cover-placeholder i {
    font-size: 36px;
    color: var(--text-muted);
}
.ev-create-cover-placeholder span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}
.ev-create-cover-hint {
    font-size: 12px !important;
    color: var(--text-muted) !important;
    font-weight: 400 !important;
}

/* Preview fills the hero */
.ev-create-cover-hero .cover-upload-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: unset;
}
.ev-create-cover-hero #cover-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Edit photo button overlay */
.ev-create-cover-edit-btn {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    backdrop-filter: blur(6px);
}

/* Form body (the scrollable sections) */
.ev-create-form-body {
    padding: 0 16px;
}
.ev-create-form-body .form-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}
.ev-create-form-body .form-section:last-child {
    border-bottom: none;
}
.ev-create-form-body .private-event-toggle {
    padding: 20px 0;
}

/* Sticky submit bar */
.ev-create-submit-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: var(--background-color);
    border-top: 1px solid var(--border-color);
    z-index: 200;
}
body.page-create-event .ev-create-submit-bar { display: flex; }

.ev-create-submit-btn {
    flex: 1;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-md);
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .ev-create-submit-bar { left: 0; }
}

/* ============================================================
   SEARCH PAGE — Ephemeral full-screen search (.sp-*)
   ============================================================ */

/* Full-screen overlay (the modal itself) */
.sp-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
    background: var(--background-color);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 200ms ease, visibility 200ms ease, transform 200ms ease;
}
.sp-overlay.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Shell: full height flex column */
.sp-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ---- Topbar ---- */
.sp-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(7, 8, 15, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

@supports not (backdrop-filter: blur(16px)) {
    .sp-topbar { background: var(--background-color); }
}

.sp-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.sp-back:hover { background: var(--border-color); color: var(--text-primary); }

.sp-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0 12px;
    height: 44px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.sp-input-wrap:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 92, 53, 0.12);
}

.sp-input-icon {
    color: var(--text-muted);
    font-size: 14px;
    flex-shrink: 0;
}

.sp-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 16px; /* 16px prevents iOS zoom */
    font-family: var(--font-body);
    min-width: 0;
}
.sp-input::placeholder { color: var(--text-muted); }

.sp-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: color var(--transition-fast);
}
.sp-clear:hover { color: var(--text-secondary); }

/* ---- Tabs ---- */
.sp-tabs {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-color);
}
.sp-tabs::-webkit-scrollbar { display: none; }

.sp-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-body);
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    flex-shrink: 0;
}
.sp-tab:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
}
.sp-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.sp-tab-count {
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}
.sp-tab.active .sp-tab-count { background: rgba(255,255,255,0.3); }

/* ---- Body (scrollable results area) ---- */
.sp-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sp-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ---- Sections ---- */
.sp-section { display: flex; flex-direction: column; gap: 8px; }
.sp-section[hidden] { display: none !important; }

.sp-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0 4px;
    margin: 0;
}
.sp-section-title i { font-size: 11px; }
.sp-section-count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--background-secondary);
    border-radius: 8px;
    padding: 1px 7px;
    text-transform: none;
    letter-spacing: 0;
}

/* ---- Cards ---- */
@keyframes sp-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sp-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--background-card);
    border-radius: 14px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
    animation: sp-fade-in 0.2s ease both;
    position: relative;
    overflow: hidden;
}
.sp-card:active { background: var(--background-secondary); }

/* Left accent stripe for event cards */
.sp-card-event::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--cat-color, var(--primary-color));
    border-radius: 14px 0 0 14px;
}

/* Icon square */
.sp-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

/* Avatar circle */
.sp-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
    background: var(--background-secondary);
    color: var(--text-primary);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

/* Card body text */
.sp-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sp-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-card-meta {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sp-card-meta .dot { margin: 0 4px; opacity: 0.5; }

/* Badge (following, event count) */
.sp-badge {
    background: var(--primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}
.sp-badge-muted {
    background: var(--background-secondary);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.sp-chevron {
    color: var(--text-muted);
    font-size: 12px;
    flex-shrink: 0;
}

/* ---- Skeleton ---- */
@keyframes sp-shimmer {
    0%   { background-position: -300px 0; }
    100% { background-position: 300px 0; }
}

.sp-skeleton {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--background-card);
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

.sp-skel-block {
    border-radius: 10px;
    background: linear-gradient(90deg, var(--background-secondary) 25%, var(--border-color) 50%, var(--background-secondary) 75%);
    background-size: 600px 100%;
    animation: sp-shimmer 1.4s infinite linear;
    flex-shrink: 0;
}

.sp-skel-icon { width: 44px; height: 44px; border-radius: 10px; }
.sp-skel-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.sp-skel-line { height: 12px; border-radius: 6px; }
.sp-skel-line-long  { width: 65%; }
.sp-skel-line-short { width: 40%; }

/* ---- Empty / No-results state ---- */
.sp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    gap: 12px;
    color: var(--text-muted);
}
.sp-empty-icon {
    font-size: 48px;
    opacity: 0.2;
    margin-bottom: 4px;
}
.sp-empty-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-secondary);
}
.sp-empty-hint {
    font-size: 14px;
    color: var(--text-muted);
}

/* ---- Tab filtering (CSS-only, no re-fetch) ---- */
.sp-body.tab-events .sp-section[data-section="venues"],
.sp-body.tab-events .sp-section[data-section="people"]  { display: none !important; }

.sp-body.tab-venues .sp-section[data-section="events"],
.sp-body.tab-venues .sp-section[data-section="people"]  { display: none !important; }

.sp-body.tab-people .sp-section[data-section="events"],
.sp-body.tab-people .sp-section[data-section="venues"]  { display: none !important; }

/* ============================================================
   TOOLS PAGE — Event Description Generator
   ============================================================ */
.ev-tools-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

.ev-tools-header {
  text-align: center;
  margin-bottom: 32px;
}

.ev-tools-badge {
  display: inline-block;
  background: rgba(255, 92, 53, 0.15);
  color: var(--accent-color, #FF5C35);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.ev-tools-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text-primary);
  line-height: 1.25;
}

.ev-tools-subtitle {
  font-size: 15px;
  color: rgba(255,255,255,0.72);
  line-height: 1.6;
  margin: 0;
}

/* ---- Card ---- */
.ev-tools-card {
  background: var(--card-background, #1E2D4A);
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.ev-tools-card--done {
  padding: 0;
  overflow: hidden;
}

.ev-tools-card-done-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.ev-tools-edit-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--accent-color);
  font-size: 13px;
  padding: 4px 12px;
  cursor: pointer;
}

/* ---- Form ---- */
.ev-tools-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ev-tools-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 540px) {
  .ev-tools-row { grid-template-columns: 1fr; }
}

.ev-tools-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ev-tools-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.ev-tools-required {
  color: var(--accent-color);
}

.ev-tools-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.ev-tools-input {
  background: var(--input-background, rgba(255,255,255,0.06));
  border: 1px solid var(--border-color, rgba(255,255,255,0.12));
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  padding: 10px 14px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.ev-tools-input:focus {
  outline: none;
  border-color: var(--accent-color, #FF5C35);
}

.ev-tools-select {
  appearance: none;
  cursor: pointer;
  background-color: #1a2840;
  color: #fff;
  color-scheme: dark;
}

.ev-tools-select option {
  background-color: #1a2840;
  color: #fff;
}

/* ---- Radio group ---- */
.ev-tools-radio-group {
  display: flex;
  gap: 16px;
}

.ev-tools-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
}

.ev-tools-radio input[type="radio"] {
  accent-color: var(--accent-color);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ---- Price range ---- */
.ev-tools-price-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ev-tools-price-sep {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ---- Generate button ---- */
.ev-tools-generate-btn {
  background: var(--accent-color, #FF5C35);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.15s, transform 0.1s;
  width: 100%;
}

.ev-tools-generate-btn:hover  { opacity: 0.9; }
.ev-tools-generate-btn:active { transform: scale(0.98); }
.ev-tools-generate-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Email gate ---- */
.ev-tools-gate-card {
  text-align: center;
}

.ev-tools-gate-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.ev-tools-gate-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}

.ev-tools-gate-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.72);
  margin: 0 0 20px;
}

.ev-tools-gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto 12px;
}

.ev-tools-gate-email {
  text-align: center;
}

.ev-tools-gate-privacy {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin: 0 0 20px;
}

/* ---- Optional email copy section (on result page) ---- */
.ev-tools-email-section {
  background: var(--card-background, #1E2D4A);
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  border-radius: 16px;
  padding: 20px 24px;
  text-align: center;
}

.ev-tools-email-label {
  font-size: 14px;
  color: rgba(255,255,255,0.72);
  margin: 0 0 12px;
}

.ev-tools-email-sent {
  font-size: 14px;
  color: #4ade80;
  margin: 0;
}

.ev-tools-result-preview {
  position: relative;
  height: 80px;
  overflow: hidden;
  border-radius: 8px;
  margin-top: 8px;
}

.ev-tools-blur-block {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 92, 53, 0.12) 0%,
    rgba(191, 90, 242, 0.08) 100%
  );
  backdrop-filter: blur(6px);
  border-radius: 8px;
}

/* ---- Results ---- */
.ev-tools-results {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ev-tools-results-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  text-align: center;
}

.ev-tools-desc-card {
  background: var(--card-background, #1E2D4A);
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  border-radius: 16px;
  overflow: hidden;
}

.ev-tools-desc-lang {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.08));
}

.ev-tools-lang-badge {
  font-size: 13px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.ev-tools-lang-fr {
  background: rgba(0, 82, 212, 0.18);
  color: #60a5fa;
}

.ev-tools-lang-en {
  background: rgba(220, 38, 38, 0.15);
  color: #f87171;
}

.ev-tools-copy-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  padding: 4px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s;
}

.ev-tools-copy-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.ev-tools-desc-text {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  padding: 16px;
  margin: 0;
  word-break: break-word;
}

/* ---- CTA section ---- */
.ev-tools-cta-section {
  background: var(--card-background, #1E2D4A);
  border: 1px solid rgba(255, 92, 53, 0.3);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ev-tools-cta-label {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
}

.ev-tools-cta-btn {
  background: var(--accent-color, #FF5C35);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.15s;
}

.ev-tools-cta-btn:hover { opacity: 0.9; }

.ev-tools-restart-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

.ev-tools-restart-btn:hover { color: var(--text-secondary); }
