/**
 * Babi Meet Premium — Design System 2026
 * Mobile-first · Light/Dark · Glassmorphism · Dating-app UX
 */

/* ── Tokens Light (palette crimson Babi Meet) ── */
:root {
    --primary: #DC143C;
    --primary-hover: #B91032;
    --primary-soft: rgba(220, 20, 60, 0.10);
    --secondary: #E8355A;
    --secondary-soft: rgba(232, 53, 90, 0.12);
    --accent: #FF6B8A;
    --accent-soft: rgba(255, 107, 138, 0.12);
    --success: #10B981;
    --danger: #EF4444;
    --surface: #FFFFFF;
    --surface-elevated: #FFFFFF;
    --border: #E5E7EB;
    --text-primary: #1A0F12;
    --text-secondary: #6B5A5E;

    /* Alias legacy — écrase app.css */
    --orange: var(--primary);
    --orange-hover: var(--primary-hover);
    --orange-soft: var(--primary-soft);
    --brand: var(--primary);
    --brand-hover: var(--primary-hover);
    --brand-soft: var(--primary-soft);
    --accent: var(--secondary);
    --accent-soft: var(--secondary-soft);
    --gold: var(--secondary);
    --gold-soft: var(--secondary-soft);

    --gradient-brand: var(--primary);
    --gradient-premium: var(--primary);
    --gradient-card: rgba(42, 15, 18, 0.72);
    --gradient-surface: var(--surface);

    --bg: #F8F8F8;
    --bg-elevated: #FFFFFF;
    --surface-2: #F3F4F6;
    --glass: rgba(255, 255, 255, 0.82);
    --glass-border: rgba(255, 255, 255, 0.7);
    --border-strong: #D1D5DB;
    --text: var(--text-primary);
    --text-muted: #94A3B8;
    --muted: var(--text-muted);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.10);
    --shadow-glow: 0 0 0 4px rgba(220, 20, 60, 0.15);

    --radius-xs: 10px;
    --radius-sm: 14px;
    --radius-md: 18px;
    --radius-lg: 22px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --sidebar-w: 264px;
    --header-h: 66px;
    --bottomnav-h: 64px;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 160ms;
    --duration-normal: 280ms;
    --duration-slow: 460ms;

    --font: 'Plus Jakarta Sans', 'DM Sans', system-ui, sans-serif;
}

/* ── Tokens Dark ── */
[data-theme="dark"] {
    --bg: #000000;
    --bg-elevated: #0a0a0a;
    --surface: #0a0a0a;
    --surface-elevated: #141414;
    --surface-2: #1a1a1a;
    --white: #141414;
    --glass: rgba(0, 0, 0, 0.92);
    --glass-border: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --text-primary: #F5F5F5;
    --text-secondary: #A3A3A3;
    --text: var(--text-primary);
    --text-muted: #737373;
    --muted: var(--text-muted);
    --primary-soft: rgba(220, 20, 60, 0.22);
    --brand-soft: var(--primary-soft);
    --accent-soft: rgba(255, 107, 138, 0.18);
    --gold-soft: rgba(232, 53, 90, 0.18);
    --secondary-soft: rgba(232, 53, 90, 0.16);
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
    --gradient-surface: var(--surface);
}

[data-theme="dark"] html,
[data-theme="dark"] body.app-body,
[data-theme="dark"] .app-layout,
[data-theme="dark"] .app-main-col,
[data-theme="dark"] .app-main,
[data-theme="dark"] .app-sidebar,
[data-theme="dark"] .app-bottomnav,
[data-theme="dark"] .premium-header {
    background-color: #000000;
}

[data-theme="dark"] .settings-group,
[data-theme="dark"] .notif-item,
[data-theme="dark"] .empty-state,
[data-theme="dark"] .dash-mini-row {
    background: var(--surface-elevated);
}

/* ── Auto : suit le système si aucun thème explicite ── */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]):not([data-theme="dark"]) {
        --bg: #000000;
        --bg-elevated: #0a0a0a;
        --surface: #0a0a0a;
        --surface-elevated: #141414;
        --surface-2: #1a1a1a;
        --white: #141414;
        --glass: rgba(0, 0, 0, 0.92);
        --border: rgba(255, 255, 255, 0.08);
        --border-strong: rgba(255, 255, 255, 0.14);
        --text-primary: #F5F5F5;
        --text-secondary: #A3A3A3;
        --text: var(--text-primary);
        --text-muted: #737373;
        --primary-soft: rgba(220, 20, 60, 0.22);
    }
}

/* ── Base ── */
body.app-body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.011em;
    transition: background var(--duration-normal), color var(--duration-normal);
}

.app-body *,
.app-body *::before,
.app-body *::after { box-sizing: border-box; }

.app-body h1, .app-body h2, .app-body h3 {
    letter-spacing: -0.025em;
    line-height: 1.18;
}

.app-body :focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

/* Scrollbars discrets */
.app-body ::-webkit-scrollbar { width: 10px; height: 10px; }
.app-body ::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--radius-full);
    border: 3px solid transparent;
    background-clip: padding-box;
}
.app-body ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); background-clip: padding-box; }
.app-body ::-webkit-scrollbar-track { background: transparent; }

/* ── Layout ── */
.app-layout {
    max-width: none;
    margin: 0;
    background: var(--surface);
    border: none;
    min-height: 0;
    flex: 1;
    width: 100%;
}

.app-main-col {
    background: var(--bg);
}

.app-main {
    padding: 1rem 0.5rem 1.5rem;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 769px) {
    .app-main { padding: 1.25rem 0.75rem 2rem; }
}

/* ── Sidebar ── */
.app-sidebar {
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 0;
}

.sidebar-brand-block {
    padding: 1.35rem 1.4rem 1.1rem;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0;
    margin: 0;
    border: none;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
    color: var(--text);
    text-decoration: none;
}

.sidebar-logo img.brand-logo,
.sidebar-logo img {
    height: 52px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
    border: none;
    border-radius: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 0.4rem 0.8rem;
    overflow-y: auto;
}

.sidebar-section-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0.9rem 1rem 0.4rem;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    padding: 0.7rem 0.85rem;
    margin-bottom: 3px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    position: relative;
    text-align: left;
}

.sidebar-nav .nav-item i {
    width: 22px;
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-muted);
    transition: transform var(--duration-fast), color var(--duration-fast);
}

.sidebar-nav .nav-item:hover {
    background: var(--surface-2);
    color: var(--text);
}

.sidebar-nav .nav-item:hover i { color: var(--brand); transform: scale(1.05); }

.sidebar-nav .nav-item.active {
    background: #dc143c;
    color: #fff;
    font-weight: 700;
}

.sidebar-nav .nav-item.active i,
.sidebar-nav .nav-item.active .lucide-icon {
    color: #fff;
}

.sidebar-nav .nav-item.active::before {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 58%;
    background: var(--brand);
    border-radius: 0 3px 3px 0;
}

.sidebar-nav .nav-item.nav-premium {
    margin-top: 0.4rem;
    color: var(--primary);
}

.sidebar-nav .nav-item.nav-premium i { color: var(--gold); }

[data-theme="dark"] .sidebar-nav .nav-item.nav-premium { color: var(--gold); }

.sidebar-nav .nav-item.nav-premium.active {
    background: var(--gold-soft);
    color: var(--primary);
}

.sidebar-nav .nav-item.nav-premium.active i { color: var(--gold); }

.sidebar-nav .nav-item.nav-premium.active i { color: var(--primary); }

.sidebar-nav .nav-item .badge-msg,
.sidebar-nav .nav-item .nav-badge {
    margin-left: auto;
    position: static;
    min-width: 20px;
    height: 20px;
    font-size: 0.65rem;
    border: none;
}

.sidebar-nav .nav-item.active .badge-msg,
.sidebar-nav .nav-item.active .nav-badge {
    background: var(--accent);
    color: #fff;
}

.sidebar-footer {
    padding: 0.8rem;
    border-top: 1px solid var(--border);
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration-fast);
}

.sidebar-logout:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

/* ── Premium Header ── */
.premium-header {
    height: var(--header-h);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

#user-dropdown-root {
    position: fixed;
    top: calc(var(--header-h) + 4px);
    right: 1rem;
    z-index: 250;
}

@media (min-width: 769px) {
    .premium-header { padding: 0 1.5rem; }
}

.header-start {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.header-search {
    flex: 1;
    max-width: 420px;
    position: relative;
    display: none;
}

@media (min-width: 769px) {
    .header-search { display: block; }
}

.header-search input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.6rem;
    border: 1.5px solid transparent;
    border-radius: var(--radius-full);
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.875rem;
    font-family: inherit;
    transition: all var(--duration-fast);
}

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

.header-search input:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.header-search i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.header-center {
    flex: 1;
    text-align: center;
}

.header-page-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
}

.header-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast) var(--ease-out);
}

.header-btn:hover {
    background: var(--brand-soft);
    color: var(--brand);
}

.header-btn:active { transform: scale(0.92); }

.header-btn.btn-gem {
    background: var(--gold-soft);
    color: var(--primary);
}

[data-theme="dark"] .header-btn.btn-gem { color: var(--gold); }

.header-btn.btn-gem:hover {
    box-shadow: var(--shadow-glow);
}

.header-avatar-btn {
    width: 42px;
    height: 42px;
    padding: 2px;
    border: none;
    background: var(--gradient-brand);
    border-radius: var(--radius-full);
    cursor: pointer;
    overflow: hidden;
    transition: transform var(--duration-fast);
    flex-shrink: 0;
    margin-left: 0.15rem;
}

.header-avatar-btn:hover { transform: scale(1.06); }

.header-avatar-btn img,
.header-avatar-btn .avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-soft, #fce8ec), #ebe0e4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: var(--primary, #dc143c);
    color: var(--brand);
}

.badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--accent);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface);
    animation: badgePop 0.4s var(--ease-spring);
}

@keyframes badgePop {
    0% { transform: scale(0); }
    70% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* User dropdown */
.user-dropdown {
    position: static;
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    z-index: 200;
    animation: dropIn 0.25s var(--ease-out);
}

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    transition: background var(--duration-fast);
}

.user-dropdown-item:hover { background: var(--brand-soft); color: var(--brand); }
.user-dropdown-item.danger:hover { background: var(--accent-soft); color: var(--accent); }
.user-dropdown-divider { height: 1px; background: var(--border); margin: 0.35rem 0; }

/* Mobile search btn */
.header-search-mobile { display: flex; }
@media (min-width: 769px) { .header-search-mobile { display: none; } }

/* ── Bottom Nav (attachée, plate) ── */
.app-bottomnav {
    height: var(--bottomnav-h);
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    padding: 0 0.25rem;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    flex-shrink: 0;
}

.app-bottomnav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0.4rem 0.25rem;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 0.625rem;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease-out);
    position: relative;
}

.app-bottomnav .nav-item i { font-size: 1.2rem; transition: transform var(--duration-fast); }

.app-bottomnav .nav-item:active { transform: scale(0.92); }

.app-bottomnav .nav-item.active {
    color: var(--brand);
}

.app-bottomnav .nav-item.active i {
    transform: translateY(-1px) scale(1.08);
}

.app-bottomnav .nav-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 3px;
    background: var(--brand);
    border-radius: 0 0 3px 3px;
}

.app-bottomnav .badge-msg {
    position: absolute;
    top: 2px;
    right: calc(50% - 20px);
    border: 2px solid var(--surface);
}

/* ── Page animations ── */
.tab-page {
    width: 100%;
    max-width: 720px;
    margin: 0;
    flex-shrink: 0;
    animation: pageEnter var(--duration-normal) var(--ease-out);
}

@keyframes pageEnter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.dashboard-page { max-width: min(960px, 100%); }
.discovery-page { max-width: min(400px, 100%); }
.messages-page { max-width: min(640px, 100%); }
.explore-page { max-width: min(960px, 100%); }
.groups-page { max-width: min(1100px, 100%); }
.profile-page { max-width: min(640px, 100%); }

/* ── Dashboard ── */
.welcome-section {
    margin-bottom: 1.5rem;
    animation: pageEnter var(--duration-slow) var(--ease-out);
}

.welcome-greeting {
    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 0.35rem;
}

.welcome-greeting span {
    color: var(--primary);
}

.welcome-sub {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-card-premium {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 0.85rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--duration-fast), box-shadow var(--duration-fast);
    cursor: pointer;
}

.stat-card-premium:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card-premium strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primary);
}
}

.stat-card-premium span {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.section-block {
    margin-bottom: 1.75rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.section-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--brand);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-xs);
    transition: background var(--duration-fast);
}

.section-link:hover { background: var(--brand-soft); }

/* Horizontal scroll rows */
.h-scroll {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.h-scroll::-webkit-scrollbar { display: none; }

/* Match cards */
.match-card-premium {
    flex-shrink: 0;
    width: 88px;
    scroll-snap-align: start;
    border: none;
    background: none;
    cursor: pointer;
    text-align: center;
    transition: transform var(--duration-fast);
}

.match-card-premium:hover { transform: scale(1.05); }

.match-card-avatar {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    background-size: cover;
    background-position: center;
    margin: 0 auto 0.4rem;
    position: relative;
    border: 3px solid transparent;
    background-clip: padding-box;
    box-shadow: var(--shadow-md);
}

.match-card-premium.is-new .match-card-avatar {
    box-shadow: 0 0 0 3px var(--brand), var(--shadow-md);
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: var(--success);
    border: 2.5px solid var(--surface);
    border-radius: var(--radius-full);
}

.match-card-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-card-preview {
    font-size: 0.6875rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 88px;
}

/* Activity list */
.activity-list { display: flex; flex-direction: column; gap: 0.5rem; }

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--duration-fast);
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    color: var(--text);
}

.activity-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.activity-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    position: relative;
}

.activity-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.activity-icon-wrap.like { background: var(--accent-soft); color: var(--accent); }
.activity-icon-wrap.view { background: var(--brand-soft); color: var(--brand); }
.activity-icon-wrap.fav { background: var(--gold-soft); color: var(--gold); }

.activity-body { flex: 1; min-width: 0; }
.activity-body strong { display: block; font-size: 0.875rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-body p { font-size: 0.8125rem; color: var(--text-secondary); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-time { font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0; }

/* Premium CTA block */
.premium-banner {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    background: var(--gradient-premium);
    color: #fff;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: transform var(--duration-fast);
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.premium-banner:hover { transform: scale(1.01); }

.premium-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    filter: blur(40px);
}

.premium-banner-content { position: relative; z-index: 1; }

.premium-banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(0,0,0,0.15);
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.65rem;
}

.premium-banner h3 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.premium-banner p {
    font-size: 0.875rem;
    opacity: 0.85;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.premium-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.premium-feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255,255,255,0.35);
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.btn-upgrade {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: #fff;
    color: var(--primary);
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--duration-fast);
}

.btn-upgrade:hover { transform: scale(1.04); }

/* Quick actions dashboard */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--duration-fast);
    border: none;
    font-family: inherit;
    text-align: left;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand);
}

.quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.quick-action-icon.discover { background: var(--brand-soft); color: var(--brand); }
.quick-action-icon.boost { background: var(--gold-soft); color: var(--gold); }
.quick-action-icon.explore { background: var(--primary-soft); color: var(--primary); }
.quick-action-icon.groups { background: rgba(16,185,129,0.12); color: var(--success); }

.quick-action-card strong { font-size: 0.875rem; font-weight: 700; color: var(--text); }
.quick-action-card span { font-size: 0.75rem; color: var(--text-muted); }

/* ── Discovery Premium ── */
.discovery-stage {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 400px;
    margin-inline: auto;
}

.discovery-card {
    width: 100%;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    position: relative;
    transition: transform var(--duration-normal) var(--ease-out);
}

.discovery-card-photo {
    aspect-ratio: 3/4.2;
    background-size: cover;
    background-position: center top;
    position: relative;
}

.discovery-card-photo::after { display: none; }

.discovery-card-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 2;
}

.compat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.65rem;
    background: rgba(59, 130, 246, 0.85);
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 700;
    color: #fff;
}

.discovery-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    z-index: 2;
    background: rgba(60, 8, 18, 0.88);
}

.discovery-card-info h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 0.25rem;
}

.discovery-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.discovery-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.discovery-card-body {
    padding: 1rem 1.15rem;
    border-top: none;
}

.discovery-bio {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--text-secondary);
    margin-bottom: 0.65rem;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.tag {
    padding: 0.3rem 0.7rem;
    background: var(--brand-soft);
    color: var(--brand);
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.discovery-dock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 0.5rem 0 1rem;
}

.btn-swipe {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--duration-fast) var(--ease-spring);
}

.btn-swipe:hover { transform: scale(1.12); }
.btn-swipe:active { transform: scale(0.92); }

.btn-swipe.btn-pass {
    background: var(--surface);
    color: var(--danger);
    border: 2px solid var(--border);
}

.btn-swipe.btn-super {
    background: var(--gold);
    color: #fff;
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
}

.btn-swipe.btn-like {
    background: var(--gradient-brand);
    color: #fff;
    width: 64px;
    height: 64px;
    font-size: 1.4rem;
    box-shadow: var(--shadow-glow);
}

.discovery-card.swipe-out-left {
    animation: swipeLeft 0.4s var(--ease-out) forwards;
}

.discovery-card.swipe-out-right {
    animation: swipeRight 0.4s var(--ease-out) forwards;
}

@keyframes swipeLeft {
    to { transform: translateX(-120%) rotate(-12deg); opacity: 0; }
}

@keyframes swipeRight {
    to { transform: translateX(120%) rotate(12deg); opacity: 0; }
}

.quota-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.quota-bar span {
    padding: 0.35rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

/* ── Messages premium ── */
.conv-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all var(--duration-fast);
    box-shadow: var(--shadow-sm);
    text-align: left;
    font-family: inherit;
    color: var(--text);
}

.conv-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.conv-avatar {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-full);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    position: relative;
}

.conv-body { flex: 1; min-width: 0; }
.conv-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.2rem; }
.conv-top strong { font-size: 0.9375rem; font-weight: 700; color: var(--text); }
.conv-time { font-size: 0.75rem; color: var(--text-muted); }
.conv-preview { font-size: 0.8125rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.conv-unread {
    min-width: 22px;
    height: 22px;
    background: var(--accent);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Chat panel */
.chat-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg);
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--glass);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.chat-header-info { flex: 1; }
.chat-header-info strong { display: block; font-size: 0.9375rem; font-weight: 700; }
.online-dot { font-size: 0.75rem; color: var(--success); font-weight: 500; }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-bubble {
    max-width: 78%;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    line-height: 1.45;
    position: relative;
    animation: bubbleIn 0.25s var(--ease-out);
}

@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(8px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-bubble-them {
    align-self: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.chat-bubble-me {
    align-self: flex-end;
    background: var(--gradient-brand);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: var(--shadow-md);
}

.chat-bubble time {
    display: block;
    font-size: 0.625rem;
    opacity: 0.7;
    margin-top: 0.25rem;
    text-align: right;
}

.chat-bubble .chat-image {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
}

.chat-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0));
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.chat-input input {
    flex: 1;
    padding: 0.65rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--surface-2);
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text);
}

.chat-input input:focus {
    outline: none;
    border-color: var(--brand);
}

.chat-attach-btn,
.chat-emoji-btn,
.chat-call-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--surface-2);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-fast);
}

.chat-attach-btn:hover,
.chat-emoji-btn:hover { background: var(--brand-soft); color: var(--brand); }

.chat-call-btn:hover { background: var(--success); color: #fff; }

.emoji-picker-bar {
    display: flex;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.emoji-picker-bar[hidden] { display: none !important; }

.chat-reactions {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.chat-reaction {
    font-size: 0.875rem;
    padding: 0.1rem 0.35rem;
    background: var(--surface-2);
    border-radius: var(--radius-full);
}

/* ── Panels & Modals ── */
.overlay {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.panel {
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.panel-right {
    width: min(100%, 420px);
}

.drawer-panel { height: 100%; display: flex; flex-direction: column; }

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.drawer-header h2 { font-size: 1.125rem; font-weight: 700; }

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.modal {
    backdrop-filter: blur(8px);
}

.modal-box {
    background: var(--surface);
    border-radius: var(--radius-xl);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.92) translateY(16px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.match-popup-inner {
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    animation: matchPop 0.5s var(--ease-spring);
}

@keyframes matchPop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.match-popup-icon {
    font-size: 3rem;
    color: var(--primary);
    animation: heartBeat 1s ease infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ── Buttons ── */
.btn {
    border-radius: var(--radius-full);
    font-weight: 700;
    letter-spacing: -0.01em;
    padding: 0.7rem 1.4rem;
    transition: all var(--duration-fast) var(--ease-out);
}

.btn:active { transform: scale(0.97); }

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

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

.btn-outline {
    background: #1A0F12;
    border: 1.5px solid #1A0F12;
    color: #fff;
}

.btn-outline:hover {
    border-color: #000;
    color: #fff;
    background: #000;
}

.btn-secondary,
.lum-btn-secondary {
    background: #1A0F12;
    border: 1.5px solid #1A0F12;
    color: #fff;
}

.btn-secondary:hover,
.lum-btn-secondary:hover {
    border-color: #000;
    color: #fff;
    background: #000;
}

.btn-block { width: 100%; }

/* ── Search bar (pages) ── */
.search-bar {
    position: relative;
    margin-bottom: 1rem;
}

.search-bar .search-input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--surface);
    font-size: 0.875rem;
    box-shadow: var(--shadow-sm);
    color: var(--text);
    font-family: inherit;
}

.search-bar .search-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

.search-bar .search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* ── Profile grid, groups ── */
.profile-grid-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--duration-fast);
}

.profile-grid-item:hover { transform: scale(1.02); }

.group-card {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

/* ── Premium page ── */
.premium-page-hero {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 1.5rem;
    background: var(--gradient-premium);
    border-radius: var(--radius-lg);
    color: #fff;
}

.premium-page-hero h2 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.plan-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--duration-fast);
}

.plan-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
}

.plan-card.featured {
    border: 2px solid var(--primary);
}

.plan-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

/* ── Settings page ── */
.settings-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--duration-fast);
    border: none;
    width: 100%;
    background: none;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text);
    text-align: left;
}

.settings-item:last-child { border-bottom: none; }
.settings-item:hover { background: var(--brand-soft); }

.settings-item-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-item-left i {
    width: 20px;
    color: var(--text-muted);
}

/* Toggle switch */
.toggle-switch {
    width: 48px;
    height: 28px;
    background: var(--border-strong);
    border-radius: var(--radius-full);
    position: relative;
    cursor: pointer;
    transition: background var(--duration-fast);
    border: none;
    flex-shrink: 0;
}

.toggle-switch.on { background: var(--brand); }

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: var(--radius-full);
    transition: transform var(--duration-fast) var(--ease-spring);
    box-shadow: var(--shadow-sm);
}

.toggle-switch.on::after { transform: translateX(20px); }

/* ── Empty & loading states ── */
.empty-state {
    text-align: center;
    padding: 3.9rem 1.5rem;
    min-height: 260px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border, #E5E7EB);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-state i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 3rem;
    color: var(--text-muted);
}

.loading-state i { color: var(--brand); }

/* ── Toast ── */
.toast {
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    animation: toastIn 0.3s var(--ease-out);
}

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

/* ── Favorites grid ── */
.fav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.85rem;
}

.fav-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: transform var(--duration-fast);
    border: none;
    padding: 0;
    font-family: inherit;
    text-align: left;
}

.fav-card:hover { transform: translateY(-4px); }

.fav-card-photo {
    aspect-ratio: 3/4;
    background-size: cover;
    background-position: center;
}

.fav-card-info {
    padding: 0.65rem 0.75rem;
}

.fav-card-info strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
}

.fav-card-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Notif items ── */
.notif-item {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem;
    background: var(--surface);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.notif-unread {
    border-left: 3px solid var(--brand);
    background: var(--brand-soft);
}

.notif-item-clickable {
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.notif-item-clickable:hover {
    background: var(--primary-soft);
}

.notif-item-clickable:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.notif-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background-size: cover;
    flex-shrink: 0;
}

/* ── Global search modal ── */
.search-modal-results {
    max-height: 360px;
    overflow-y: auto;
    margin-top: 0.75rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--duration-fast);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.search-result-item:hover { background: var(--brand-soft); }

.search-result-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background-size: cover;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .stats-grid { gap: 0.5rem; }
    .stat-card-premium { padding: 0.75rem 0.5rem; }
    .stat-card-premium strong { font-size: 1.25rem; }
    .welcome-greeting { font-size: 1.375rem; }
    .toast { bottom: calc(var(--bottomnav-h) + 1rem); }
    .premium-header {
        padding: 0 0.5rem;
        gap: 0.35rem;
    }
    .header-center { display: none; }
    .header-center.mobile-only {
        display: flex;
        flex: 1;
        justify-content: center;
        align-items: center;
        min-width: 0;
        padding: 0 0.35rem;
    }
    .header-page-title {
        font-size: 0.95rem;
        font-weight: 700;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 140px;
    }
    .header-start {
        min-width: 0;
        flex: 0 1 auto;
    }
    .header-start .brand-wordmark-sm {
        font-size: 1.05rem;
        max-width: 118px;
        overflow: hidden;
    }
    .header-actions {
        gap: 0.15rem;
        flex-shrink: 0;
    }
    .header-btn,
    .header-avatar-btn {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }
    .header-avatar-btn .avatar-placeholder,
    .header-avatar-btn img {
        width: 32px;
        height: 32px;
    }
}

@media (min-width: 769px) {
    .mobile-only { display: none !important; }
    .page-head .page-title,
    .page-head .page-subtitle { display: none; }
}

/* Reduced motion — contenu toujours visible */
@media (prefers-reduced-motion: reduce) {
    .stagger-item,
    .tab-page {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ── Événements ── */
.event-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform 0.2s var(--ease), box-shadow 0.2s; }
.event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.event-cover { height: 160px; overflow: hidden; background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft)); position: relative; }
.event-cover-tall { height: 100%; min-height: 220px; }
.event-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-cover-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; color: var(--primary); height: 100%; min-height: 160px; }
.event-cover-fallback i { font-size: 2rem; opacity: 0.85; }
.event-cover-fallback span { font-size: 0.8rem; font-weight: 700; }
.event-body { padding: 1rem 1.1rem 1.15rem; }
.event-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.event-cat { background: var(--primary-soft); color: var(--primary); padding: 0.15rem 0.5rem; border-radius: 999px; font-weight: 600; font-size: 0.7rem; }
.event-venue { font-size: 0.8rem; color: var(--text-muted); margin: 0 0 0.35rem; }
.event-desc { font-size: 0.875rem; color: var(--text-muted); margin: 0.35rem 0 0.65rem; line-height: 1.45; }
.event-card-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.events-toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; margin-bottom: 1rem; align-items: center; }
.events-tabs { display: flex; gap: 0.35rem; background: var(--surface-alt); padding: 0.25rem; border-radius: 999px; }
.events-tab { border: none; background: transparent; padding: 0.45rem 0.9rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.events-tab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.events-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.events-filters .field-input { max-width: 140px; padding: 0.45rem 0.65rem; font-size: 0.8125rem; }
.event-detail-page { max-width: 760px; margin: 0 auto; }
.event-detail-shell { display: flex; flex-direction: column; gap: 1rem; }
.event-detail-back { align-self: flex-start; border: none; background: var(--surface); border: 1px solid var(--border); padding: 0.45rem 0.85rem; border-radius: 999px; font-weight: 600; cursor: pointer; color: var(--text); }
.event-detail-hero-wrap { position: relative; border-radius: var(--radius-xl); overflow: hidden; min-height: 240px; background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft)); box-shadow: var(--shadow-md); }
.event-detail-hero-img { width: 100%; height: 280px; object-fit: cover; display: block; }
.event-detail-hero-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.65rem; min-height: 240px; color: var(--primary); font-weight: 700; }
.event-detail-hero-fallback i { font-size: 2.5rem; opacity: 0.8; }
.event-detail-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.15) 55%, transparent 100%); pointer-events: none; }
.event-detail-hero-content { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.25rem 1.35rem 1.4rem; color: #fff; z-index: 1; }
.event-detail-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.55rem; }
.event-detail-title { font-size: clamp(1.35rem, 3vw, 1.85rem); margin: 0; line-height: 1.15; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,0.35); }
.event-detail-organizer { margin: 0.45rem 0 0; font-size: 0.875rem; opacity: 0.92; }
.event-detail-card { padding: 1.15rem 1.25rem; }
.event-detail-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.65rem; margin-bottom: 1rem; }
.event-info-pill { display: flex; gap: 0.65rem; align-items: flex-start; padding: 0.75rem 0.85rem; background: var(--surface-alt); border-radius: var(--radius-md); border: 1px solid var(--border); }
.event-info-pill i { color: var(--primary); margin-top: 0.15rem; }
.event-info-pill small { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 0.15rem; }
.event-info-pill strong { font-size: 0.84rem; line-height: 1.35; color: var(--text); }
.event-detail-note { font-size: 0.8125rem; color: var(--text-muted); margin: 0 0 0.85rem; }
.event-detail-section { margin-bottom: 0.85rem; }
.event-detail-section-title, .event-detail-section h3 { font-size: 1rem; margin: 0 0 0.75rem; }
.event-detail-desc { line-height: 1.6; margin: 0; color: var(--text-secondary); white-space: pre-wrap; }
.event-social-hint { font-size: 0.875rem; color: var(--primary); margin: 0.75rem 0 0; padding: 0.65rem 0.85rem; background: var(--primary-soft); border-radius: var(--radius-md); }
.event-detail-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.event-pending-card { cursor: default; }
.event-pending-actions { display: flex; gap: 0.35rem; margin-top: 0.35rem; flex-wrap: wrap; justify-content: center; }
.event-participants-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.65rem; }
.event-participant-card { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 0.65rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); cursor: pointer; }
.event-participant-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--surface-alt) center/cover; }
.event-participant-name { font-size: 0.78rem; font-weight: 600; text-align: center; }
