/* ============================================
   Quoi faire ce soir — Main Stylesheet
   ============================================ */

/* ---- CSS Custom Properties (Theme) ---- */
:root {
    /* Brand colors */
    --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;

    /* Sidebar */
    --sidebar-width: 200px;
    --sidebar-bg: #050610;
    --sidebar-text: #8080B0;
    --sidebar-active: #FF5C35;
    --sidebar-hover: rgba(255, 255, 255, 0.08);

    /* 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, .sidebar-brand span {
    font-family: var(--font-display);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ---- Liquid Glass System ---- */
.glass,
.metric-card,
.section-card,
.modal,
.notification-dropdown,
.user-dropdown,
.titn-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,
.titn-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%;
}

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-x: hidden;
    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: var(--sidebar-width);
    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);
}

/* ---- Sidebar ---- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal), width var(--transition-normal);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.sidebar-brand .brand-text {
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 16px 12px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 44px; /* Touch target */
    text-decoration: none;
    font-size: 14px;
    user-select: none;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: #FFFFFF;
    text-decoration: none;
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--sidebar-active);
    font-weight: 500;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}

.nav-item .nav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--accent-color);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* ---- Topbar ---- */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    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);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.mobile-menu-btn:hover {
    background: var(--background-secondary);
}

.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);
}

.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);
}

.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);
}

.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;
}

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;
}

.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;
    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);
}

/* ---- 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);
}

.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;
}

/* ---- 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) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }

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

    .main-wrapper {
        margin-left: 0;
    }

    .topbar {
        left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .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;
    }

    /* Sidebar overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar-overlay.open {
        display: block;
    }
}

@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-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; }
    50% { opacity: 0.7; }
}

.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);
}

/* ---- Event Card Cover Image ---- */
.event-card-enhanced {
    overflow: hidden;
}
.event-card-cover {
    position: relative;
}
.event-card-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 4px 10px;
    border-radius: 4px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ============================================
   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(4, 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%;
}

/* ============================================
   TITN LAYOUT — No sidebar, horizontal topnav
   ============================================ */

/* Hide sidebar and adjust layout when TITN is active */
[data-theme="titn"] .sidebar,
[data-theme="titn"] .sidebar-overlay,
[data-theme="titn"] .topbar,
[data-theme="titn"] .mobile-menu-btn {
    display: none !important;
}

[data-theme="titn"] .app-layout {
    grid-template-columns: 1fr;
}

[data-theme="titn"] .main-wrapper {
    margin-left: 0;
    overflow-x: hidden;
}

[data-theme="titn"] .main-content {
    padding: 0;
    margin-top: 0;
    max-width: 100%;
}

[data-theme="titn"] .page:not(#page-dashboard) {
    padding: 20px 40px;
}

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

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

/* TITN unified header: tagline left, nav center-right */
.titn-header {
    display: flex;
    align-items: center;
    padding: 20px 40px 12px;
    gap: 40px;
}

.titn-tagline {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(22px, 3vw, 36px);
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-primary);
    line-height: 1.05;
    flex-shrink: 0;
}

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

.titn-header .titn-topnav-links {
    flex: 1;
    justify-content: center;
}

.titn-header .titn-topnav-right {
    flex-shrink: 0;
}

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

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

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

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

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

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

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

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

.titn-topnav-links {
    display: flex;
    align-items: center;
    gap: 48px;
}

.titn-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;
}

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

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

.titn-avatar-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* TITN Hero Section */
.titn-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 12px 40px 40px;
    min-height: auto;
    align-items: start;
}

.titn-hero-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Hero left as live map */
.titn-hero-map {
    gap: 12px;
}

.titn-hero-map-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.titn-brand-small {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 26px;
    letter-spacing: 4px;
    color: #30D158;
    text-transform: uppercase;
    cursor: pointer;
}

.titn-live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary-color);
    text-transform: uppercase;
}

.titn-hero-map-container {
    height: 380px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.titn-hero-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.titn-hero-logo {
    display: flex;
    flex-direction: column;
}

.titn-hero-logo .logo-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #30D158;
}

.titn-hero-logo .logo-sub {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.titn-hero-headline {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(48px, 7vw, 80px);
    line-height: 0.95;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-primary);
}

.titn-hero-headline .accent {
    color: var(--primary-color);
}

.titn-hero-desc {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 420px;
    font-weight: 300;
    font-style: italic;
}


.titn-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
    align-self: flex-start;
}

.titn-hero-cta:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* TITN Event Cards (right side) */
.titn-hero-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.titn-event-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    /* background & border handled by Liquid Glass system */
    border-radius: 16px;
    cursor: pointer;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.titn-event-card:hover {
    /* glass border handled globally, keep lift + accent glow */
    border-color: rgba(255, 92, 53, 0.3);
    transform: translateY(-2px);
}

.titn-event-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

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

.titn-event-card .card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.titn-event-card .card-venue {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.titn-event-card .card-right {
    text-align: right;
    flex-shrink: 0;
}

.titn-event-card .card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
    margin-bottom: 4px;
}

.titn-event-card .card-badge.tonight {
    background: rgba(255, 92, 53, 0.15);
    color: var(--primary-color);
}

.titn-event-card .card-price {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.titn-event-card .card-price.free {
    color: #00CC6D;
}

/* TITN Sections below hero */
.titn-section {
    padding: 40px;
}

.titn-section-header {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* TITN Palette / theme switcher row */
.titn-palette {
    display: flex;
    gap: 8px;
    padding: 20px 40px;
}

.titn-palette-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--background-card);
    color: var(--text-primary);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color var(--transition-fast);
    text-align: center;
}

.titn-palette-btn:hover,
.titn-palette-btn.active {
    border-color: var(--primary-color);
}

/* TITN Persistent Nav (non-dashboard pages) */
.titn-persistent-nav {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    position: sticky;
    top: 0;
}

/* Events Day Navigator */
.events-day-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

/* TITN Live Map at bottom */
.titn-map-section {
    padding: 0 40px 40px;
}

.titn-map-section .map-container {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* TITN Ticker override */
[data-theme="titn"] .dashboard-ticker {
    background: linear-gradient(135deg, #FF5C35, #CC4A2A);
}

[data-theme="titn"] .dashboard-ticker .ticker-item i {
    color: #FFA88A;
}

/* TITN Responsive */
@media (max-width: 768px) {
    .titn-topnav {
        padding: 12px 16px;
    }

    .titn-nav-stacked {
        padding: 12px 16px 8px;
    }

    .titn-nav-stacked .titn-topnav-right {
        right: 16px;
        top: 12px;
    }

    .titn-topnav-brand .brand-logo {
        font-size: 26px;
    }

    .titn-topnav-brand .brand-logo {
        font-size: 30px;
    }

    .titn-topnav-brand .brand-name {
        font-size: 26px;
        letter-spacing: 3px;
    }

    [data-theme="titn"] #page-dashboard {
        overflow-x: hidden;
        width: 100vw;
        max-width: 100%;
        padding: 0;
        box-sizing: border-box;
    }

    [data-theme="titn"] #page-dashboard * {
        max-width: 100%;
        box-sizing: border-box;
    }

    [data-theme="titn"] #page-dashboard .charts-grid {
        grid-template-columns: 1fr;
        margin: 0;
        gap: 0;
    }

    [data-theme="titn"] #page-dashboard .section-card {
        margin: 0 0 16px;
        border-radius: 12px;
        overflow: hidden;
    }

    [data-theme="titn"] #page-dashboard .card-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    [data-theme="titn"] #page-dashboard .tabs {
        flex-wrap: wrap;
        gap: 4px;
    }

    [data-theme="titn"] #page-dashboard .tab-btn {
        font-size: 12px;
        padding: 6px 10px;
    }

    [data-theme="titn"] #page-dashboard .map-container {
        border-radius: 12px !important;
    }

    [data-theme="titn"] #page-dashboard .top10-list,
    [data-theme="titn"] #page-dashboard .activity-feed {
        overflow-x: hidden;
        word-break: break-word;
    }

    /* Mobile header: tagline + avatar top row, nav below */
    .titn-header {
        flex-wrap: wrap;
        padding: 14px 16px 8px;
        gap: 8px;
    }

    .titn-tagline {
        font-size: clamp(18px, 6vw, 26px);
        flex: 1;
    }

    .titn-header .titn-topnav-right {
        order: 1;
        flex-shrink: 0;
    }

    .titn-header .titn-topnav-links {
        order: 2;
        width: 100%;
        flex: none;
        justify-content: center;
        gap: 24px;
        padding-bottom: 6px;
    }

    .titn-topnav-links {
        gap: 16px;
    }

    .titn-topnav-links a {
        font-size: 15px;
    }

    .titn-hero {
        grid-template-columns: 1fr;
        padding: 12px 10px 20px;
        min-height: auto;
    }

    .titn-hero-right {
        width: calc(100vw - 20px);
        max-width: 100%;
    }

    .titn-event-card {
        padding: 12px 10px;
        gap: 8px;
        border-radius: 12px;
    }

    .titn-event-card .card-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
        border-radius: 10px;
    }

    .titn-event-card .card-title {
        font-size: 14px;
    }

    .titn-event-card .card-venue {
        font-size: 11px;
    }

    .titn-event-card .card-right {
        flex-shrink: 1;
        min-width: 0;
    }

    .titn-event-card .card-badge {
        font-size: 9px;
        padding: 3px 8px;
    }

    .titn-event-card .card-price {
        font-size: 14px;
    }

    .titn-hero-headline {
        font-size: clamp(40px, 12vw, 60px);
    }

    .titn-hero-desc {
        font-size: 14px;
    }

    .titn-palette {
        padding: 16px;
        flex-wrap: wrap;
    }

    .titn-palette-btn {
        flex: 1 1 45%;
    }

    .titn-section {
        padding: 16px 10px;
    }

    .titn-map-section {
        padding: 0 16px 20px;
    }
}

/* ============================================
   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): neutral dark with subtle warmth */
body.circadian-day {
    background: linear-gradient(135deg, #0a0c1a 0%, #101428 40%, #0e1020 70%, #0a0c1a 100%);
    background-size: 200% 200%;
    animation: circadian-drift 35s ease-in-out infinite;
}

@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 */
.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #BF5AF2;
    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.5; transform: scale(1.4); }
    }
    .live-dot {
        animation: dot-pulse 2s 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);
    }
}
