/* =============================================
   RassoShare - Dark Automobile Premium Theme
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* =============================================
   Variables
   ============================================= */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --bg-card-hover: #1e1e1e;
    --bg-input: #1e1e1e;
    --bg-sidebar: #0d0d0d;
    --border-color: #2a2a2a;
    --border-light: #333333;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --text-dark: #666666;
    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;
    --accent-red: #dc2626;
    --accent-red-hover: #b91c1c;
    --accent-white: #ffffff;
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
    --purple: #8b5cf6;
    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
}

/* =============================================
   Reset & Base
   ============================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Force tout à ne jamais dépasser son parent */
    max-width: 100%;
}

/* Exceptions qui doivent pouvoir dépasser */
.rf-map-tabs,
.rf-map-topbar,
.event-actions-bar,
.ev-tabs,
.reviews-track,
.partners-track,
html, body,
.sidebar,
.pwa-install-banner,
.modal-overlay,
.lightbox-overlay,
.notif-dropdown,
.notif-dropdown *,
.search-results,
.search-results *,
.leaflet-pane,
.leaflet-pane *,
.leaflet-tile-container,
.leaflet-tile-container * {
    max-width: none;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Prevent overscroll bounce on iOS */
    overscroll-behavior-y: none;
    /* Prevent horizontal overflow globally */
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    /* Safe areas for notched phones */
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* PWA standalone mode adjustments */
body.pwa-standalone .topbar {
    padding-top: env(safe-area-inset-top);
}

body.pwa-standalone .mobile-bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Disable text selection on UI elements */
button, .btn, .nav-link, .mob-nav-item, .sidebar-nav a, .topbar-btn {
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-blue-hover);
}

img {
    max-width: 100%;
    height: auto;
    -webkit-user-drag: none;
}

/* =============================================
   PWA Install Banner
   ============================================= */
.pwa-install-banner {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 420px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pwa-install-banner.visible {
    transform: translateX(-50%) translateY(0);
}

.pwa-install-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-install-content i {
    font-size: 1.5rem;
    color: var(--accent-blue);
}

.pwa-install-content strong {
    display: block;
    font-size: 0.9rem;
}

.pwa-install-content small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-install-btn {
    padding: 8px 16px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pwa-dismiss-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}

ul, ol {
    list-style: none;
}

/* =============================================
   Typography
   ============================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* =============================================
   Auth Layout (Login / Register / Pending)
   ============================================= */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(220, 38, 38, 0.05) 0%, transparent 50%);
    animation: authBgPulse 8s ease-in-out infinite alternate;
}

@keyframes authBgPulse {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.1) rotate(3deg); }
}

.auth-container {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-white), var(--accent-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.auth-logo p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 28px;
    font-size: 1.6rem;
    color: var(--text-primary);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-footer a {
    color: var(--accent-blue);
    font-weight: 500;
}

/* =============================================
   Form Elements
   ============================================= */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.form-group label .required {
    color: var(--accent-red);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-control::placeholder {
    color: var(--text-dark);
}

.form-control.error {
    border-color: var(--danger);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-blue);
    margin-top: 2px;
    flex-shrink: 0;
}

.form-check label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.form-error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 4px;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .form-control {
    padding-left: 44px;
}

.input-icon-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dark);
    font-size: 0.95rem;
}

/* =============================================
   Buttons
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-transform: uppercase;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), #1e40af);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-blue-hover), #1e3a8a);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-red), #991b1b);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--accent-red-hover), #7f1d1d);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #16a34a);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: #000;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.05);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* =============================================
   App Layout (Sidebar + Content)
   ============================================= */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1100;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo h1 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue), #fff, var(--accent-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sidebar-logo span {
    font-size: 0.7rem;
    color: var(--text-dark);
    display: block;
    margin-top: 2px;
    letter-spacing: 1px;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.sidebar-nav .nav-section {
    margin-bottom: 24px;
}

.sidebar-nav .nav-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0 12px;
    margin-bottom: 8px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-nav .nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav .nav-link.active {
    color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.1);
}

.sidebar-nav .nav-link .nav-badge {
    margin-left: auto;
    background: var(--accent-red);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.sidebar-user {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

.sidebar-user-details {
    flex: 1;
    min-width: 0;
}

.sidebar-user-details .name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-details .role {
    font-size: 0.75rem;
    color: var(--text-dark);
}

/* Main content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-left h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.topbar-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-light);
}

.topbar-btn .notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px;
}

/* Page content area */
.page-content {
    padding: 24px;
    max-width: 100%;
    overflow-x: hidden;
    word-break: break-word;
}

/* Map fullscreen: fill all available space, no padding, no footer */
body.map-fullscreen-page .page-content {
    padding: 0;
    height: calc(100vh - var(--topbar-height, 64px));
    overflow: hidden;
}

body.map-fullscreen-page .footer {
    display: none;
}

@media (max-width: 1024px) {
    body.map-fullscreen-page .page-content {
        height: calc(100vh - var(--topbar-height, 64px));
    }
}

@media (max-width: 768px) {
    body.map-fullscreen-page .page-content {
        height: calc(100vh - var(--topbar-height, 64px) - 60px);
        height: calc(100dvh - var(--topbar-height, 64px) - 60px);
    }
}

/* =============================================
   Cards
   ============================================= */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-light);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* Stat cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-card .stat-icon.blue { background: var(--info-bg); color: var(--info); }
.stat-card .stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-card .stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-card .stat-icon.yellow { background: var(--warning-bg); color: var(--warning); }
.stat-card .stat-icon.purple { background: rgba(139, 92, 246, 0.1); color: var(--purple); }

.stat-card .stat-info h4 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* =============================================
   Event Cards
   ============================================= */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.event-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.event-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.15);
}

.event-card-image {
    height: 180px;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-card-image .event-placeholder {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.15);
}

.event-card-image .event-category-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(8px);
}

.event-card-image .event-distance-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.event-card-body {
    padding: 20px;
}

.event-card-body h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.event-card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.event-card-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.event-card-meta span i {
    width: 16px;
    color: var(--text-dark);
}

.event-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.event-card-footer .organizer {
    font-size: 0.8rem;
    color: var(--text-dark);
}

.event-card-footer .event-actions {
    display: flex;
    gap: 8px;
}

.event-card-footer .event-actions button {
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
    font-size: 1rem;
}

.event-card-footer .event-actions button:hover {
    color: var(--accent-blue);
}

.event-card-footer .event-actions button.favorited {
    color: var(--accent-red);
}

/* Event past card */
.event-card.event-past {
    opacity: 0.6;
}

.event-past-tag {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 3px 10px;
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* =============================================
   Events Page - Hero / Tabs / Search
   ============================================= */
.ev-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.ev-hero-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    letter-spacing: 0.06em;
    margin: 0;
}

.ev-hero-title i {
    margin-right: 8px;
    opacity: 0.7;
}

.ev-hero-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.ev-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #1d4ed8 100%);
    color: #fff;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.ev-hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

/* Filters section */
.ev-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.ev-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
}
.ev-tabs::-webkit-scrollbar { display: none; }

.ev-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s;
}

.ev-tab:hover {
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.25);
}

.ev-tab.active {
    color: #fff;
    background: var(--tab-color, var(--accent-blue));
    border-color: var(--tab-color, var(--accent-blue));
}

.ev-tab i {
    font-size: 0.75rem;
}

/* Search box */
.ev-search-form {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ev-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.25s;
}

.ev-search-box:focus-within {
    border-color: var(--accent-blue);
}

.ev-search-box i {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.ev-search-box input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    padding: 8px 0;
    width: 200px;
    outline: none;
    font-family: var(--font-body);
}

.ev-search-box input::placeholder {
    color: var(--text-muted);
}

.ev-clear-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.ev-clear-btn:hover {
    color: var(--danger);
    border-color: var(--danger);
}

@media (max-width: 768px) {
    .ev-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .ev-hero-title {
        font-size: 1.3rem;
    }
    .ev-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .ev-search-box input {
        width: 100%;
    }
    .ev-tab span {
        display: none;
    }
}

/* =============================================
   Event Detail
   ============================================= */
.event-hero {
    height: 300px;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    display: flex;
    align-items: flex-end;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.event-hero img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-hero .event-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.8));
}

.event-hero .event-hero-content {
    position: relative;
    padding: 24px;
    width: 100%;
}

.event-hero .event-hero-content h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.event-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    min-width: 0;
}

.event-detail-grid > div {
    min-width: 0;
}

.event-detail-info .info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.event-detail-info .info-row i {
    width: 20px;
    color: var(--accent-blue);
    text-align: center;
}

.event-detail-info .info-row .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 80px;
}

.event-detail-info .info-row .value {
    font-weight: 500;
}

.event-detail-map {
    height: 300px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* Actions bar */
.event-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

/* Event detail responsive */
@media (max-width: 768px) {
    .event-hero {
        height: 180px;
        border-radius: 0;
        margin: -14px -14px 12px -14px;
        width: calc(100% + 28px);
    }

    .event-hero .event-hero-content h1 {
        font-size: 1.15rem;
        line-height: 1.3;
    }

    .event-hero .event-hero-content {
        padding: 12px;
    }

    .event-detail-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .event-actions-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        margin: 0 -14px 16px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .event-actions-bar::-webkit-scrollbar {
        display: none;
    }

    .event-actions-bar .btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .event-actions-bar .btn span {
        display: none;
    }

    .event-detail-info .info-row {
        flex-wrap: wrap;
        gap: 4px;
        padding: 10px 0;
    }

    .event-detail-info .info-row .label {
        min-width: auto;
        font-size: 0.8rem;
    }

    .event-detail-info .info-row .value {
        width: 100%;
        font-size: 0.85rem;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .event-detail-map {
        height: 200px;
    }

    .photo-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Comment form mobile */
    .comment-input-row {
        flex-direction: column;
    }

    .comment-form textarea {
        font-size: 16px;
    }

    /* Participant list */
    .participant-item {
        font-size: 0.85rem;
    }

    /* Rating form */
    .rating-form .stars-input .star-item {
        font-size: 1.5rem;
        padding: 4px;
    }

    /* QR/Report modals */
    .modal {
        width: 90vw;
        max-width: 360px;
    }
}

/* =============================================
   Map Page (legacy)
   ============================================= */
.map-container {
    position: relative;
}

.map-wrapper {
    height: calc(100vh - var(--topbar-height) - 130px);
    min-height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.map-wrapper #map {
    width: 100%;
    height: 100%;
}

.map-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.map-filters .filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-filters select,
.map-filters input {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    font-family: var(--font-body);
}

.map-filters select:focus,
.map-filters input:focus {
    border-color: var(--accent-blue);
}

.map-filters .search-input {
    flex: 1;
    min-width: 200px;
}

/* =============================================
   RF Map Fullscreen (style rassofrance)
   ============================================= */

.rf-map-fullscreen {
    position: relative;
    width: 100%;
    height: 100%;
}

.rf-map {
    width: 100%;
    height: 100%;
}

/* --- Top filter tabs (rassofrance style) --- */
.rf-map-topbar {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 800;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.rf-map-topbar::-webkit-scrollbar { display: none; }

.rf-map-tabs {
    display: flex;
    gap: 6px;
    width: max-content;
    align-items: center;
}

.rf-map-tabs-label {
    padding: 8px 14px;
    font-family: var(--font-heading, 'Orbitron', sans-serif);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rf-map-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-family: var(--font-heading, 'Orbitron', sans-serif);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    color: rgba(255,255,255,0.7);
    background: rgba(15,20,25,0.85);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.rf-map-tab:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.3);
    background: rgba(15,20,25,0.95);
}

.rf-map-tab.active {
    color: #fff;
    background: var(--tab-color, var(--accent-blue));
    border-color: var(--tab-color, var(--accent-blue));
    box-shadow: 0 0 12px rgba(37,99,235,0.4);
}

.rf-map-tab i {
    font-size: 0.75rem;
}

/* --- Bouton Proposer un spot --- */
.rf-map-btn-spot {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: var(--font-heading, 'Orbitron', sans-serif);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #c1121f 0%, #780000 100%);
    border-radius: 6px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(193,18,31,0.4);
    transition: all 0.3s;
    backdrop-filter: blur(8px);
    white-space: nowrap;
}

.rf-map-btn-spot:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 25px rgba(193,18,31,0.6);
}

/* --- Contrôles bas gauche --- */
.rf-map-controls {
    position: absolute;
    bottom: 70px;
    left: 12px;
    z-index: 800;
    display: flex;
    gap: 6px;
    align-items: center;
}

.rf-map-ctrl-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15,20,25,0.9);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s;
    backdrop-filter: blur(8px);
}

.rf-map-ctrl-btn:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.rf-map-select {
    padding: 8px 12px;
    background: rgba(15,20,25,0.9);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 0.8rem;
    font-family: var(--font-body);
    outline: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.rf-map-select:focus {
    border-color: var(--accent-blue);
}

.rf-map-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    background: rgba(15,20,25,0.9);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    backdrop-filter: blur(8px);
}

.rf-map-search-wrap i {
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
}

.rf-map-search-wrap input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.85rem;
    padding: 8px 0;
    width: 180px;
    outline: none;
    font-family: var(--font-body);
}

.rf-map-search-wrap input::placeholder {
    color: rgba(255,255,255,0.35);
}

/* --- Cockpit compteur (style rassofrance) --- */
.rf-cockpit {
    position: absolute;
    bottom: 70px;
    right: 12px;
    z-index: 800;
}

.rf-cockpit-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 22px;
    background: rgba(10,14,19,0.92);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.rf-cockpit-speed {
    text-align: center;
}

.rf-cockpit-value {
    display: block;
    font-family: var(--font-heading, 'Orbitron', monospace);
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: 0.05em;
}

.rf-cockpit-unit {
    display: block;
    font-family: var(--font-heading, 'Orbitron', monospace);
    font-size: 0.6rem;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 2px;
}

.rf-cockpit-sep {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.12);
}

.rf-cockpit-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rf-cockpit-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rf-cockpit-label {
    font-family: var(--font-heading, 'Orbitron', monospace);
    font-size: 0.55rem;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    min-width: 45px;
}

.rf-cockpit-data {
    font-family: var(--font-heading, 'Orbitron', monospace);
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.05em;
}

/* --- Panel latéral événements --- */
.rf-map-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 360px;
    background: rgba(10,14,19,0.95);
    border-left: 1px solid rgba(255,255,255,0.08);
    z-index: 700;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    backdrop-filter: blur(10px);
}

.rf-map-panel.open {
    transform: translateX(0);
}

.rf-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.rf-panel-header h3 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
}

.rf-panel-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.rf-panel-toggle:hover {
    background: rgba(255,255,255,0.12);
}

.rf-map-panel.open .rf-panel-toggle i {
    transform: rotate(180deg);
}

.rf-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.rf-panel-body::-webkit-scrollbar { width: 4px; }
.rf-panel-body::-webkit-scrollbar-track { background: transparent; }
.rf-panel-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Event cards inside panel */
.rf-panel-body .event-card {
    border-radius: 8px;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.2s;
}

.rf-panel-body .event-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--accent-blue);
}

/* --- Panel bouton flottant pour ouvrir --- */
.rf-panel-float-btn {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 750;
    width: 36px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10,14,19,0.92);
    border: 1px solid rgba(255,255,255,0.1);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.25s;
}

/* --- Responsive --- */
@media (max-width: 768px) {

    .rf-map-topbar {
        top: 8px;
        left: 8px;
        right: 8px;
    }

    .rf-map-tab span {
        display: none;
    }

    .rf-map-tab {
        padding: 6px 10px;
        font-size: 0.65rem;
    }

    .rf-map-tabs-label {
        display: none;
    }

    .rf-map-btn-spot {
        bottom: 16px;
        padding: 8px 14px;
        font-size: 0.65rem;
    }

    .rf-map-controls {
        bottom: 60px;
        left: 8px;
        gap: 4px;
    }

    .rf-map-search-wrap {
        display: none;
    }

    .rf-map-select {
        padding: 6px 8px;
        font-size: 0.75rem;
    }

    .rf-map-ctrl-btn {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    .rf-cockpit {
        bottom: 60px;
        right: 8px;
    }

    .rf-cockpit-inner {
        padding: 8px 14px;
        gap: 10px;
    }

    .rf-cockpit-value {
        font-size: 1.2rem;
    }

    .rf-cockpit-unit {
        font-size: 0.5rem;
    }

    .rf-cockpit-label {
        font-size: 0.45rem;
    }

    .rf-cockpit-data {
        font-size: 0.7rem;
    }

    .rf-cockpit-sep {
        height: 28px;
    }

    .rf-map-panel {
        width: 100%;
        top: auto;
        bottom: 0;
        height: 45vh;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.08);
        transform: translateY(100%);
    }

    .rf-map-panel.open {
        transform: translateY(0);
    }
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow) !important;
    border: 1px solid var(--border-color) !important;
}

.leaflet-popup-tip {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
}

.leaflet-popup-content {
    margin: 12px 16px !important;
    font-family: var(--font-body) !important;
}

.map-popup h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 6px;
}

.map-popup p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.map-popup .popup-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    background: var(--accent-blue);
    color: white;
    border-radius: var(--radius-xs);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

/* =============================================
   Badges
   ============================================= */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
}

.badge-secondary {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
}

.badge-purple {
    background: rgba(139, 92, 246, 0.1);
    color: var(--purple);
}

/* =============================================
   Tables
   ============================================= */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--bg-secondary);
    padding: 14px 16px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.data-table .user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.data-table .user-cell .avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: white;
    flex-shrink: 0;
}

.data-table .user-cell .user-info .name {
    font-weight: 600;
    color: var(--text-primary);
}

.data-table .user-cell .user-info .email {
    font-size: 0.8rem;
    color: var(--text-dark);
}

.data-table .actions-cell {
    display: flex;
    gap: 6px;
}

/* =============================================
   Dashboard Widgets
   ============================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.widget-list {
    list-style: none;
}

.widget-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget-list li:last-child {
    border-bottom: none;
}

.widget-list li .event-date-badge {
    width: 48px;
    height: 48px;
    background: var(--info-bg);
    border-radius: var(--radius-xs);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.widget-list li .event-date-badge .day {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent-blue);
}

.widget-list li .event-date-badge .month {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.widget-list li .event-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.widget-list li .event-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* =============================================
   Profile
   ============================================= */
.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.profile-info h2 {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.profile-info p {
    color: var(--text-muted);
}

.profile-info .profile-meta {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.profile-info .profile-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.profile-info .profile-meta span i {
    color: var(--text-dark);
}

/* =============================================
   Pending Page
   ============================================= */
.pending-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pending-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 60px 40px;
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.pending-icon {
    width: 80px;
    height: 80px;
    background: var(--warning-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2rem;
    color: var(--warning);
    animation: pendingPulse 2s ease-in-out infinite;
}

@keyframes pendingPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pending-card h2 {
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.pending-card p {
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* =============================================
   Notifications / Toasts
   ============================================= */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    max-width: 450px;
    animation: toastSlideIn 0.3s ease;
    border: 1px solid;
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-success {
    background: var(--success-bg);
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.2);
}

.toast-error {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.toast-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.2);
}

.toast-info {
    background: var(--info-bg);
    color: var(--info);
    border-color: rgba(59, 130, 246, 0.2);
}

.toast .toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
    font-size: 1rem;
}

.toast .toast-close:hover {
    opacity: 1;
}

/* Flash messages (inline) */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.2);
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: var(--info-bg);
    color: var(--info);
    border-color: rgba(59, 130, 246, 0.2);
}

/* =============================================
   Pagination
   ============================================= */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.pagination a {
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.pagination a:hover {
    color: var(--text-primary);
    border-color: var(--accent-blue);
}

.pagination .active {
    background: var(--accent-blue);
    color: white;
    border: 1px solid var(--accent-blue);
}

/* =============================================
   Empty States
   ============================================= */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =============================================
   Filter / Category Pills
   ============================================= */
.category-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.category-pill {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.category-pill:hover,
.category-pill.active {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.1);
}

/* =============================================
   Footer
   ============================================= */
.footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-dark);
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: var(--text-dark);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--text-secondary);
}

/* =============================================
   Overlay for mobile sidebar
   ============================================= */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
}

.sidebar-overlay.active {
    display: block;
}

/* =============================================
   Scrollbar
   ============================================= */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-dark);
}

/* =============================================
   Utility Classes
   ============================================= */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.w-100 { width: 100%; }
.hidden { display: none !important; }

/* =============================================
   Loading Spinner
   ============================================= */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--radius);
}

/* =============================================
   Share / Action Modals
   ============================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    max-width: none;
}

.modal-overlay.active {
    display: flex !important;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 1;
}

.modal h3 {
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
}

/* =============================================
   Comments
   ============================================= */
.comment-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: white;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.comment-header strong {
    color: var(--text-primary);
}

.comment-header .text-muted {
    font-size: 0.75rem;
}

.comment-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 4px;
    margin-left: auto;
    opacity: 0;
    transition: var(--transition);
}

.comment-item:hover .comment-delete {
    opacity: 1;
}

.comment-delete:hover {
    color: var(--danger);
}

.comment-body p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
    margin: 0;
    word-break: break-word;
}

.comment-form .comment-input-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.comment-form .comment-input-row textarea {
    flex: 1;
}

/* =============================================
   Participants
   ============================================= */
.participant-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

/* =============================================
   Pagination
   ============================================= */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.pagination .btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.pagination-dots {
    color: var(--text-muted);
    padding: 0 4px;
    font-size: 0.9rem;
}

/* =============================================
   Mobile Bottom Navigation Bar
   ============================================= */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border-color);
    z-index: 200;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.mobile-bottom-nav nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
}

.mobile-bottom-nav .mob-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-dark);
    font-size: 0.65rem;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav .mob-nav-item i {
    font-size: 1.2rem;
    transition: var(--transition);
}

.mobile-bottom-nav .mob-nav-item.active,
.mobile-bottom-nav .mob-nav-item:active {
    color: var(--accent-blue);
}

.mobile-bottom-nav .mob-nav-item.active i {
    transform: scale(1.15);
}

.mobile-bottom-nav .mob-nav-item .mob-badge,
.mobile-bottom-nav .mob-nav-item .mob-nav-badge {
    position: absolute;
    top: 0;
    right: 2px;
    min-width: 16px;
    height: 16px;
    background: var(--accent-red);
    border-radius: 8px;
    border: 2px solid var(--bg-sidebar);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* Search toggle button — hidden on desktop */
.search-toggle-btn {
    display: none;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 0.9rem;
}

/* =============================================
   Responsive Design
   ============================================= */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .event-detail-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
        --topbar-height: 56px;
    }

    /* Safe area for notch phones */
    html {
        padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) 0 env(safe-area-inset-left, 0);
    }

    body {
        -webkit-text-size-adjust: 100%;
        -webkit-overflow-scrolling: touch;
    }

    /* Sidebar as overlay drawer */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding-bottom: 70px; /* Space for bottom nav */
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Show bottom nav */
    .mobile-bottom-nav {
        display: block;
    }

    /* Hide desktop footer on mobile or reduce it */
    .footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 12px 16px;
        margin-bottom: 60px;
        font-size: 0.75rem;
    }

    /* Page content */
    .page-content {
        padding: 14px;
        overflow-x: hidden;
        max-width: 100vw;
    }

    .main-content {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* Tables responsive */
    .table-container,
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Admin grids */
    .admin-grid {
        grid-template-columns: 1fr !important;
    }

    /* All flex/grid containers */
    .d-flex,
    .btn-group,
    .form-row {
        flex-wrap: wrap;
    }

    /* Topbar compact */
    .topbar {
        padding: 0 12px;
        gap: 8px;
    }

    .topbar-left h2 {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 40vw;
    }

    /* Typography */
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.15rem; }

    /* Auth pages */
    .auth-page {
        padding: 16px;
        align-items: flex-start;
        padding-top: 10vh;
    }

    .auth-card {
        padding: 24px 18px;
        border-radius: var(--radius-sm);
    }

    .auth-card h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .auth-logo {
        margin-bottom: 24px;
    }

    .auth-logo h1 {
        font-size: 2.2rem;
    }

    /* Forms — bigger touch targets */
    .form-control {
        padding: 14px 16px;
        font-size: 16px; /* Prevents iOS zoom on focus */
        border-radius: var(--radius-sm);
    }

    .input-icon-wrapper .form-control {
        padding-left: 44px;
    }

    select.form-control {
        padding: 14px 36px 14px 16px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-group label {
        font-size: 0.82rem;
        margin-bottom: 5px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-check {
        gap: 8px;
    }

    .form-check input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }

    /* Buttons — touch-friendly */
    .btn {
        padding: 14px 24px;
        font-size: 0.95rem;
        min-height: 48px;
        border-radius: var(--radius-sm);
    }

    .btn-sm {
        padding: 10px 16px;
        font-size: 0.82rem;
        min-height: 40px;
    }

    .btn-icon {
        width: 44px;
        height: 44px;
    }

    .btn:hover {
        transform: none; /* No hover effects on touch */
    }

    .btn:active {
        transform: scale(0.97);
        opacity: 0.9;
    }

    /* Stats grid */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .stat-card .stat-info h4 {
        font-size: 1.5rem;
    }

    .stat-card .stat-info p {
        font-size: 0.72rem;
    }

    /* Event cards — full width, optimized */
    .events-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .event-card {
        border-radius: var(--radius-sm);
    }

    .event-card:hover {
        transform: none;
        box-shadow: none;
    }

    .event-card:active {
        background: var(--bg-card-hover);
    }

    .event-card-image {
        height: 160px;
    }

    .event-card-body {
        padding: 14px;
    }

    .event-card-body h3 {
        font-size: 1.05rem;
    }

    .event-card-meta {
        gap: 4px;
        margin-bottom: 8px;
    }

    .event-card-meta span {
        font-size: 0.8rem;
    }

    .event-card-footer {
        padding: 10px 14px;
    }

    .event-card-footer .event-actions button {
        padding: 8px;
        font-size: 1.1rem;
        min-width: 40px;
        min-height: 40px;
    }

    /* Event detail — see dedicated block above (line ~1317) */

    /* Map page — fullscreen feel */
    .map-container {
        margin: -14px;
        margin-bottom: 0;
    }

    .map-filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 10px 12px;
        margin-bottom: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
    }

    .map-filters .filter-group {
        width: 100%;
    }

    .map-filters .filter-group.search-input {
        grid-column: 1 / -1;
    }

    .map-filters select,
    .map-filters input {
        width: 100%;
        padding: 10px 12px;
        font-size: 16px;
    }

    .map-filters .search-input {
        min-width: unset;
    }

    .map-filters .search-input input {
        width: 100%;
    }

    .map-filters .btn {
        grid-column: 1 / -1;
        min-height: 42px;
    }

    .map-filters .btn .btn-label {
        display: none;
    }

    .map-wrapper {
        height: calc(100vh - var(--topbar-height) - 170px);
        min-height: 300px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    /* Cards */
    .card {
        border-radius: var(--radius-sm);
    }

    .card-header {
        padding: 14px 16px;
    }

    .card-header h3 {
        font-size: 1rem;
    }

    .card-body {
        padding: 14px 16px;
    }

    /* Dashboard */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .widget-list li {
        padding: 10px 0;
        gap: 10px;
    }

    .widget-list li .event-date-badge {
        width: 42px;
        height: 42px;
    }

    .widget-list li .event-date-badge .day {
        font-size: 1rem;
    }

    .widget-list li .event-info h4 {
        font-size: 0.85rem;
    }

    .widget-list li .event-info p {
        font-size: 0.75rem;
    }

    /* Profile */
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .profile-avatar-large {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .profile-info h2 {
        font-size: 1.4rem;
    }

    .profile-info .profile-meta {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .profile-info .profile-meta span {
        font-size: 0.8rem;
    }

    /* Tables — horizontal scroll with shadow hint */
    .table-container {
        border-radius: var(--radius-sm);
        position: relative;
    }

    .data-table {
        font-size: 0.78rem;
    }

    .data-table th,
    .data-table td {
        padding: 10px 10px;
        white-space: nowrap;
    }

    .data-table .user-cell .avatar {
        width: 30px;
        height: 30px;
        font-size: 0.7rem;
    }

    .data-table .actions-cell {
        gap: 4px;
    }

    .data-table .actions-cell .btn-sm {
        padding: 6px 10px;
        min-height: 34px;
    }

    /* Pending page */
    .pending-card {
        padding: 40px 24px;
    }

    .pending-card h2 {
        font-size: 1.3rem;
    }

    .pending-icon {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    /* Badges */
    .badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    /* Category pills — horizontal scroll */
    .category-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .category-pills::-webkit-scrollbar {
        display: none;
    }

    .category-pill {
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Alerts */
    .alert {
        font-size: 0.82rem;
        padding: 12px 14px;
        border-radius: var(--radius-sm);
    }

    /* Toast — full width at bottom on mobile */
    .toast-container {
        top: auto;
        bottom: 76px; /* Above bottom nav */
        right: 12px;
        left: 12px;
    }

    .toast {
        min-width: unset;
        width: 100%;
        max-width: 100%;
        font-size: 0.85rem;
        padding: 12px 16px;
        border-radius: var(--radius-sm);
    }

    /* Modal — bottom sheet style */
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .modal {
        max-width: 100%;
        border-radius: var(--radius) var(--radius) 0 0;
        padding: 24px 20px;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
        animation: modalSlideUp 0.3s ease;
    }

    @keyframes modalSlideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    /* Scrollbar hide on mobile */
    ::-webkit-scrollbar {
        display: none;
    }

    /* Action buttons on event detail - sticky bottom */
    .event-actions-sticky {
        position: fixed;
        bottom: 60px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-top: 1px solid var(--border-color);
        padding: 10px 14px;
        display: flex;
        gap: 8px;
        z-index: 90;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
    }

    .event-actions-sticky .btn {
        flex: 1;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .auth-logo h1 {
        font-size: 1.8rem;
    }

    .auth-logo p {
        font-size: 0.8rem;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
    }

    .topbar-right .topbar-btn:not(:last-child) {
        display: none;
    }

    .topbar-left h2 {
        font-size: 1rem;
        max-width: 150px;
    }

    /* Even smaller stats */
    .stat-card .stat-info h4 {
        font-size: 1.3rem;
    }

    .event-card-image {
        height: 140px;
    }

    .map-wrapper {
        height: calc(100vh - var(--topbar-height) - 160px);
        min-height: 260px;
    }

    .map-filters {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        padding: 8px 10px;
    }

    .map-filters select,
    .map-filters input {
        padding: 9px 10px;
        font-size: 14px;
    }

    .event-hero {
        height: 170px;
    }

    .event-hero .event-hero-content h1 {
        font-size: 1.15rem;
    }
}

/* =============================================
   Touch & Interaction Helpers
   ============================================= */
/* =============================================
   Notification Bell Dropdown
   ============================================= */
.notif-bell-wrap {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    pointer-events: none;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.notif-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notif-dd-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.notif-dd-header a {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
}

.notif-dd-body {
    max-height: 360px;
    overflow-y: auto;
}

.notif-dd-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.15s;
}

.notif-dd-item:hover {
    background: var(--bg-card-hover);
}

.notif-dd-item.unread {
    background: rgba(37, 99, 235, 0.06);
    border-left: 3px solid var(--primary);
}

.notif-dd-item i {
    margin-top: 3px;
    color: var(--primary);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.notif-dd-item p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-primary);
    line-height: 1.4;
}

/* =============================================
   Search Autocomplete
   ============================================= */
.topbar-search {
    position: relative;
}

.topbar-search input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 7px 12px 7px 34px;
    color: var(--text-primary);
    font-size: 0.85rem;
    width: 220px;
    transition: width 0.3s, border-color 0.2s;
}

.topbar-search input:focus {
    width: 300px;
    border-color: var(--primary);
    outline: none;
}

.topbar-search .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 300px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    display: none;
    max-height: 320px;
    overflow-y: auto;
}

.search-results.active {
    display: block;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s;
    border-bottom: 1px solid var(--border-subtle);
}

.search-item:hover {
    background: var(--bg-card-hover);
}

.search-item i {
    font-size: 0.9rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.search-item strong {
    font-size: 0.85rem;
}

.search-item small {
    font-size: 0.75rem;
}

.search-no-result {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* =============================================
   Chat / Messaging
   ============================================= */
.chat-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    height: calc(100vh - var(--topbar-height) - 80px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
}

.conv-list {
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    background: var(--bg-secondary);
}

.conv-list-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 1rem;
    background: var(--bg-card);
    position: sticky;
    top: 0;
    z-index: 2;
}

.conv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: var(--text-primary);
}

.conv-item:hover, .conv-item.active {
    background: var(--bg-card-hover);
}

.conv-item.unread {
    background: rgba(37, 99, 235, 0.06);
}

.conv-item .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.conv-item .conv-info {
    flex: 1;
    min-width: 0;
}

.conv-item .conv-info h4 {
    font-size: 0.88rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-item .conv-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 2px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-item .conv-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.conv-item .unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
}

.chat-header h3 {
    margin: 0;
    font-size: 1rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.45;
    word-wrap: break-word;
}

.chat-bubble.mine {
    align-self: flex-end;
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-bubble.theirs {
    align-self: flex-start;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.chat-bubble .bubble-time {
    display: block;
    font-size: 0.68rem;
    margin-top: 4px;
    opacity: 0.7;
}

.chat-input {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    background: var(--bg-card);
}

.chat-input input {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 0.88rem;
}

.chat-input input:focus {
    border-color: var(--primary);
    outline: none;
}

.chat-input button {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
}

.chat-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =============================================
   Photo Gallery
   ============================================= */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}

.photo-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-item .photo-delete {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 0.75rem;
}

.photo-item:hover .photo-delete {
    opacity: 1;
}

.photo-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: 0.85rem;
}

.photo-upload-zone:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.04);
}

.photo-upload-zone i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 8px;
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    background: none;
    border: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

/* =============================================
   Badges / Gamification
   ============================================= */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.badge-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.badge-item.locked {
    opacity: 0.4;
    filter: grayscale(1);
}

.badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.badge-item h4 {
    font-size: 0.82rem;
    margin: 0;
    line-height: 1.3;
}

.badge-item p {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.3;
}

/* =============================================
   Ratings / Stars
   ============================================= */
.stars-display {
    display: inline-flex;
    gap: 2px;
}

.star-item {
    color: #555;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.15s, transform 0.15s;
}

.star-item.active, .star-item.hovered {
    color: #f59e0b;
}

.star-item:hover {
    transform: scale(1.15);
}

.star-item.readonly {
    cursor: default;
}

.star-item.readonly:hover {
    transform: none;
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.rating-summary .rating-big {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.rating-summary .rating-count {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.rating-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.rating-item .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.rating-item .rating-content {
    flex: 1;
}

.rating-item .rating-content h4 {
    font-size: 0.88rem;
    margin: 0 0 4px;
}

.rating-item .rating-content p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin: 6px 0 0;
    line-height: 1.45;
}

.rating-item .rating-content .rating-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* =============================================
   Weather Widget
   ============================================= */
.weather-widget {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.02));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.weather-widget .weather-icon {
    font-size: 1.8rem;
}

.weather-widget .weather-info h4 {
    margin: 0;
    font-size: 0.95rem;
}

.weather-widget .weather-info p {
    margin: 2px 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.weather-widget .weather-temp {
    margin-left: auto;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* =============================================
   QR Code Modal
   ============================================= */
.qr-modal-body {
    text-align: center;
    padding: 20px;
}

.qr-modal-body img {
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    background: #fff;
    padding: 8px;
}

.qr-modal-body p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* =============================================
   My Events / Organizer Stats
   ============================================= */
.my-events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.my-event-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s;
}

.my-event-row:hover {
    border-color: var(--primary);
}

.my-event-row .event-date-badge {
    flex-shrink: 0;
}

.my-event-row .my-event-info {
    flex: 1;
    min-width: 0;
}

.my-event-row .my-event-info h3 {
    font-size: 0.95rem;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.my-event-row .my-event-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.my-event-stats {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.my-event-stats .stat {
    text-align: center;
}

.my-event-stats .stat .num {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.my-event-stats .stat .label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* =============================================
   Admin: Logs
   ============================================= */
.log-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.log-item .log-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.log-item .log-content {
    flex: 1;
}

.log-item .log-content p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.log-item .log-content .log-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* =============================================
   Admin: Banned Words
   ============================================= */
.banned-words-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0;
}

.banned-word-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--danger);
}

.banned-word-tag button {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.banned-word-tag button:hover {
    opacity: 1;
}

/* =============================================
   Public User Profile
   ============================================= */
.profile-stats {
    display: flex;
    gap: 24px;
    margin-top: 10px;
}

.profile-stats .ps-item {
    text-align: center;
}

.profile-stats .ps-item .ps-num {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.profile-stats .ps-item .ps-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.profile-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.profile-bio {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 10px;
}

/* =============================================
   Notifications Page (Full)
   ============================================= */
.notif-list {
    display: flex;
    flex-direction: column;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.15s;
}

.notif-item:hover {
    background: var(--bg-card-hover);
}

.notif-item.unread {
    background: rgba(37, 99, 235, 0.05);
    border-left: 3px solid var(--primary);
}

.notif-item .notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.notif-item .notif-content {
    flex: 1;
}

.notif-item .notif-content p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.4;
}

.notif-item .notif-content .notif-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 6px;
}

/* =============================================
   Event Actions Bar
   ============================================= */
.event-actions-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* =============================================
   Calendar Export Buttons
   ============================================= */
.calendar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.calendar-actions .btn i {
    margin-right: 4px;
}

/* =============================================
   Mobile overrides for new features
   ============================================= */
@media (max-width: 768px) {
    /* ---- Notification dropdown ---- */
    .notif-dropdown {
        position: fixed;
        top: var(--topbar-height);
        left: 8px;
        right: 8px;
        width: auto;
        max-height: 70vh;
        border-radius: var(--radius-sm);
    }

    .notif-dd-body {
        max-height: 55vh;
    }

    .notif-dd-item {
        padding: 12px 14px;
    }

    /* ---- Chat / Messaging ---- */
    .chat-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .conv-list {
        border-right: none;
        max-height: none;
    }

    /* Conversation page — fullscreen chat */
    .chat-container {
        height: calc(100vh - var(--topbar-height));
        height: calc(100dvh - var(--topbar-height));
        border-radius: 0;
        margin: -14px;
    }

    .chat-header {
        padding: 10px 14px;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .chat-messages {
        padding: 14px;
        flex: 1;
        min-height: 0;
    }

    .chat-bubble {
        max-width: 85%;
        font-size: 0.9rem;
    }

    .chat-input {
        padding: 10px 12px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
        position: sticky;
        bottom: 0;
    }

    .chat-input input {
        font-size: 16px; /* Prevent iOS zoom */
        padding: 12px 14px;
    }

    /* ---- Event actions — horizontal scroll ---- */
    .event-actions-bar {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 6px;
        padding-bottom: 4px;
        margin-bottom: 14px;
    }

    .event-actions-bar::-webkit-scrollbar {
        display: none;
    }

    .event-actions-bar .btn {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 0.78rem;
        padding: 8px 12px;
    }

    /* ---- Badges ---- */
    .badges-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .badge-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .badge-item {
        padding: 12px 6px;
    }

    .badge-item h4 {
        font-size: 0.75rem;
    }

    .badge-item p {
        display: none;
    }

    /* ---- My Events ---- */
    .my-event-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 14px;
    }

    .my-event-stats {
        display: flex;
        flex-wrap: wrap;
        gap: 10px 16px;
        font-size: 0.82rem;
    }

    .my-event-stats span {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    /* ---- Ratings ---- */
    .rating-summary {
        flex-wrap: wrap;
    }

    .rating-summary .rating-big {
        font-size: 1.8rem;
    }

    .rating-item {
        padding: 12px 0;
    }

    .stars-display {
        gap: 1px;
    }

    .star-item {
        font-size: 1.2rem;
        padding: 4px;
        min-width: 32px;
        min-height: 32px;
    }

    /* ---- Photos ---- */
    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }

    .photo-item .photo-delete {
        opacity: 1;
    }

    .photo-upload-zone {
        padding: 16px;
    }

    /* ---- Weather ---- */
    .weather-widget {
        padding: 12px 14px;
        gap: 10px;
    }

    .weather-widget .weather-icon {
        font-size: 1.5rem;
    }

    .weather-widget .weather-temp {
        font-size: 1.3rem;
    }

    /* ---- User Profile ---- */
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }

    .profile-stats {
        justify-content: center;
        gap: 16px;
    }

    .profile-stats span {
        font-size: 0.85rem;
    }

    .profile-meta {
        flex-direction: column;
        gap: 6px;
    }

    /* ---- Notifications page ---- */
    .notif-item {
        padding: 12px;
    }

    .notif-item .notif-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .notif-item .notif-content p {
        font-size: 0.84rem;
    }

    /* ---- Admin Logs ---- */
    .log-item {
        padding: 10px 0;
    }

    .log-item .log-icon {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    /* ---- Admin Banned Words ---- */
    .banned-words-list {
        gap: 6px;
    }

    .banned-word-tag {
        font-size: 0.78rem;
        padding: 5px 10px;
    }

    /* ---- QR Modal ---- */
    .qr-modal-body img {
        max-width: 200px;
    }

    /* ---- Empty state ---- */
    .empty-state {
        padding: 40px 16px;
    }

    .empty-state i {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    /* Extra compact topbar */
    .topbar-left h2 {
        max-width: 100px;
        font-size: 0.9rem;
    }

    .topbar-right {
        gap: 4px;
    }

    .topbar-right .topbar-btn {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    /* Hide msg btn in topbar on small screens (in bottom nav) */
    .topbar-msg-btn {
        display: none !important;
    }

    /* Chat bubbles wider */
    .chat-bubble {
        max-width: 90%;
    }

    /* Weather wrap */
    .weather-widget {
        flex-wrap: wrap;
    }

    .weather-widget .weather-temp {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    /* Badges 2 cols */
    .badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Photos 2 cols */
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Stats grid single col */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-card .stat-info h4 {
        font-size: 1.2rem;
    }

    /* Event hero smaller */
    .event-hero {
        height: 160px;
    }

    .event-hero .event-hero-content h1 {
        font-size: 1.1rem;
    }

    /* My events stats inline compact */
    .my-event-stats {
        font-size: 0.75rem;
    }

    /* Card padding compact */
    .card-header {
        padding: 14px;
    }

    .card-body {
        padding: 14px;
    }
}

/* =============================================
   Touch & Interaction Helpers
   ============================================= */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .card:hover,
    .stat-card:hover,
    .event-card:hover {
        transform: none;
        box-shadow: none;
    }

    /* Active states instead */
    .card:active {
        background: var(--bg-card-hover);
    }

    .stat-card:active {
        background: var(--bg-card-hover);
    }

    .sidebar-nav .nav-link:active {
        background: rgba(37, 99, 235, 0.15);
    }

    .conv-item:active {
        background: var(--bg-card-hover);
    }

    .notif-item:active {
        background: var(--bg-card-hover);
    }

    /* Show delete on photos (no hover on touch) */
    .photo-item .photo-delete {
        opacity: 0.8;
    }

    /* Show comment delete */
    .comment-delete {
        opacity: 0.5;
    }

    /* Larger tap targets */
    .sidebar-nav .nav-link {
        padding: 12px;
        min-height: 44px;
    }

    .event-card-footer .event-actions button {
        min-width: 44px;
        min-height: 44px;
    }

    .pagination a,
    .pagination span {
        min-width: 40px;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Star rating bigger touch area */
    .star-item {
        padding: 6px;
        min-width: 36px;
        min-height: 36px;
    }
}
