/* ===========================================================================
   Summit LevelUP — Ultra-Premium Design System (Mobile-First)
   Enterprise-grade UI for high-revenue business platform
   =========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ==========================================================================
   CSS VARIABLES
   ========================================================================== */
:root {
    --brand: #01AC02;
    --brand-light: #0CC90D;
    --brand-dark: #019401;
    --brand-glow: rgba(1, 172, 2, 0.25);
    --brand-subtle: rgba(1, 172, 2, 0.08);
    /* Resaltado de Networking: verde de marca abajo a la izquierda que se
       funde con el fondo oscuro arriba a la derecha. */
    --highlight-hover: linear-gradient(45deg, rgba(1, 148, 1, 0.34) 0%, rgba(1, 148, 1, 0.1) 55%, rgba(4, 4, 16, 0) 100%);
    --highlight-active: linear-gradient(45deg, rgba(1, 148, 1, 0.55) 0%, rgba(1, 148, 1, 0.18) 55%, rgba(4, 4, 16, 0.2) 100%);

    --cyan: #00DFE7;
    --cyan-light: #33E8EE;
    --cyan-glow: rgba(0, 223, 231, 0.2);
    --cyan-subtle: rgba(0, 223, 231, 0.06);

    --bg-body: #040410;
    --bg-surface: #08081C;
    --bg-card: rgba(12, 12, 32, 0.72);
    --bg-card-solid: #0C0C22;
    --bg-card-hover: rgba(16, 16, 44, 0.80);
    --bg-input: rgba(6, 6, 20, 0.85);
    --bg-navbar: rgba(4, 4, 14, 0.90);

    --text-primary: #F8F8FF;
    --text-secondary: #d4d4eb;
    --text-muted: #aeaec2;
    --text-inverse: #040410;

    --success: #01AC02;
    --danger: #F04458;
    --warning: #F0A830;
    --info: #00DFE7;

    --gold: #FFD700;
    --gold-glow: rgba(255, 215, 0, 0.12);
    --silver: #C0C0C0;
    --bronze: #CD7F32;

    --border: rgba(255, 255, 255, 0.05);
    --border-hover: rgba(255, 255, 255, 0.10);
    --border-glow: rgba(255, 255, 255, 0.15);
    --border-focus: var(--brand);

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Outfit', var(--font-body);
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --s-1: 0.25rem;
    --s-2: 0.5rem;
    --s-3: 0.75rem;
    --s-4: 1rem;
    --s-5: 1.25rem;
    --s-6: 1.5rem;
    --s-8: 2rem;
    --s-10: 2.5rem;
    --s-12: 3rem;
    --s-16: 4rem;
    --s-20: 5rem;

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 24px;
    --r-2xl: 32px;
    --r-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .5), 0 2px 4px rgba(0, 0, 0, .3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, .6), 0 4px 12px rgba(0, 0, 0, .4);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, .7), 0 8px 24px rgba(0, 0, 0, .5);
    --shadow-brand: 0 4px 24px rgba(1, 172, 2, .18), 0 0 0 1px rgba(1, 172, 2, .08);
    --shadow-glow: 0 0 40px rgba(1, 172, 2, .12);

    --ease: cubic-bezier(.4, 0, .2, 1);
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
    --ease-out: cubic-bezier(0, 0, .2, 1);
    --duration: 200ms;
    --duration-slow: 400ms;

    --nav-h: 56px;
    --bottom-nav-h: 64px;
    --max-w: 1080px;
    --max-w-sm: 720px;
}

/* ==========================================================================
   RESET
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   ANIMATED ATMOSPHERIC BACKGROUND
   ========================================================================== */
.bg-atmosphere {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-atmosphere__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0;
    animation: blobFloat 20s infinite ease-in-out;
}

.bg-atmosphere__blob--1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(1, 172, 2, .10), transparent 70%);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
    opacity: 1;
}

.bg-atmosphere__blob--2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(0, 223, 231, .06), transparent 70%);
    bottom: -5%;
    right: -10%;
    animation-delay: -7s;
    opacity: 1;
}

.bg-atmosphere__blob--3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(1, 172, 2, .05), transparent 70%);
    top: 50%;
    left: 60%;
    animation-delay: -14s;
    opacity: 1;
}

/* Noise texture overlay */
.bg-atmosphere::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
    opacity: 0.5;
}

@keyframes blobFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -40px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(15px, 30px) scale(1.02);
    }
}

a {
    color: var(--brand-light);
    text-decoration: none;
    transition: color var(--duration) var(--ease);
}

a:hover {
    color: var(--cyan-light);
}

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

::selection {
    background: var(--brand);
    color: white;
}

/* ==========================================================================
   TOP NAVBAR
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    background: var(--bg-navbar);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(1, 172, 2, .25), rgba(0, 223, 231, .15), transparent);
}

.navbar__container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--s-4);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center logo on mobile */
}

@media (min-width: 768px) {
    .navbar__container {
        justify-content: space-between;
    }
}

.navbar__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.navbar__logo-img {
    height: 48px;
    /* Bigger logo */
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(1, 172, 2, .3));
    transition: filter var(--duration) var(--ease), transform 0.2s ease;
}

.navbar__logo:hover .navbar__logo-img {
    filter: drop-shadow(0 0 16px rgba(1, 172, 2, .5));
    transform: scale(1.05);
}

/* Desktop links — hidden on mobile */
.navbar__links {
    display: none;
    gap: 2px;
}

.navbar__link {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-2) var(--s-4);
    border-radius: var(--r-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all var(--duration) var(--ease);
    position: relative;
}

.navbar__link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, .04);
}

.navbar__link--active {
    color: var(--brand-light);
    background: rgba(1, 172, 2, .06);
}

.navbar__link--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background: var(--brand-light);
    border-radius: 1px;
    box-shadow: 0 0 8px var(--brand-glow);
}

.navbar__icon {
    width: 16px;
    height: 16px;
}

.navbar__right {
    display: flex;
    align-items: center;
    gap: var(--s-3);
}

/* User avatar circle */
.navbar__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    display: none;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.75rem;
    color: white;
    text-transform: uppercase;
    flex-shrink: 0;
}

.navbar__user-name {
    display: none;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
}

.navbar__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--brand);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: var(--r-full);
    box-shadow: 0 0 10px var(--brand-glow);
}

.navbar__logout-form {
    display: inline;
}

.navbar__logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--s-2);
    border-radius: var(--r-sm);
    transition: all var(--duration) var(--ease);
    display: flex;
    align-items: center;
}

.navbar__logout-btn:hover {
    color: var(--danger);
    background: rgba(240, 68, 88, .08);
}

/* Hamburger — hidden when bottom nav is present */
.navbar__toggle {
    display: none;
}

.navbar__toggle-bar {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all .3s var(--ease);
}

/* ==========================================================================
   BOTTOM TAB BAR (Mobile) — Premium App-style
   ========================================================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-h);
    background: rgba(4, 4, 14, 0.92);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border-top: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Top glow line */
.bottom-nav::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(1, 172, 2, .2), rgba(0, 223, 231, .12), transparent);
}

.bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: var(--s-2) var(--s-3);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: all var(--duration) var(--ease);
    position: relative;
    min-width: 52px;
    border-radius: var(--r-md);
}

.bottom-nav__item:hover {
    color: var(--text-secondary);
}

.bottom-nav__item--active {
    color: var(--brand-light);
}

/* Active glow dot */
.bottom-nav__item--active::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--brand-light);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--brand-glow);
}

.bottom-nav__item i {
    width: 20px;
    height: 20px;
}

.bottom-nav__item--active i {
    filter: drop-shadow(0 0 4px rgba(1, 172, 2, .4));
}

.bottom-nav__label {
    text-transform: uppercase;
}

/* Old mobile menu — keep as fallback */
.mobile-menu {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 4, 14, 0.97);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    z-index: 999;
    padding: var(--s-8) var(--s-6);
    display: none;
    flex-direction: column;
    gap: var(--s-1);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: all .3s var(--ease);
}

.mobile-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    display: flex;
}

.mobile-menu__link {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    padding: var(--s-4) var(--s-5);
    border-radius: var(--r-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--duration) var(--ease);
    border: 1px solid transparent;
}

.mobile-menu__link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, .03);
    border-color: var(--border);
}

.mobile-menu__link--active {
    color: var(--brand-light);
    background: rgba(1, 172, 2, .06);
    border-color: rgba(1, 172, 2, .12);
}

.mobile-menu__link i {
    width: 20px;
    height: 20px;
    opacity: .7;
}

.mobile-menu__link--active i {
    opacity: 1;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.main-content {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - var(--nav-h));
    padding-top: calc(var(--nav-h) + var(--s-6));
    padding-bottom: calc(var(--bottom-nav-h) + var(--s-8));
}

.main-content--full {
    padding-top: 0;
    padding-bottom: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--s-4);
}

.container--narrow {
    max-width: var(--max-w-sm);
}

/* ==========================================================================
   HERO BANNER
   ========================================================================== */
.hero {
    position: relative;
    margin: calc(-1 * var(--s-6)) calc(-1 * var(--s-4)) var(--s-8);
    padding: var(--s-8) var(--s-5);
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-body) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(1, 172, 2, 0.03), transparent 70%);
    filter: blur(60px);
    pointer-events: none;
}

.hero__greeting {
    font-family: var(--font-display);
    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 4px;
    position: relative;
}

.hero__subtitle {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 400;
    position: relative;
}

/* ==========================================================================
   PAGE HEADERS
   ========================================================================== */
.page-header {
    margin-bottom: var(--s-8);
}

.page-header__title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.page-header__subtitle {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* ==========================================================================
   CARDS — Ultra Premium Glass
   ========================================================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--s-5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all var(--duration-slow) var(--ease);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .07), transparent);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    pointer-events: none;
}

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

/* Animated gradient border card */
.card--glow {
    border: none;
    background: var(--bg-card);
    position: relative;
    z-index: 0;
    overflow: visible;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.card--glow::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: calc(var(--r-lg) + 1px);
    padding: 1px;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.15),
            rgba(255, 255, 255, 0.02));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.card--accent {
    border-color: rgba(0, 223, 231, .10);
}

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--s-5);
}

.card__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.card__subtitle {
    color: var(--text-muted);
    font-size: 0.6875rem;
    margin-top: 2px;
}

.card__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, rgba(1, 172, 2, .12), rgba(1, 172, 2, .03));
    color: var(--brand-light);
    border: 1px solid rgba(1, 172, 2, .10);
}

/* ==========================================================================
   STAT CARDS — Ultra Premium
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-3);
    margin-bottom: var(--s-6);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--s-4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all var(--duration-slow) var(--ease);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12px;
    right: 12px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent);
    pointer-events: none;
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, .02), transparent 60%);
    opacity: 0;
    transition: opacity var(--duration-slow) var(--ease);
    pointer-events: none;
}

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

.stat-card:hover::after {
    opacity: 1;
}

.stat-card__content {
    display: flex;
    align-items: flex-start;
    gap: var(--s-3);
    position: relative;
    z-index: 1;
}

.stat-card__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-md);
    flex-shrink: 0;
    font-size: 1rem;
    border: 1px solid transparent;
}

.stat-card__icon--primary {
    background: linear-gradient(135deg, rgba(1, 172, 2, .15), rgba(1, 172, 2, .04));
    color: var(--brand-light);
    border-color: rgba(1, 172, 2, .10);
}

.stat-card__icon--accent {
    background: linear-gradient(135deg, rgba(0, 223, 231, .12), rgba(0, 223, 231, .04));
    color: var(--cyan);
    border-color: rgba(0, 223, 231, .10);
}

.stat-card__icon--warning {
    background: linear-gradient(135deg, rgba(240, 168, 48, .12), rgba(240, 168, 48, .04));
    color: var(--warning);
    border-color: rgba(240, 168, 48, .10);
}

.stat-card__icon--gold {
    background: linear-gradient(135deg, rgba(255, 215, 0, .12), rgba(255, 215, 0, .04));
    color: var(--gold);
    border-color: rgba(255, 215, 0, .10);
}

.stat-card__value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

/* Value glow effect */
.stat-card__value--glow {
    text-shadow: 0 0 20px var(--brand-glow);
}

.stat-card__label {
    color: var(--text-muted);
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ==========================================================================
   BUTTONS — Ultra Premium
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    padding: 0.6875rem 1.375rem;
    border-radius: var(--r-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.8125rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--duration) var(--ease);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

/* Shine sweep on hover */
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .1), transparent);
    transition: left .5s var(--ease);
    pointer-events: none;
}

.btn:hover::after {
    left: 100%;
}

.btn--primary {
    background: linear-gradient(135deg, var(--brand), #018A01);
    color: white;
    border-color: rgba(1, 172, 2, .25);
    box-shadow: 0 2px 12px rgba(1, 172, 2, .15), inset 0 1px 0 rgba(255, 255, 255, .1);
}

.btn--primary:hover {
    background: linear-gradient(135deg, var(--brand-light), var(--brand));
    box-shadow: 0 6px 28px rgba(1, 172, 2, .25), 0 0 0 1px rgba(1, 172, 2, .12);
    color: white;
    transform: translateY(-1px);
}

.btn--accent {
    background: linear-gradient(135deg, var(--cyan), #00B0B8);
    color: var(--text-inverse);
    border-color: rgba(0, 223, 231, .25);
    box-shadow: 0 2px 12px rgba(0, 223, 231, .12), inset 0 1px 0 rgba(255, 255, 255, .15);
}

.btn--accent:hover {
    background: linear-gradient(135deg, var(--cyan-light), var(--cyan));
    box-shadow: 0 6px 28px rgba(0, 223, 231, .22);
    color: var(--text-inverse);
    transform: translateY(-1px);
}

.btn--outline {
    background: rgba(255, 255, 255, .02);
    color: var(--text-primary);
    border-color: var(--border-hover);
    backdrop-filter: blur(8px);
}

.btn--outline:hover {
    border-color: rgba(1, 172, 2, .2);
    color: var(--brand-light);
    background: rgba(1, 172, 2, .04);
}

.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: var(--s-2) var(--s-3);
}

.btn--ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, .04);
}

.btn--ghost::after {
    display: none;
}

.btn--danger {
    background: rgba(240, 68, 88, .06);
    color: var(--danger);
    border-color: rgba(240, 68, 88, .12);
}

.btn--danger:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 16px rgba(240, 68, 88, .25);
}

.btn--lg {
    padding: 0.9375rem 1.875rem;
    font-size: 0.9375rem;
    border-radius: var(--r-md);
}

.btn--sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.6875rem;
}

.btn--block {
    width: 100%;
}

.btn--icon {
    width: 38px;
    height: 38px;
    padding: 0;
}

/* ==========================================================================
   FORMS — Premium
   ========================================================================== */
.form-group {
    margin-bottom: var(--s-5);
}

.form-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.6875rem;
    font-weight: 600;
    margin-bottom: var(--s-2);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    padding: 0.8125rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 400;
    transition: all var(--duration) var(--ease);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .25);
}

.form-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.form-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(1, 172, 2, .12), 0 0 20px rgba(1, 172, 2, .06), inset 0 2px 4px rgba(0, 0, 0, .15);
    background: rgba(8, 8, 24, .95);
}

.form-input:hover:not(:focus) {
    border-color: var(--border-hover);
}

.form-error {
    color: var(--danger);
    font-size: 0.6875rem;
    margin-top: var(--s-1);
    font-weight: 500;
}

.form-errors {
    background: rgba(240, 68, 88, .05);
    border: 1px solid rgba(240, 68, 88, .12);
    border-radius: var(--r-sm);
    padding: var(--s-4);
    margin-bottom: var(--s-5);
    color: var(--danger);
    font-size: 0.8125rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-4);
}

/* ==========================================================================
   SEARCH BOX
   ========================================================================== */
.search-box {
    display: flex;
    gap: var(--s-3);
    margin-bottom: var(--s-8);
}

.search-box .form-input {
    flex: 1;
}

.search-box .btn {
    flex-shrink: 0;
}

/* ==========================================================================
   ALERTS
   ========================================================================== */
.alerts-container {
    position: fixed;
    top: calc(var(--nav-h) + var(--s-4));
    left: var(--s-4);
    right: var(--s-4);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.alert {
    padding: var(--s-3) var(--s-5);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    font-size: 0.8125rem;
    font-weight: 500;
    animation: alertSlideIn .4s var(--ease-spring);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg);
}

.alert--success {
    background: rgba(1, 172, 2, .12);
    border: 1px solid rgba(1, 172, 2, .20);
    color: var(--brand-light);
}

.alert--error {
    background: rgba(240, 68, 88, .10);
    border: 1px solid rgba(240, 68, 88, .18);
    color: var(--danger);
}

.alert--warning {
    background: rgba(240, 168, 48, .10);
    border: 1px solid rgba(240, 168, 48, .18);
    color: var(--warning);
}

.alert--info {
    background: rgba(0, 223, 231, .08);
    border: 1px solid rgba(0, 223, 231, .15);
    color: var(--cyan);
}

.alert__close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.25rem;
    opacity: .5;
    transition: opacity var(--duration);
    flex-shrink: 0;
    line-height: 1;
}

.alert__close:hover {
    opacity: 1;
}

/* ==========================================================================
   AUTH PAGES — Premium
   ========================================================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s-6) var(--s-4);
    position: relative;
}

/* Animated ambient glow */
.auth-page::before {
    content: '';
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background:
        radial-gradient(circle at 30% 40%, rgba(1, 172, 2, .08), transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(0, 223, 231, .06), transparent 50%);
    pointer-events: none;
    animation: authGlow 8s ease-in-out infinite alternate;
}

@keyframes authGlow {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: .7;
    }
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: var(--r-xl);
    padding: var(--s-10) var(--s-6);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    box-shadow: var(--shadow-xl);
    position: relative;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
}

.auth-card__logo {
    text-align: center;
    margin-bottom: var(--s-10);
}

.auth-card__logo-icon {
    font-size: 2.5rem;
    margin-bottom: var(--s-3);
    display: inline-block;
    filter: drop-shadow(0 0 16px rgba(1, 172, 2, .4));
    animation: float 4s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.auth-card__logo-title {
    font-family: var(--font-display);
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.04em;
}

.auth-card__logo-subtitle {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-top: var(--s-1);
}

.auth-card__footer {
    text-align: center;
    margin-top: var(--s-8);
    padding-top: var(--s-6);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.auth-card__footer a {
    color: var(--brand-light);
    font-weight: 600;
}

.auth-card__footer a:hover {
    color: var(--cyan-light);
}

/* ==========================================================================
   QR / REFERRAL LINK
   ========================================================================== */
.referral-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-5);
    margin-bottom: var(--s-8);
}

.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-4);
}

.qr-image {
    width: 160px;
    height: 160px;
    border-radius: var(--r-md);
    border: 1px solid var(--border-hover);
    padding: var(--s-3);
    background: white;
    box-shadow: var(--shadow-md), 0 0 24px rgba(255, 255, 255, .03);
}

.referral-link-box {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: var(--s-2) var(--s-3);
    margin-bottom: var(--s-4);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .15);
}

.referral-link-box__url {
    flex: 1;
    color: var(--brand-light);
    font-size: 0.6875rem;
    font-family: var(--font-mono);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: all;
}

.referral-link-box__copy {
    flex-shrink: 0;
}

/* ==========================================================================
   INVITE TICKETS
   ========================================================================== */
.tickets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-3);
}

.ticket {
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--s-5) var(--s-4);
    text-align: center;
    transition: all var(--duration-slow) var(--ease);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.ticket::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
}

.ticket--available::before {
    background: linear-gradient(90deg, var(--brand), var(--brand-light), var(--cyan));
}

.ticket--used::before {
    background: var(--text-muted);
}

.ticket--cancelled::before {
    background: var(--danger);
}

.ticket:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.ticket__code {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    margin-bottom: var(--s-2);
}

.ticket--available .ticket__code {
    color: var(--brand-light);
}

.ticket--used .ticket__code {
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: .6;
}

.ticket--cancelled .ticket__code {
    color: var(--danger);
    text-decoration: line-through;
    opacity: .6;
}

.ticket__status {
    font-size: 0.625rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ticket__claimed {
    font-size: 0.5625rem;
    color: var(--text-muted);
    margin-top: var(--s-1);
}

/* ==========================================================================
   RANKING — Podium
   ========================================================================== */
.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: var(--s-3);
    margin-bottom: var(--s-8);
    padding: var(--s-10) 0 var(--s-4);
}

.podium__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.podium__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: var(--s-2);
    background: var(--bg-card-solid);
    position: relative;
}

.podium__item--gold .podium__avatar {
    width: 72px;
    height: 72px;
    font-size: 1.25rem;
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 28px rgba(255, 215, 0, .15), 0 0 56px rgba(255, 215, 0, .05);
}

.podium__item--gold .podium__avatar::before {
    content: '👑';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.125rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4));
    animation: float 3s ease-in-out infinite;
}

.podium__item--silver .podium__avatar {
    border-color: var(--silver);
    color: var(--silver);
    box-shadow: 0 0 16px rgba(192, 192, 192, .08);
}

.podium__item--bronze .podium__avatar {
    border-color: var(--bronze);
    color: var(--bronze);
    box-shadow: 0 0 16px rgba(205, 127, 50, .08);
}

.podium__name {
    font-weight: 600;
    font-size: 0.625rem;
    margin-bottom: var(--s-1);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.podium__score {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1rem;
}

.podium__item--gold .podium__score {
    color: var(--gold);
    text-shadow: 0 0 16px rgba(255, 215, 0, .2);
}

.podium__item--silver .podium__score {
    color: var(--silver);
}

.podium__item--bronze .podium__score {
    color: var(--bronze);
}

.podium__pedestal {
    width: 80px;
    border-radius: var(--r-sm) var(--r-sm) 0 0;
    margin-top: var(--s-3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.375rem;
    color: rgba(255, 255, 255, .06);
}

.podium__item--gold .podium__pedestal {
    height: 104px;
    background: linear-gradient(180deg, rgba(255, 215, 0, .10), rgba(255, 215, 0, .01));
}

.podium__item--silver .podium__pedestal {
    height: 74px;
    background: linear-gradient(180deg, rgba(192, 192, 192, .07), rgba(192, 192, 192, .01));
}

.podium__item--bronze .podium__pedestal {
    height: 54px;
    background: linear-gradient(180deg, rgba(205, 127, 50, .07), rgba(205, 127, 50, .01));
}

/* Ranking Table */
.ranking-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.ranking-table th {
    text-align: left;
    padding: var(--s-3);
    color: var(--text-muted);
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    border-bottom: 1px solid var(--border);
}

.ranking-table td {
    padding: var(--s-3);
    border-bottom: 1px solid var(--border);
    font-size: 0.8125rem;
}

.ranking-table tr:last-child td {
    border-bottom: none;
}

.ranking-table tr {
    transition: background var(--duration) var(--ease);
}

.ranking-table tr:hover td {
    background: rgba(255, 255, 255, .02);
}

.ranking-table__me td {
    background: rgba(1, 172, 2, .04);
    border-color: rgba(1, 172, 2, .08);
}

.ranking-table__position {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-muted);
    width: 40px;
}

.ranking-table__prize {
    font-size: 0.6875rem;
    color: var(--gold);
    font-weight: 600;
}

/* ==========================================================================
   CHECK-IN
   ========================================================================== */
.checkin-results {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}

.checkin-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    padding: var(--s-4);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: all var(--duration) var(--ease);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

.checkin-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.checkin-card__info {
    flex: 1;
    min-width: 0;
}

.checkin-card__name {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkin-card__email {
    color: var(--text-muted);
    font-size: 0.6875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.checkin-card__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    padding: 4px var(--s-3);
    border-radius: var(--r-full);
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    white-space: nowrap;
    text-transform: uppercase;
}

.checkin-card__badge--checked {
    background: rgba(1, 172, 2, .08);
    color: var(--brand-light);
    border: 1px solid rgba(1, 172, 2, .15);
}

.checkin-card__badge--pending {
    background: rgba(240, 168, 48, .06);
    color: var(--warning);
    border: 1px solid rgba(240, 168, 48, .12);
}

/* ==========================================================================
   NOTIFICATIONS
   ========================================================================== */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}

.notification-card {
    display: flex;
    gap: var(--s-4);
    padding: var(--s-4) var(--s-5);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: all var(--duration) var(--ease);
    box-shadow: var(--shadow-sm);
}

.notification-card--unread {
    border-left: 3px solid var(--brand);
    background: rgba(1, 172, 2, .03);
}

.notification-card__icon {
    font-size: 1.375rem;
    flex-shrink: 0;
    line-height: 1;
    padding-top: 2px;
}

.notification-card__body {
    flex: 1;
    min-width: 0;
}

.notification-card__title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.notification-card__message {
    color: var(--text-muted);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.notification-card__time {
    color: var(--text-muted);
    font-size: 0.5625rem;
    margin-top: var(--s-2);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   PROMO EDITOR
   ========================================================================== */
.promo-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-5);
    align-items: start;
}

.upload-area {
    position: relative;
    border: 2px dashed rgba(255, 255, 255, .07);
    border-radius: var(--r-md);
    padding: var(--s-10) var(--s-5);
    text-align: center;
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease);
    background: rgba(6, 6, 18, .5);
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: rgba(1, 172, 2, .3);
    background: rgba(1, 172, 2, .03);
    box-shadow: inset 0 0 32px rgba(1, 172, 2, .03);
}

.upload-area__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-area__icon {
    font-size: 2.5rem;
    margin-bottom: var(--s-3);
}

.upload-area__text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.upload-area__hint {
    color: var(--text-muted);
    font-size: 0.6875rem;
}

.upload-area__preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-2);
}

.upload-area__preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--r-md);
    border: 2px solid var(--brand);
    box-shadow: 0 0 16px var(--brand-glow);
}

.promo-preview__frame {
    background: var(--bg-surface);
    border-radius: var(--r-md);
    overflow: hidden;
    aspect-ratio: 9/16;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.promo-preview__frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ==========================================================================
   SECTION HEADER
   ========================================================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--s-5);
}

.section-header__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.text-inverse {
    color: var(--text-inverse);
}

/* Utilities */
.pt-0 {
    padding-top: 0 !important;
}

/* ==========================================================================
   PROGRESS BAR
   ========================================================================== */
.progress-bar {
    width: 100%;
}

.progress-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-dark), var(--brand), var(--brand-light), var(--cyan));
    background-size: 200% 100%;
    border-radius: var(--r-full);
    transition: width .8s var(--ease);
    position: relative;
    box-shadow: 0 0 10px var(--brand-glow);
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.progress-bar__fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .25) 50%, transparent 100%);
    animation: shimmer 2.5s infinite;
}

/* ==========================================================================
   EMPTY STATES — Premium
   ========================================================================== */
.empty-state {
    text-align: center;
    padding: var(--s-12) var(--s-6);
}

.empty-state__icon {
    font-size: 3.5rem;
    margin-bottom: var(--s-5);
    display: inline-block;
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .3));
}

.empty-state__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--s-3);
}

.empty-state__text {
    color: var(--text-muted);
    font-size: 0.8125rem;
    max-width: 280px;
    margin: 0 auto var(--s-6);
    line-height: 1.6;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-150%);
    }

    100% {
        transform: translateX(250%);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 var(--brand-glow);
    }

    50% {
        box-shadow: 0 0 0 10px transparent;
    }
}

.animate-fade-in {
    opacity: 0;
    animation: fadeIn .5s var(--ease) forwards;
}

.animate-fade-in-up {
    opacity: 0;
    animation: fadeInUp .6s var(--ease) forwards;
}

.animate-delay-1 {
    animation-delay: .05s;
}

.animate-delay-2 {
    animation-delay: .10s;
}

.animate-delay-3 {
    animation-delay: .15s;
}

.animate-delay-4 {
    animation-delay: .20s;
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.counter-done {
    animation: pulseGlow .5s var(--ease);
}

/* ==========================================================================
   BOTTOM NAV BADGE
   ========================================================================== */
.bottom-nav__badge {
    position: absolute;
    top: 4px;
    right: 50%;
    transform: translateX(14px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--danger);
    color: white;
    font-size: 0.5625rem;
    font-weight: 700;
    border-radius: var(--r-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(240, 68, 88, .4);
    line-height: 1;
}

/* ==========================================================================
   BADGES (inline)
   ========================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--r-full);
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge--success {
    background: rgba(1, 172, 2, .1);
    color: var(--brand-light);
    border: 1px solid rgba(1, 172, 2, .2);
}

.badge--muted {
    background: rgba(255, 255, 255, .04);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.badge--danger {
    background: rgba(240, 68, 88, .08);
    color: var(--danger);
    border: 1px solid rgba(240, 68, 88, .15);
}

.badge--brand {
    background: rgba(1, 172, 2, .12);
    color: var(--brand-light);
    border: 1px solid rgba(1, 172, 2, .2);
    font-size: 0.5rem;
    margin-left: var(--s-1);
}

/* Badges de rol */
.badge--general {
    background: rgba(255, 255, 255, .06);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, .1);
    font-size: 0.5rem;
    margin-left: var(--s-1);
}

.badge--gold {
    background: linear-gradient(135deg, rgba(192, 192, 192, .15), rgba(160, 160, 180, .1));
    color: #D0D0E0;
    border: 1px solid rgba(192, 192, 192, .3);
    font-size: 0.5rem;
    margin-left: var(--s-1);
    text-shadow: 0 0 8px rgba(192, 192, 192, .3);
}

.badge--vip {
    background: linear-gradient(135deg, rgba(255, 215, 0, .18), rgba(255, 180, 0, .1));
    color: #FFD700;
    border: 1px solid rgba(255, 215, 0, .35);
    font-size: 0.5rem;
    margin-left: var(--s-1);
    text-shadow: 0 0 8px rgba(255, 215, 0, .4);
}


/* ==========================================================================
   TABS
   ========================================================================== */
.tabs__header {
    display: flex;
    gap: 2px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 3px;
    margin-bottom: var(--s-5);
}

.tabs__tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    padding: var(--s-3) var(--s-4);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--r-sm);
    transition: all var(--duration) var(--ease);
}

.tabs__tab:hover {
    color: var(--text-secondary);
}

.tabs__tab--active {
    background: rgba(1, 172, 2, .08);
    color: var(--brand-light);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}

.tabs__panel {
    display: none;
}

.tabs__panel--active {
    display: block;
}

/* ==========================================================================
   TICKET ROWS
   ========================================================================== */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}

.ticket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    padding: var(--s-4);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: all var(--duration) var(--ease);
}

.ticket-row:hover {
    border-color: var(--border-hover);
}

.ticket-row__info {
    flex: 1;
    min-width: 0;
}

.ticket-row__code {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.ticket-row--used .ticket-row__code {
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: .6;
}

.ticket-row--cancelled .ticket-row__code {
    color: var(--danger);
    text-decoration: line-through;
    opacity: .6;
}

.ticket-row__status {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    flex-wrap: wrap;
}

.ticket-row__claimed {
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

.ticket-row__actions {
    display: flex;
    gap: var(--s-2);
    flex-shrink: 0;
}

/* ==========================================================================
   REFERRAL ROWS
   ========================================================================== */
.referrals-list {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.referral-row {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    padding: var(--s-4);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: all var(--duration) var(--ease);
}

.referral-row:hover {
    border-color: var(--border-hover);
}

.referral-row__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
    flex-shrink: 0;
}

.referral-row__info {
    flex: 1;
    min-width: 0;
}

.referral-row__name {
    font-weight: 600;
    font-size: 0.875rem;
}

.referral-row__date {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 1px;
}

/* ==========================================================================
   STATS GRID — 3 columns variant
   ========================================================================== */
.stats-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ==========================================================================
   RANKING LIST
   ========================================================================== */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding-bottom: calc(var(--s-20) + var(--bottom-nav-h));
}

.ranking-row {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-4);
    background: var(--bg-card);
    border: 1px solid rgba(1, 172, 2, 0.2);
    /* Green border */
    border-radius: var(--r-md);
    transition: all var(--duration) var(--ease);
    cursor: pointer;
}

.ranking-row:hover {
    border-color: rgba(1, 172, 2, 0.5);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.ranking-row--me {
    border: 2px solid rgba(1, 172, 2, 0.7);
    border-left: 4px solid rgb(1, 172, 2);
    background: rgba(1, 172, 2, 0.15);
    box-shadow: 0 0 24px rgba(1, 172, 2, 0.22), inset 0 0 20px rgba(1, 172, 2, 0.06);
    animation: myRowPulse 3s ease-in-out infinite;
}

.ranking-row--me:hover {
    border-color: rgba(1, 172, 2, 1);
}

@keyframes myRowPulse {

    0%,
    100% {
        box-shadow: 0 0 24px rgba(1, 172, 2, 0.22), inset 0 0 20px rgba(1, 172, 2, 0.06);
    }

    50% {
        box-shadow: 0 0 32px rgba(1, 172, 2, 0.30), inset 0 0 24px rgba(1, 172, 2, 0.08);
    }
}

.ranking-row__position {
    width: 32px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    flex-shrink: 0;
}

.ranking-row__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card-solid);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    overflow: hidden;
}

.ranking-row__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-row__info {
    flex: 1;
    min-width: 0;
}

.ranking-row__name {
    font-weight: 600;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    gap: var(--s-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-row__stats {
    display: flex;
    gap: var(--s-4);
    flex-shrink: 0;
}

.ranking-row__stat {
    text-align: center;
}

.ranking-row__stat-value {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.2;
}

.ranking-row__stat-label {
    display: block;
    font-size: 0.5rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

/* ==========================================================================
   RANKING — My Position (fixed bar)
   ========================================================================== */
.ranking-my-position {
    position: fixed;
    bottom: var(--bottom-nav-h);
    left: 0;
    right: 0;
    z-index: 500;
    padding: 0 var(--s-4);
}

.ranking-my-position__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--s-3) var(--s-5);
    background: rgba(1, 172, 2, .08);
    border: 1px solid rgba(1, 172, 2, .15);
    border-radius: var(--r-md);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg);
}

.ranking-my-position__left {
    display: flex;
    align-items: center;
    gap: var(--s-3);
}

.ranking-my-position__pos {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--brand-light);
}

.ranking-my-position__label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.ranking-my-position__right {
    display: flex;
    align-items: center;
}

.ranking-my-position__stat {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.8125rem;
    color: var(--brand-light);
}

/* ==========================================================================
   MODAL — Profile overlay
   ========================================================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s-6);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease);
}

.modal--open,
dialog.modal[open] {
    opacity: 1;
    pointer-events: auto;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal__content {
    position: relative;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-hover);
    border-radius: var(--r-xl);
    padding: var(--s-10) var(--s-6);
    text-align: center;
    max-width: 340px;
    width: 100%;
    transform: scale(0.95) translateY(10px);
    transition: transform .3s var(--ease-spring);
    box-shadow: var(--shadow-xl);
}

.modal--open .modal__content,
dialog.modal[open] .modal__content {
    transform: scale(1) translateY(0);
}

.modal__close {
    position: absolute;
    top: var(--s-3);
    right: var(--s-3);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--s-2);
    border-radius: var(--r-sm);
    transition: all var(--duration) var(--ease);
}

.modal__close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, .04);
}

.modal__avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    margin: 0 auto var(--s-5);
    overflow: hidden;
}

.modal__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: var(--s-2);
}

.modal__bio {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    line-height: 1.6;
}

/* Dialog nativo: resetear estilos del navegador */
dialog.modal {
    border: none;
    background: transparent;
    max-width: none;
    max-height: none;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
}

dialog.modal::backdrop {
    background: rgba(0, 0, 0, .7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Modal de formulario (asignar invitado, etc.) */
dialog.modal .modal__content {
    text-align: left;
    max-width: 420px;
    padding: var(--s-6);
}

dialog.modal .modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--s-4);
}

dialog.modal .modal__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-primary);
}

dialog.modal .modal__body .form-group:last-child {
    margin-bottom: 0;
}


/* ==========================================================================
   PROFILE HEADER
   ========================================================================== */
.profile-header {
    text-align: center;
    padding: var(--s-8) 0;
}

.profile-header__avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    color: white;
    margin: 0 auto var(--s-4);
    overflow: hidden;
    border: 3px solid rgba(1, 172, 2, .2);
    box-shadow: 0 0 32px rgba(1, 172, 2, .12);
}

.profile-header__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-header__name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
    margin-bottom: 2px;
}

.profile-header__email {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-bottom: var(--s-3);
}

.profile-header__rank {
    display: inline-flex;
    padding: var(--s-2) var(--s-4);
    background: rgba(1, 172, 2, .06);
    border: 1px solid rgba(1, 172, 2, .12);
    border-radius: var(--r-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--brand-light);
}

/* ==========================================================================
   PROFILE BIO
   ========================================================================== */
.profile-bio {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

.profile-edit-form .form-input--textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: var(--s-1);
}

/* ==========================================================================
   PROFILE ACTIONS
   ========================================================================== */
.profile-actions {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    margin-top: var(--s-6);
}

.profile-action-card {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    padding: var(--s-4) var(--s-5);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--duration) var(--ease);
}

.profile-action-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.profile-action-card__icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.profile-action-card__info {
    flex: 1;
    min-width: 0;
}

.profile-action-card__title {
    font-weight: 600;
    font-size: 0.875rem;
}

.profile-action-card__subtitle {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 1px;
}

/* ==========================================================================
   PROFILE UPGRADE WALLET
   ========================================================================== */
.upgrade-wallet {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}

.upgrade-wallet__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    padding: var(--s-4);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, 0.02);
}

.upgrade-wallet__person {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    min-width: 0;
}

.upgrade-wallet__avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--r-full);
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    flex-shrink: 0;
}

.upgrade-wallet__info {
    min-width: 0;
}

.upgrade-wallet__name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--s-2);
    font-weight: 700;
    font-size: 0.875rem;
}

.upgrade-wallet__meta {
    color: var(--text-muted);
    font-size: 0.6875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}

.upgrade-wallet__actions {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    flex-shrink: 0;
}

.upgrade-wallet__actions form {
    margin: 0;
}

.upgrade-modal__target {
    margin: 0 0 var(--s-4);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
}

.upgrade-modal__availability {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-3);
    margin-bottom: var(--s-4);
}

.upgrade-modal__counter {
    padding: var(--s-4);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: rgba(255, 255, 255, 0.03);
}

.upgrade-modal__counter span,
.upgrade-modal__option small {
    display: block;
    color: var(--text-muted);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.upgrade-modal__counter strong {
    display: block;
    margin-top: var(--s-1);
    font-size: 2rem;
    line-height: 1;
}

.upgrade-modal__counter--gold strong {
    color: var(--gold);
}

.upgrade-modal__counter--vip strong {
    color: var(--cyan);
}

.upgrade-modal__options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-3);
}

.upgrade-modal__option {
    width: 100%;
    min-height: 96px;
    padding: var(--s-4);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--bg-input);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: border-color var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
}

.upgrade-modal__option:hover:not(:disabled),
.upgrade-modal__option--selected {
    transform: translateY(-1px);
    border-color: var(--brand);
    background: rgba(0, 255, 65, 0.08);
}

.upgrade-modal__option:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.upgrade-modal__option span {
    display: block;
    margin-bottom: var(--s-2);
    font-size: 1.125rem;
    font-weight: 800;
}

.upgrade-wallet__history {
    margin-top: var(--s-5);
    padding-top: var(--s-4);
    border-top: 1px solid var(--border);
}

.upgrade-wallet__history-title {
    color: var(--text-muted);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--s-2);
}

.upgrade-wallet__history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: var(--s-2) 0;
}

.upgrade-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    margin-bottom: var(--s-6);
    padding: var(--s-4) var(--s-5);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--bg-card);
}

.upgrade-summary__label,
.upgrade-summary__counts {
    display: flex;
    align-items: center;
    gap: var(--s-2);
}

.upgrade-summary__label {
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.875rem;
}

.upgrade-summary__label i {
    width: 18px;
    height: 18px;
    color: var(--gold);
}

/* ==========================================================================
   NOTIFICATION CARD (updated)
   ========================================================================== */
.notification-card__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-light);
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--brand-glow);
}

/* ==========================================================================
   PROGRESS BAR (Backoffice — Ticket Sales Goal)
   ========================================================================== */
.card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--s-5);
    gap: var(--s-4);
}

.card__title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.card__subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.progress-counter {
    text-align: right;
    font-family: var(--font-mono);
    line-height: 1;
}

.progress-counter__value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--brand-light);
}

.progress-counter__sep {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin: 0 2px;
}

.progress-counter__goal {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.progress-bar__track {
    position: relative;
    width: 100%;
    height: 18px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.progress-bar__fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: linear-gradient(90deg, var(--brand), var(--brand-light), var(--cyan));
    border-radius: 12px;
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
    animation: progressPulse 2s ease-in-out infinite;
}

.progress-bar__glow {
    position: absolute;
    top: -4px;
    left: 0;
    height: calc(100% + 8px);
    width: var(--progress, 0%);
    background: linear-gradient(90deg, transparent 60%, var(--brand-glow));
    border-radius: 12px;
    filter: blur(8px);
    opacity: 0.5;
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes progressPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

.progress-bar__labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--s-2);
}

.progress-bar__pct {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--brand-light);
}

.progress-bar__remaining {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* Milestones */
.progress-milestones {
    display: flex;
    justify-content: space-between;
    margin-top: var(--s-4);
    padding-top: var(--s-3);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.progress-milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.progress-milestone__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.progress-milestone--done .progress-milestone__dot {
    background: var(--brand-light);
    border-color: var(--brand);
    box-shadow: 0 0 8px var(--brand-glow);
}

.progress-milestone--done {
    color: var(--brand-light);
}

/* Card glow variant */
.card--glow {
    border: 1px solid rgba(74 222 128 / 0.1);
    box-shadow: 0 0 30px rgba(74 222 128 / 0.05);
}

/* Stats grid 3 columns */
.stats-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ==========================================================================
   RANKING TOGGLE (Backoffice)
   ========================================================================== */
.ranking-toggle__options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-3);
    margin-bottom: var(--s-4);
}

.ranking-toggle__option {
    padding: var(--s-4);
    border-radius: var(--r-lg);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.ranking-toggle__option--active {
    opacity: 1;
    background: rgba(74 222 128 / 0.08);
    border-color: rgba(74 222 128 / 0.3);
    box-shadow: 0 0 20px rgba(74 222 128 / 0.08);
}

.ranking-toggle__icon {
    font-size: 1.5rem;
    margin-bottom: var(--s-1);
}

.ranking-toggle__label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.ranking-toggle__desc {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* ==========================================================================
   RANKING STICKY BAR (User's own position — bottom of ranking page)
   ========================================================================== */
.ranking-sticky {
    position: fixed;
    bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
    left: 0;
    right: 0;
    z-index: 90;
    padding: var(--s-3) var(--s-4);
    background: rgba(8 8 24 / 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(74 222 128 / 0.15);
    box-shadow: 0 -4px 20px rgba(0 0 0 / 0.4);
}

.ranking-sticky__inner {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    max-width: 600px;
    margin: 0 auto;
}

.ranking-sticky__position {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--brand-light);
    min-width: 48px;
    text-align: center;
}

.ranking-sticky__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--bg-primary);
    flex-shrink: 0;
    overflow: hidden;
}

.ranking-sticky__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-sticky__info {
    flex: 1;
    min-width: 0;
}

.ranking-sticky__name {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-sticky__label {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ranking-sticky__stats {
    display: flex;
    gap: var(--s-4);
    flex-shrink: 0;
}

.ranking-sticky__stat {
    text-align: center;
}

.ranking-sticky__stat-value {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-light);
}

.ranking-sticky__stat-label {
    font-size: 0.5625rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ==========================================================================
   RESPONSIVE — Tablet (768px+)
   ========================================================================== */
@media (min-width: 768px) {
    :root {
        --nav-h: 64px;
    }

    .navbar__container {
        padding: 0 var(--s-8);
    }

    .navbar__toggle {
        display: none;
    }

    .mobile-menu {
        display: none !important;
    }

    .bottom-nav {
        display: none;
    }

    .navbar__links {
        display: flex;
    }

    .navbar__user-name {
        display: inline;
    }

    .navbar__avatar {
        display: flex;
    }

    .main-content {
        padding-top: calc(var(--nav-h) + var(--s-12));
        padding-bottom: var(--s-16);
    }

    .container {
        padding: 0 var(--s-8);
    }

    .hero {
        margin: calc(-1 * var(--s-12)) calc(-1 * var(--s-8)) var(--s-10);
        padding: var(--s-12) var(--s-8);
        border-radius: 0;
    }

    .page-header {
        margin-bottom: var(--s-10);
    }

    .page-header__title {
        font-size: 2rem;
    }

    .page-header__subtitle {
        font-size: 0.875rem;
    }

    .hero__greeting {
        font-size: 2rem;
    }

    .card {
        padding: var(--s-8);
    }

    .auth-card {
        padding: var(--s-12) var(--s-10);
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--s-4);
    }

    .stats-grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .stat-card {
        padding: var(--s-5) var(--s-6);
    }

    .stat-card__icon {
        width: 46px;
        height: 46px;
        font-size: 1.125rem;
    }

    .stat-card__value {
        font-size: 2rem;
    }

    .stat-card__label {
        font-size: 0.625rem;
    }

    .referral-section {
        grid-template-columns: 1fr 1fr;
        gap: var(--s-6);
    }

    .qr-image {
        width: 180px;
        height: 180px;
    }

    .referral-link-box {
        padding: var(--s-2) var(--s-4);
    }

    .referral-link-box__url {
        font-size: 0.75rem;
    }

    .tickets-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .promo-layout {
        grid-template-columns: 1fr 380px;
    }

    .alerts-container {
        left: auto;
        right: var(--s-8);
        max-width: 400px;
    }

    .form-input {
        font-size: 0.875rem;
        padding: 0.75rem 0.875rem;
    }

    .ranking-my-position {
        bottom: 0;
    }

    .ranking-list {
        padding-bottom: var(--s-20);
    }

    .ranking-row {
        padding: var(--s-4) var(--s-5);
    }

    .ranking-row__avatar {
        width: 48px;
        height: 48px;
        font-size: 0.875rem;
    }

    .profile-header__avatar {
        width: 104px;
        height: 104px;
        font-size: 2.5rem;
    }

    .profile-header__name {
        font-size: 1.75rem;
    }
}

/* ==========================================================================
   RESPONSIVE — Desktop (1024px+)
   ========================================================================== */
@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.text-brand {
    color: var(--brand-light);
}

.text-cyan {
    color: var(--cyan);
}

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

.text-secondary {
    color: var(--text-secondary);
}

.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.8125rem;
}

.text-xs {
    font-size: 0.6875rem;
}

.mt-4 {
    margin-top: var(--s-4);
}

.mt-6 {
    margin-top: var(--s-6);
}

.mt-8 {
    margin-top: var(--s-8);
}

.mb-4 {
    margin-bottom: var(--s-4);
}

.mb-6 {
    margin-bottom: var(--s-6);
}

.font-display {
    font-family: var(--font-display);
}

.font-mono {
    font-family: var(--font-mono);
}

.font-bold {
    font-weight: 700;
}

.text-gradient {
    background: linear-gradient(135deg, var(--brand-light), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-gold {
    background: linear-gradient(135deg, var(--gold), #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   STICKY RANKING BAR (Elegant)
   ========================================================================== */
.ranking-sticky {
    position: fixed;
    bottom: var(--bottom-nav-h);
    /* Just above the bottom nav */
    left: 0;
    right: 0;
    background: rgba(8, 8, 28, 0.85);
    /* Matches bg-surface but slightly transparent */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 100;
    /* Above the list but below modals/nav */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    transition: transform var(--duration) var(--ease);
}

.ranking-sticky__inner {
    max-width: var(--max-w-sm);
    margin: 0 auto;
    padding: var(--s-3) var(--s-4);
    display: flex;
    align-items: center;
    gap: var(--s-3);
}

.ranking-sticky__position {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.125rem;
    color: var(--brand-light);
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.ranking-sticky__avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--r-full);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.ranking-sticky__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-sticky__info {
    flex: 1;
    min-width: 0;
}

.ranking-sticky__name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-sticky__label {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.ranking-sticky__stats {
    display: flex;
    gap: var(--s-4);
    text-align: right;
    flex-shrink: 0;
}

.ranking-sticky__stat {
    display: flex;
    flex-direction: column;
}

.ranking-sticky__stat-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.ranking-sticky__stat-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (min-width: 768px) {
    .ranking-sticky {
        bottom: 0;
        /* No bottom nav on desktop */
        border-radius: var(--r-lg) var(--r-lg) 0 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: var(--max-w-sm);
        border-left: 1px solid rgba(255, 255, 255, 0.05);
        border-right: 1px solid rgba(255, 255, 255, 0.05);
    }
}

/* ==========================================================================
   ALERTS (flash messages)
   ========================================================================== */
.alert {
    padding: var(--s-3) var(--s-4);
    border-radius: var(--r-md);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.5;
    border: 1px solid transparent;
    animation: alertSlideIn .3s var(--ease);
}

.alert--success {
    background: rgba(1, 172, 2, 0.08);
    color: var(--brand-light);
    border-color: rgba(1, 172, 2, 0.15);
}

.alert--danger {
    background: rgba(240, 68, 88, 0.08);
    color: var(--danger);
    border-color: rgba(240, 68, 88, 0.15);
}

.alert--info {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border-color: var(--border);
}

/* Spin animation for loading buttons */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   RESPONSIVE - Mobile Fixes (< 768px)
   ========================================================================== */
@media (max-width: 767px) {
    .stats-grid--3 {
        gap: var(--s-2);
    }

    .stats-grid--3 .stat-card {
        padding: var(--s-3) var(--s-1);
    }

    .stats-grid--3 .stat-card__content {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: var(--s-1);
    }

    .stats-grid--3 .stat-card__value {
        font-size: 1.25rem;
    }

    .stats-grid--3 .stat-card__label {
        font-size: 0.5rem;
    }

    .ticket-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .ticket-row__actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: var(--s-3);
    }

    .ticket-row__actions .btn {
        flex: 1;
    }

    .upgrade-wallet__row {
        align-items: flex-start;
        flex-direction: column;
    }

    .upgrade-wallet__person,
    .upgrade-wallet__actions {
        width: 100%;
    }

    .upgrade-wallet__actions .btn {
        flex: 1;
    }

    .upgrade-wallet__meta {
        max-width: 220px;
    }

    .upgrade-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .upgrade-summary__counts {
        width: 100%;
    }

    .upgrade-modal__availability,
    .upgrade-modal__options {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   VIDEO EMBED — Responsive 16:9
   ========================================================================== */
.video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: var(--r-md);
    background: var(--bg-input);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, .3);
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--r-md);
}

/* ==========================================================================
   STEPS LIST — Cómo funciona
   ========================================================================== */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: var(--s-4);
    padding: var(--s-4);
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, .02);
    border: 1px solid var(--border);
    transition: all var(--duration) var(--ease);
}

.step-item:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, .03);
    transform: translateX(4px);
}

.step-item__number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-full);
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: white;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.875rem;
    box-shadow: 0 0 16px var(--brand-glow);
}

.step-item__content {
    flex: 1;
    min-width: 0;
}

.step-item__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.step-item__text {
    color: var(--text-muted);
    font-size: 0.8125rem;
    line-height: 1.5;
}

/* ==========================================================================
   NETWORKING VIP
   ========================================================================== */
.networking-notice {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-4);
    margin-bottom: var(--s-6);
    background: var(--brand-subtle);
    border: 1px solid var(--brand-glow);
    border-radius: var(--r-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    text-decoration: none;
}

.networking-notice span {
    flex: 1;
}

.networking-notice svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--brand);
}

/* El filtro va por encima de la cuadrícula: los dos tienen animación de
   entrada y cada uno forma su propia capa, así que sin esto las tarjetas
   tapan el menú abierto. */
.networking-filter {
    position: relative;
    z-index: 20;
    margin-bottom: var(--s-6);
}

/* Lo mismo dentro de una .card (backdrop-filter): la tarjeta que contiene un
   desplegable abierto sube por encima de las siguientes. */
.card:has(.networking-dropdown[open]) {
    z-index: 20;
}

.networking-dropdown {
    position: relative;
    width: 100%;
}

.networking-dropdown__trigger {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    height: 44px;
    padding: 0 var(--s-4);
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: var(--r-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease);
}

.networking-dropdown__trigger::-webkit-details-marker {
    display: none;
}

.networking-dropdown__trigger:hover,
.networking-dropdown[open] .networking-dropdown__trigger {
    border-color: var(--border-glow);
}

.networking-dropdown__trigger:focus-visible {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-subtle);
}

.networking-dropdown__label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.networking-dropdown__icon,
.networking-dropdown__chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--text-muted);
}

.networking-dropdown__chevron {
    transition: transform var(--duration) var(--ease);
}

.networking-dropdown[open] .networking-dropdown__chevron {
    transform: rotate(180deg);
}

/* Con un filtro aplicado, el botón lo deja ver. */
.networking-dropdown--active .networking-dropdown__trigger {
    background: var(--brand-subtle);
    border-color: var(--brand-glow);
}

.networking-dropdown--active .networking-dropdown__icon {
    color: var(--brand);
}

.networking-dropdown__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-glow);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    animation: networking-dropdown-in 140ms var(--ease);
}

@keyframes networking-dropdown-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.networking-dropdown__option {
    width: 100%;
    margin: 0;
    background: none;
    border: 0;
    font-family: var(--font-body);
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    padding: 10px var(--s-3);
    border-radius: var(--r-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-decoration: none;
    transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}

.networking-dropdown__option:hover,
.networking-dropdown__option:focus-visible {
    outline: none;
    background: var(--highlight-hover);
    color: var(--text-primary);
}

.networking-dropdown__option.is-selected {
    background: var(--highlight-active);
    color: var(--text-primary);
    font-weight: 500;
}

.networking-dropdown__option svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--brand);
    visibility: hidden;
}

.networking-dropdown__option.is-selected svg {
    visibility: visible;
}

.networking-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-3);
}

.networking-card {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    padding: var(--s-5);
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: var(--r-lg);
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}

/* Foco verde que sigue al puntero: capa detrás del contenido que aparece al
   pasar por encima. networking.js escribe la posición en --mx / --my. */
.networking-card,
.match-card {
    position: relative;
    isolation: isolate;
}

.networking-card::before,
.match-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background:
        radial-gradient(360px circle at var(--mx, 0%) var(--my, 100%), rgba(1, 172, 2, 0.24), transparent 65%);
    opacity: 0;
    transition: opacity var(--duration) var(--ease);
    pointer-events: none;
}

.networking-card:hover::before,
.match-card:not(.match-card--skeleton):hover::before {
    opacity: 1;
}

.networking-card:hover {
    border-color: var(--border-glow);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.networking-card:hover .networking-card__cta {
    color: var(--brand);
}

.networking-card__top {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    min-width: 0;
}

.networking-card__who {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

.networking-card__name {
    max-width: 100%;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.0625rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.networking-card__muted {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.networking-card__bio {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.networking-card__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    margin-top: auto;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--duration) var(--ease);
}

.networking-card__cta svg {
    width: 14px;
    height: 14px;
}

.networking-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: var(--s-6);
}

.networking-pagination__page,
.networking-pagination__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--s-2);
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease), color var(--duration) var(--ease);
}

a.networking-pagination__page:hover,
a.networking-pagination__step:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.networking-pagination__page.is-current {
    border-color: var(--border-glow);
    background: var(--bg-card);
    color: var(--text-primary);
}

.networking-pagination__step.is-disabled {
    color: var(--text-muted);
    opacity: 0.4;
}

.networking-pagination__step svg {
    width: 16px;
    height: 16px;
}

.networking-pagination__gap {
    min-width: 20px;
    text-align: center;
    color: var(--text-muted);
}

.networking-tag {
    display: inline-block;
    max-width: 100%;
    padding: 2px 10px;
    border: 1px solid var(--border-glow);
    border-radius: var(--r-full);
    font-size: 0.75rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.networking-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.125rem;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    flex-shrink: 0;
    overflow: hidden;
}

.networking-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.networking-avatar--sm {
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
}

.networking-avatar--lg {
    width: 96px;
    height: 96px;
    font-size: 1.75rem;
    margin: 0 auto var(--s-4);
}

.networking-back {
    margin-top: var(--s-4);
}

.networking-back:hover {
    background: var(--highlight-hover);
    color: var(--brand-light);
}

.networking-profile__chat {
    margin-top: var(--s-5);
}

.networking-profile__activity {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-top: var(--s-2);
}

.networking-facts {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    margin-top: var(--s-4);
    padding-top: var(--s-4);
    border-top: 1px solid var(--border);
}

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

.networking-facts__privacy {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.networking-facts__privacy svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Casilla con texto: la usa la privacidad del contacto en el perfil. */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: var(--s-3);
    margin-bottom: var(--s-5);
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.form-check input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex-shrink: 0;
    accent-color: var(--brand);
    cursor: pointer;
}

.form-check strong {
    font-weight: 500;
}

.form-check .form-hint {
    display: block;
    margin-top: 2px;
}

.networking-facts__caption--divider {
    margin: var(--s-6) 0 var(--s-4);
    padding-top: var(--s-4);
    border-top: 1px solid var(--border);
}

.networking-facts__row {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    word-break: break-all;
}

a.networking-facts__row:hover {
    color: var(--brand);
}

.networking-facts__row svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--text-muted);
}

/* --- Chat ------------------------------------------------------------- */
/* La página del chat ocupa justo la pantalla: se desplazan los mensajes, no
   la página. Sus márgenes van en variables porque js/chat-bubble.js los
   usa para que el bocadillo acabe exactamente donde se pinta el chat. */
:root {
    --chat-top: calc(var(--nav-h) + var(--s-6));
    --chat-bottom: calc(var(--bottom-nav-h) + var(--s-3));
}

/* Fijo a la parte visible de la pantalla: js/chat.js pone su altura
   (--chat-vh) y su desplazamiento (--chat-vt) según el visualViewport. Así,
   al cerrar el teclado, el chat vuelve a su sitio aunque el móvil haya dejado
   la página desplazada o 100dvh sin actualizar (pasa en iPhone). */
.main-content--chat {
    position: fixed;
    top: var(--chat-vt, 0px);
    left: 0;
    right: 0;
    min-height: 0;
    padding-top: var(--chat-top);
    padding-bottom: var(--chat-bottom);
}

/* La página del chat no debe tener scroll: body mide 100vh, que en móvil es
   más que la pantalla visible, y con ese margen el móvil desplaza la página
   al abrir el teclado y al cerrarlo la deja movida. */
html:has(.main-content--chat),
body:has(.main-content--chat) {
    overflow: hidden;
}

/* Si al abrir el teclado el iPhone desplaza la vista, el menú de arriba la
   sigue igual que el chat: si no, se queda fuera de la pantalla y el chat
   parece encoger desde arriba en vez de desde abajo. */
body:has(.main-content--chat) .navbar {
    top: var(--chat-vt, 0px);
}

/* Escribiendo en el móvil, la barra inferior sobra: en Android quedaría
   encima del teclado quitando sitio a los mensajes. */
@media (max-width: 767px) {
    body:has(#chat-input:focus) .bottom-nav {
        display: none;
    }

    body:has(#chat-input:focus) {
        --chat-bottom: var(--s-3);
    }
}

.chat {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--chat-top) - var(--chat-bottom));
    height: calc(var(--chat-vh, 100dvh) - var(--chat-top) - var(--chat-bottom));
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.chat__header {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-3) var(--s-4);
    border-bottom: 1px solid var(--border-hover);
}

.chat__back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: background var(--duration) var(--ease);
}

/* Sin esto se aplicaría el hover cian de los enlaces (a:hover). */
.chat__back:hover,
.chat__back:focus-visible {
    outline: none;
    background: var(--highlight-hover);
    color: var(--brand-light);
}

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

.chat__who:hover .chat__name {
    color: var(--brand-light);
}

.chat__back svg {
    width: 18px;
    height: 18px;
}

.chat__who {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    min-width: 0;
    color: var(--text-primary);
    text-decoration: none;
}

.chat__who-text {
    min-width: 0;
}

.chat__name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat__meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chat__scroll {
    flex: 1;
    overflow-y: auto;
    padding: var(--s-4);
    overscroll-behavior: contain;
}

.chat__messages {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.chat__empty {
    margin: var(--s-10) auto 0;
    max-width: 260px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.chat__messages:has(.chat-msg) + .chat__empty {
    display: none;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 78%;
}

.chat-msg--mine {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-msg__bubble {
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px 16px 16px 4px;
    font-size: 0.9375rem;
    line-height: 1.45;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.chat-msg--mine .chat-msg__bubble {
    background: var(--brand-dark);
    border-radius: 16px 16px 4px 16px;
    color: #fff;
}

.chat-msg__time {
    margin: 3px 4px 0;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.chat__composer {
    display: flex;
    align-items: flex-end;
    gap: var(--s-2);
    padding: var(--s-3);
    border-top: 1px solid var(--border-hover);
}

.chat__composer textarea {
    flex: 1;
    min-height: 44px;
    max-height: 140px;
    padding: 11px var(--s-4);
    background: var(--bg-input);
    border: 1px solid var(--border-hover);
    border-radius: 22px;
    color: var(--text-primary);
    font-family: var(--font-body);
    /* 16 px en móvil: con menos, iOS amplía la página al escribir y no la
       devuelve a su tamaño al cerrar el teclado. */
    font-size: 1rem;
    line-height: 1.4;
    resize: none;
    outline: none;
    overflow-y: hidden;
    transition: border-color var(--duration) var(--ease);
}

.chat__composer textarea::placeholder {
    color: var(--text-muted);
}

.chat__composer textarea:focus {
    border-color: var(--border-glow);
}

.chat__send {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: var(--brand);
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: background var(--duration) var(--ease), opacity var(--duration) var(--ease);
}

.chat__send:hover {
    background: var(--brand-dark);
}

.chat__send:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.chat__send svg {
    width: 18px;
    height: 18px;
}

.chat__composer.htmx-request .chat__send {
    opacity: 0.6;
    pointer-events: none;
}

.chat__error,
.chat__readonly {
    margin: 0;
    padding: var(--s-3) var(--s-4);
    font-size: 0.8125rem;
    text-align: center;
}

.chat__error {
    color: var(--danger);
}

.chat__readonly {
    border-top: 1px solid var(--border-hover);
    color: var(--text-muted);
}

@media (min-width: 768px) {
    .networking-filter .networking-dropdown {
        width: 280px;
    }

    .networking-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: var(--s-4);
    }

    /* Sin barra inferior. El margen superior se fija aquí porque, desde
       768 px, .main-content usa uno mayor para el resto de páginas. */
    :root {
        --chat-bottom: var(--s-6);
    }

    .chat-msg {
        max-width: 65%;
    }

    .chat__composer textarea {
        font-size: 0.9375rem;
    }
}

/* --- Distribución: contenido + lateral de chats ------------------------ */
/* Los contadores del menú existen siempre (el sondeo los actualiza); con 0
   van ocultos, y la clase no debe poder mostrarlos. */
.navbar__badge[hidden],
.bottom-nav__badge[hidden],
.networking-tabs__badge[hidden] {
    display: none;
}

.networking-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: var(--s-5);
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: var(--r-full);
}

.networking-tabs__item {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    border-radius: var(--r-full);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}

.networking-tabs__item svg {
    width: 14px;
    height: 14px;
    color: var(--cyan);
}

.networking-tabs__item:hover {
    background: var(--highlight-hover);
    color: var(--text-primary);
}

.networking-tabs__item.is-active {
    background: var(--highlight-active);
    color: var(--text-primary);
}

.networking-tabs__badge,
.chat-list__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--brand);
    border-radius: var(--r-full);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    flex-shrink: 0;
}

.networking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-6);
}

/* Móvil: una sola columna, la que toque. */
.networking-layout--personas .chat-sidebar,
.networking-layout--match .chat-sidebar,
.networking-layout--perfil .chat-sidebar,
.networking-layout--chats .networking-layout__main,
.networking-layout--chat .chat-sidebar {
    display: none;
}

.chat-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.chat-sidebar__title {
    margin: 0;
    padding: var(--s-4) var(--s-4) var(--s-3);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-hover);
}

.chat-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 6px;
}

.chat-list,
.chat__scroll,
.chat__composer textarea,
.networking-dropdown__menu {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

.chat-list::-webkit-scrollbar,
.chat__scroll::-webkit-scrollbar,
.chat__composer textarea::-webkit-scrollbar,
.networking-dropdown__menu::-webkit-scrollbar {
    width: 6px;
}

.chat-list::-webkit-scrollbar-thumb,
.chat__scroll::-webkit-scrollbar-thumb,
.chat__composer textarea::-webkit-scrollbar-thumb,
.networking-dropdown__menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: var(--r-full);
}

.chat-list::-webkit-scrollbar-track,
.chat__scroll::-webkit-scrollbar-track,
.chat__composer textarea::-webkit-scrollbar-track,
.networking-dropdown__menu::-webkit-scrollbar-track {
    background: transparent;
}

/* En el desplegable, la barra no llega a las esquinas redondeadas. */
.networking-dropdown__menu::-webkit-scrollbar-track {
    margin: 6px 0;
}

.chat-list__item {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: 10px;
    border-radius: var(--r-md);
    color: var(--text-primary);
    text-decoration: none;
    transition: background var(--duration) var(--ease);
}

.chat-list__item:hover {
    background: var(--highlight-hover);
    color: var(--text-primary);
}

.chat-list__item.is-active {
    background: var(--highlight-active);
}

.chat-list__text {
    flex: 1;
    min-width: 0;
}

.chat-list__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-2);
}

.chat-list__row + .chat-list__row {
    align-items: center;
    margin-top: 2px;
}

.chat-list__name {
    font-size: 0.875rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-list__time {
    font-size: 0.6875rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.chat-list__preview {
    font-size: 0.8125rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-list__item.is-unread .chat-list__name {
    font-weight: 700;
}

.chat-list__item.is-unread .chat-list__preview {
    color: var(--text-primary);
}

.chat-list__item.is-unread .chat-list__time {
    color: var(--brand);
}

.chat-list__empty {
    margin: 0;
    padding: var(--s-6) var(--s-4);
    text-align: center;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-muted);
}

@media (min-width: 1024px) {
    /* En escritorio las pestañas siguen (Personas / Match IA), pero "Chats"
       sobra: está el lateral. */
    .networking-tabs {
        display: inline-flex;
    }

    .networking-tabs__item {
        flex: 0 0 auto;
        padding: 0 var(--s-5);
    }

    .networking-tabs__item--mobile {
        display: none;
    }

    .networking-layout {
        grid-template-columns: 320px minmax(0, 1fr);
        align-items: start;
    }

    /* En escritorio se ven siempre las dos columnas. */
    .networking-layout .networking-layout__main,
    .networking-layout .chat-sidebar {
        display: flex;
    }

    .networking-layout .networking-layout__main:not(.chat) {
        display: block;
    }

    /* Portada: el lateral mide siempre lo mismo, más o menos lo que ocupan el
       filtro, 6 tarjetas (2 columnas × 3 filas) y la paginación. No depende
       de cuántas tarjetas haya; los chats hacen scroll dentro. */
    .networking-layout--personas .chat-sidebar,
    .networking-layout--match .chat-sidebar,
    .networking-layout--chats .chat-sidebar {
        height: 740px;
    }

    /* Chat: el lateral mide lo mismo que la conversación. */
    .networking-layout--chat {
        align-items: stretch;
    }

    .networking-layout--chat .chat-sidebar {
        height: calc(100vh - var(--chat-top) - var(--chat-bottom));
        height: calc(var(--chat-vh, 100dvh) - var(--chat-top) - var(--chat-bottom));
    }
}

/* --- Match: sinergias sugeridas por IA ------------------------------------ */
.networking-toolbar {
    display: flex;
    align-items: center;
    gap: var(--s-3);
}

.networking-toolbar .networking-dropdown {
    flex: 1;
    min-width: 0;
}

.match-form {
    flex-shrink: 0;
}

/* Botón "reluciente": borde degradado y un destello que lo recorre de vez en cuando. */
.match-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    height: 44px;
    padding: 0 var(--s-5);
    border: 1px solid transparent;
    border-radius: var(--r-md);
    background:
        linear-gradient(var(--bg-card-solid), var(--bg-card-solid)) padding-box,
        linear-gradient(120deg, var(--brand), var(--cyan) 55%, var(--brand)) border-box;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 0 18px rgba(1, 172, 2, 0.16);
    transition: box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.match-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.16) 50%, transparent 65%);
    transform: translateX(-100%);
    animation: match-sheen 3.6s var(--ease) infinite;
    pointer-events: none;
}

@keyframes match-sheen {
    0%, 55% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.match-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 26px rgba(0, 223, 231, 0.24);
}

.match-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.match-button svg {
    width: 16px;
    height: 16px;
    color: var(--cyan);
}

.match-button__loading {
    display: none;
}

.match-form.htmx-request .match-button {
    cursor: progress;
}

.match-form.htmx-request .match-button__label {
    display: none;
}

.match-form.htmx-request .match-button__loading {
    display: inline;
}

.match-form.htmx-request .match-button svg {
    animation: match-spin 1.2s linear infinite;
}

@keyframes match-spin {
    to { transform: rotate(360deg); }
}

/* Carga: esqueleto mientras la IA responde (ocupa el sitio del panel). */
.match-loading {
    display: none;
    margin-bottom: var(--s-6);
}

.match-loading.htmx-request {
    display: block;
}

.match-loading.htmx-request ~ #match-results {
    display: none;
}

.match-loading__text {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    margin-bottom: var(--s-3);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.match-loading__text svg {
    width: 16px;
    height: 16px;
    color: var(--cyan);
}

.match-card--skeleton {
    min-height: 168px;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.03) 30%, rgba(255, 255, 255, 0.07) 50%, rgba(255, 255, 255, 0.03) 70%);
    background-size: 200% 100%;
    animation: match-skeleton 1.4s ease-in-out infinite;
}

@keyframes match-skeleton {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}








.match-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    flex-wrap: wrap;
    margin-bottom: var(--s-5);
}

.match-head__title {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
}

.match-head__title svg {
    width: 20px;
    height: 20px;
    color: var(--cyan);
}

.match-head__subtitle {
    margin: 4px 0 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.match-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.match-intro {
    padding: var(--s-6);
    background: linear-gradient(180deg, var(--brand-subtle), transparent 70%), var(--bg-card);
    border: 1px solid var(--brand-glow);
    border-radius: var(--r-lg);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.match-intro p {
    margin: 0;
}

.match-intro strong {
    color: var(--text-primary);
}

.match-intro__note {
    margin-top: var(--s-3) !important;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Score de viabilidad: número grande y etiqueta; el color dice si es alto. */
.match-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    margin-left: auto;
    padding: 6px var(--s-2);
    border: 1px solid var(--border-glow);
    border-radius: var(--r-md);
    flex-shrink: 0;
}

.match-score__value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.match-score__label {
    margin-top: 3px;
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.match-score--high {
    border-color: var(--brand-glow);
    background: var(--brand-subtle);
}

.match-score--high .match-score__value {
    color: var(--brand);
}

.match-score--mid {
    border-color: rgba(0, 223, 231, 0.25);
    background: var(--cyan-subtle);
}

.match-score--mid .match-score__value {
    color: var(--cyan);
}

.match-score--low .match-score__value {
    color: var(--text-secondary);
}

.match-panel__error {
    margin: 0 0 var(--s-4);
    padding: var(--s-3) var(--s-4);
    border: 1px solid rgba(240, 168, 48, 0.3);
    border-radius: var(--r-md);
    background: rgba(240, 168, 48, 0.08);
    font-size: 0.875rem;
    color: var(--text-primary);
}


.match-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-3);
}

.match-card {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    padding: var(--s-4);
    background: var(--bg-card-solid);
    border: 1px solid var(--border-hover);
    border-radius: var(--r-md);
}

.match-card__top {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    min-width: 0;
}

.match-card__top .networking-avatar {
    width: 44px;
    height: 44px;
    font-size: 0.9375rem;
}

.match-card__reason {
    flex: 1;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

/* Pros y contras: dos columnas compactas, verde a favor y ámbar en contra. */
.match-procon {
    display: grid;
    gap: var(--s-3);
    padding-top: var(--s-3);
    border-top: 1px solid var(--border-glow);
}

.match-procon__title {
    display: block;
    margin-bottom: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.match-procon ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.match-procon li {
    display: flex;
    align-items: flex-start;
    gap: var(--s-2);
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.match-procon li svg {
    width: 14px;
    height: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}

.match-procon__col--pro svg {
    color: var(--brand);
}

.match-procon__col--con svg {
    color: var(--warning);
}

.match-card__actions {
    display: flex;
    gap: var(--s-2);
}

.match-card__actions form {
    display: contents;
}

.match-card__actions svg {
    width: 14px;
    height: 14px;
}

@media (min-width: 768px) {
    .networking-toolbar .networking-dropdown {
        flex: 0 1 280px;
    }

    .match-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .match-button::after,
    .match-form.htmx-request .match-button svg,
    .match-card--skeleton {
        animation: none;
    }
}

/* --- Abrir un chat desde el lateral: bocadillo (js/chat-bubble.js) ------- */
.chat-bubble {
    position: fixed;
    z-index: 900;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-hover);
    box-shadow: var(--shadow-lg);
    pointer-events: none;
}

.chat-bubble__header {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    min-width: 0;
    padding: var(--s-3) var(--s-4) var(--s-3) calc(var(--s-4) + 44px);
    border-bottom: 1px solid var(--border-hover);
    overflow: hidden;
}

.chat-bubble__header .networking-avatar {
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
}

.chat-bubble__name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-bubble__composer {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-3);
    border-top: 1px solid var(--border-hover);
    overflow: hidden;
}

.chat-bubble__composer span:first-child {
    flex: 1;
    height: 44px;
    border: 1px solid var(--border-hover);
    border-radius: 22px;
    background: var(--bg-input);
}

.chat-bubble__composer span:last-child {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--brand);
}

/* El pico: sale del borde izquierdo y apunta al chat pulsado del lateral. */
.chat-bubble__tail {
    position: absolute;
    left: -13px;
    width: 14px;
    height: 18px;
    background: var(--bg-card-solid);
    clip-path: polygon(100% 0, 0 50%, 100% 100%);
    transform-origin: right center;
    transform: scaleX(0);
}

/* --- Transiciones entre páginas (gota) ------------------------------------
   Las activa networking/_view_transitions.html, que solo incluyen las
   páginas de Networking. --vt-x/--vt-y es el punto pulsado y --vt-r el radio
   que cubre la pantalla; los fija el script en `pagereveal`. */
:root {
    --vt-ease: cubic-bezier(0.32, 0.72, 0, 1);
    --vt-duration: 700ms;       /* abrir (la gota crece) */
    --vt-duration-back: 700ms;  /* volver (la gota se recoge) */
}

/* Menú y barra inferior no se mueven: son iguales en las dos páginas. */
.navbar {
    view-transition-name: vt-navbar;
}

.bottom-nav {
    view-transition-name: vt-bottom-nav;
}

/* Sin esto, el fundido por defecto suma las dos imágenes y se ve un destello. */
::view-transition-old(root),
::view-transition-new(root) {
    mix-blend-mode: normal;
}

/* Abrir: la página nueva nace como una gota desde el punto pulsado y la
   anterior retrocede por debajo. */
html[data-vt="grow"]::view-transition-new(root) {
    animation: vt-drop-grow var(--vt-duration) var(--vt-ease) both;
}

html[data-vt="grow"]::view-transition-old(root) {
    animation: vt-recede var(--vt-duration) var(--vt-ease) both;
}

/* Volver: la página que se deja se recoge hacia donde salió, por encima de
   la que reaparece. */
html[data-vt="shrink"]::view-transition-old(root) {
    z-index: 1;
    animation: vt-drop-shrink var(--vt-duration-back) var(--vt-ease) both;
}

html[data-vt="shrink"]::view-transition-new(root) {
    animation: vt-emerge var(--vt-duration-back) var(--vt-ease) both;
}

@keyframes vt-drop-grow {
    from { clip-path: circle(0 at var(--vt-x) var(--vt-y)); }
    to { clip-path: circle(var(--vt-r) at var(--vt-x) var(--vt-y)); }
}

@keyframes vt-drop-shrink {
    from { clip-path: circle(var(--vt-r) at var(--vt-x) var(--vt-y)); }
    to { clip-path: circle(0 at var(--vt-x) var(--vt-y)); }
}

@keyframes vt-recede {
    to { transform: scale(0.96); opacity: 0.45; }
}

@keyframes vt-emerge {
    from { transform: scale(0.96); opacity: 0.45; }
}

/* En escritorio el lateral de chats se queda en su sitio (entre el listado y
   un chat solo se ajusta a la nueva altura). */
@media (min-width: 1024px) {
    .chat-sidebar {
        view-transition-name: vt-chat-sidebar;
    }
}

::view-transition-group(vt-chat-sidebar) {
    animation-duration: 520ms;
    animation-timing-function: var(--vt-ease);
}

/* Con "reducir movimiento" activado, cambio de página instantáneo. */
@media (prefers-reduced-motion: reduce) {
    html[data-vt]::view-transition-old(root),
    html[data-vt]::view-transition-new(root),
    ::view-transition-group(*) {
        animation: none !important;
    }
}

/* «VIP» del menú de Networking: dorado como la insignia VIP, con un destello
   que lo recorre de vez en cuando (como la luz sobre metal). */
.nav-vip {
    display: inline-block;
    margin-left: 2px;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: linear-gradient(110deg, #b8860b 0%, #ffd700 28%, #fff4c2 42%, #ffd700 56%, #c9960c 100%);
    background-size: 250% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.35));
    animation: nav-vip-shine 4s ease-in-out infinite;
}

@keyframes nav-vip-shine {
    0%, 55% { background-position: 100% 0; }
    85%, 100% { background-position: -50% 0; }
}

.navbar__link:hover .nav-vip,
.navbar__link--active .nav-vip {
    filter: drop-shadow(0 0 9px rgba(255, 215, 0, 0.6));
}

@media (prefers-reduced-motion: reduce) {
    .nav-vip {
        animation: none;
        background-position: 50% 0;
    }
}

/* Móvil: el «VIP» dorado va como etiqueta sobre el icono (el nombre no cabe). */
.bottom-nav__vip {
    position: absolute;
    top: 1px;
    left: 50%;
    transform: translateX(-24px);
    margin: 0;
    font-size: 0.5rem;
    line-height: 1;
}
