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

/* ---- CSS Custom Properties (Theme) ---- */
:root {
    /* Brand colors - Navy */
    --primary-color: #1B2A4A;
    --primary-light: #2C4270;
    --primary-dark: #0F1A30;
    --primary-hover: #243660;

    /* Accent */
    --accent-color: #3B82F6;
    --accent-light: #60A5FA;

    /* Backgrounds */
    --background-color: #FFFFFF;
    --background-secondary: #F8F9FC;
    --background-card: #FFFFFF;

    /* Text */
    --text-primary: #1A1A2E;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --text-inverse: #FFFFFF;

    /* Borders */
    --border-color: #E2E8F0;
    --border-light: #F1F5F9;

    /* Sidebar */
    --sidebar-width: 200px;
    --sidebar-bg: var(--primary-color);
    --sidebar-text: #CBD5E1;
    --sidebar-active: var(--accent-color);
    --sidebar-hover: rgba(255, 255, 255, 0.08);

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

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

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

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

    /* Category colors */
    --cat-musique: #E74C3C;
    --cat-bar: #9B59B6;
    --cat-restaurant: #E67E22;
    --cat-sport: #27AE60;
    --cat-art: #3498DB;
    --cat-festival: #F1C40F;
    --cat-pleinair: #1ABC9C;
    --cat-prive: #7F8C8D;
    --cat-famille: #E91E63;
    --cat-autre: #95A5A6;
}

/* ---- Dark Mode ---- */
[data-theme="dark"] {
    --background-color: #0F172A;
    --background-secondary: #1E293B;
    --background-card: #1E293B;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border-color: #334155;
    --border-light: #1E293B;
    --sidebar-bg: #0B1120;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* ---- Theme: Pulse Urbain ---- */
[data-theme="pulse"] {
    --primary-color: #FF5C35;
    --primary-light: #FF7A5C;
    --primary-dark: #CC4A2A;
    --primary-hover: #E6512F;
    --accent-color: #00E5FF;
    --accent-light: #33EBFF;
    --background-color: #07080F;
    --background-secondary: #0E1020;
    --background-card: #0E1020;
    --text-primary: #F0F0FF;
    --text-secondary: #8080B0;
    --text-muted: #6060A0;
    --text-inverse: #07080F;
    --border-color: #1a1c30;
    --border-light: #12142a;
    --sidebar-bg: #050610;
    --sidebar-text: #8080B0;
    --sidebar-active: #FF5C35;
    --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);
    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

/* ---- Theme: Signal ---- */
[data-theme="signal"] {
    --primary-color: #00FF88;
    --primary-light: #33FFa0;
    --primary-dark: #00CC6D;
    --primary-hover: #00E67A;
    --accent-color: #00FF88;
    --accent-light: #33FFA0;
    --background-color: #030305;
    --background-secondary: #0A0A10;
    --background-card: #0A0A10;
    --text-primary: #E8E8F0;
    --text-secondary: #707080;
    --text-muted: #505060;
    --text-inverse: #030305;
    --border-color: #141420;
    --border-light: #0e0e18;
    --sidebar-bg: #020204;
    --sidebar-text: #707080;
    --sidebar-active: #00FF88;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.8);
    --font-display: 'Space Mono', monospace;
    --font-body: 'Inter', sans-serif;
}

/* Theme font overrides */
[data-theme="pulse"] body,
[data-theme="pulse"] input,
[data-theme="pulse"] button,
[data-theme="pulse"] select,
[data-theme="pulse"] textarea {
    font-family: var(--font-body);
}

[data-theme="pulse"] h1,
[data-theme="pulse"] h2,
[data-theme="pulse"] .page-header h1,
[data-theme="pulse"] .metric-value,
[data-theme="pulse"] .sidebar-brand span {
    font-family: var(--font-display);
    letter-spacing: 1px;
    text-transform: uppercase;
}

[data-theme="signal"] body,
[data-theme="signal"] input,
[data-theme="signal"] button,
[data-theme="signal"] select,
[data-theme="signal"] textarea {
    font-family: var(--font-body);
}

[data-theme="signal"] h1,
[data-theme="signal"] h2,
[data-theme="signal"] .page-header h1,
[data-theme="signal"] .metric-value,
[data-theme="signal"] .sidebar-brand span {
    font-family: var(--font-display);
    letter-spacing: 0.5px;
}

/* Theme switcher in topbar */
.theme-switcher {
    display: flex;
    gap: 2px;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.theme-switcher button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 13px;
    transition: all 0.2s;
}

.theme-switcher button.active {
    background: var(--accent-color);
    color: var(--text-inverse);
    box-shadow: var(--shadow-sm);
}

.theme-switcher button:hover:not(.active) {
    color: var(--text-primary);
    background: var(--border-color);
}

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

[data-theme="pulse"] .dashboard-ticker .ticker-item i {
    color: #00E5FF;
}

/* Signal ticker gradient override */
[data-theme="signal"] .dashboard-ticker {
    background: linear-gradient(135deg, #0A0A10, #141420);
    border: 1px solid #00FF8830;
}

[data-theme="signal"] .dashboard-ticker .ticker-item i {
    color: #00FF88;
}

/* Pulse sidebar brand accent */
[data-theme="pulse"] .sidebar-brand {
    border-bottom-color: #FF5C3530;
}

/* Signal sidebar brand accent */
[data-theme="signal"] .sidebar-brand {
    border-bottom-color: #00FF8820;
}

/* ---- 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: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    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 35s 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: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-fast), background-color var(--transition-normal);
}

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

.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(39, 174, 96, 0.1);
    color: #27AE60;
}

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

.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: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    transition: background-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 Placeholders ---- */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.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(39, 174, 96, 0.1); color: #27AE60; }
.activity-icon.event { background: rgba(155, 89, 182, 0.1); color: #9B59B6; }

.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(39, 174, 96, 0.1);
    color: #27AE60;
    border: 1px solid #27AE60;
}

.btn-jyvais:hover, .btn-jyvais.active {
    background: #27AE60;
    color: white;
}

.btn-checkin {
    background: rgba(155, 89, 182, 0.1);
    color: #9B59B6;
    border: 1px solid #9B59B6;
}

.btn-checkin:hover, .btn-checkin.active {
    background: #9B59B6;
    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: var(--background-card);
    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 #27AE60; }
.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: var(--background-card);
    border: 1px solid var(--border-color);
    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: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}

.discovery-event-card:hover {
    box-shadow: var(--shadow-lg);
    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: #E74C3C;
    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 35s 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: #27AE60 !important;
    color: white !important;
    border-color: #27AE60 !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%;
}
