/* ========================================
   EGP Referidos — Premium Design System
   ======================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- Splash / Loading Screen --- */
.splash {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, #0c1e3a 0%, #060d1a 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.splash-hide {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
    position: relative;
}

/* Glowing ring behind logo */
.splash-content::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 2px solid rgba(26, 95, 180, 0.2);
    animation: splashRing 2s ease-in-out infinite;
}

@keyframes splashRing {

    0%,
    100% {
        transform: translate(-50%, -55%) scale(1);
        border-color: rgba(26, 95, 180, 0.15);
        box-shadow: 0 0 0 rgba(26, 95, 180, 0);
    }

    50% {
        transform: translate(-50%, -55%) scale(1.08);
        border-color: rgba(26, 95, 180, 0.35);
        box-shadow: 0 0 40px rgba(26, 95, 180, 0.15);
    }
}

.splash-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    background: white;
    border-radius: 24px;
    padding: 16px;
    box-shadow: 0 8px 40px rgba(26, 95, 180, 0.3), 0 0 80px rgba(26, 95, 180, 0.1);
    animation: splashZoom 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    position: relative;
    z-index: 1;
}

@keyframes splashZoom {
    0% {
        opacity: 0;
        transform: scale(0.6) translateY(10px);
    }

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

.splash-text {
    margin-top: 1.2rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: splashTextIn 0.8s ease 0.3s both;
}

@keyframes splashTextIn {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.splash-bar {
    width: 120px;
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    margin: 1rem auto 0;
    overflow: hidden;
    animation: splashTextIn 0.5s ease 0.5s both;
}

.splash-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #1a5fb4, #00acc1);
    border-radius: 4px;
    animation: splashFill 1.4s ease 0.2s forwards;
}

@keyframes splashFill {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* --- CSS Variables --- */
:root {
    --bg-primary: #060d1a;
    --bg-secondary: #0a1628;
    --bg-card: #0d1b2e;
    --bg-card-hover: #122440;
    --bg-surface: #102035;
    --bg-glass: rgba(10, 22, 40, 0.75);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-accent: rgba(26, 95, 180, 0.35);
    --accent: #1a5fb4;
    --accent-hover: #2196f3;
    --accent-glow: rgba(26, 95, 180, 0.3);
    --accent-secondary: #00acc1;
    --accent-warm: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #00acc1;
    --text: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #5a7a9a;
    --white: #ffffff;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--accent-glow);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
}

/* --- Animated Background --- */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(26, 95, 180, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 95, 180, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.bg-gradient-orb {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.bg-gradient-orb.orb-1 {
    background: var(--accent);
    top: -200px;
    right: -100px;
    animation: float-orb 20s ease-in-out infinite;
}

.bg-gradient-orb.orb-2 {
    background: var(--accent-secondary);
    bottom: -200px;
    left: -100px;
    animation: float-orb 25s ease-in-out infinite reverse;
}

@keyframes float-orb {

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

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

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

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--white);
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.75rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.05rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--white) 0%, var(--accent) 50%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-content {
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
    position: relative;
    z-index: 1;
}

/* --- Navbar --- */
.navbar {
    background: rgba(10, 10, 20, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
}

.brand-icon {
    width: 120px;
    height: 120px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.navbar-links a {
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.navbar-links a:hover,
.navbar-links a.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
}

.navbar-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.navbar-links .btn-nav {
    background: var(--accent);
    color: var(--white) !important;
    font-weight: 600;
    padding: 0.45rem 1.2rem;
    border-radius: var(--radius-sm);
}

.navbar-links .btn-nav:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #0c4a9e);
    color: var(--white);
    box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: var(--white);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning);
    color: var(--bg-primary);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-ghost {
    background: rgba(26, 95, 180, 0.1);
    color: var(--accent-hover);
    border: 1px solid var(--border-accent);
}

.btn-ghost:hover {
    background: rgba(26, 95, 180, 0.2);
}

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
}

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

.card-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

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

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
}

/* --- Stat Cards --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-accent);
    box-shadow: 0 8px 24px rgba(26, 95, 180, 0.1);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    opacity: 0;
    transition: var(--transition);
}

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

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.stat-icon.icon-purple {
    background: rgba(26, 95, 180, 0.15);
    color: var(--accent-hover);
}

.stat-icon.icon-cyan {
    background: rgba(6, 182, 212, 0.12);
    color: var(--accent-secondary);
}

.stat-icon.icon-amber {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-warm);
}

.stat-icon.icon-green {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.stat-icon.icon-red {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 1.2rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-secondary);
}

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

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* --- Tables --- */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--bg-surface);
    padding: 0.7rem 0.9rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 0.7rem 0.9rem;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    transition: var(--transition-fast);
}

tr:hover td {
    background: rgba(26, 95, 180, 0.04);
}

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

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-nuevo {
    background: rgba(6, 182, 212, 0.15);
    color: #0ea5e9;
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.badge-contactando {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-contacto_establecido {
    background: rgba(30, 210, 160, 0.15);
    color: #2dd4bf;
    border: 1px solid rgba(30, 210, 160, 0.25);
}

.badge-perfilado {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.badge-llamada_agendada {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.25);
}

.badge-visita_agendada {
    background: rgba(217, 70, 239, 0.15);
    color: #e879f9;
    border: 1px solid rgba(217, 70, 239, 0.25);
}

.badge-propuesta_realizada {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.25);
}

.badge-calificado_frio {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.badge-ganada {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-finalizada {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-perdida {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-pending {
    background: rgba(71, 85, 105, 0.2);
    color: var(--text-muted);
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.badge-pending_assignment {
    background: rgba(71, 85, 105, 0.2);
    color: var(--text-muted);
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.badge-active {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-inactive {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-referidor {
    background: rgba(26, 95, 180, 0.15);
    color: var(--accent-hover);
    border: 1px solid rgba(26, 95, 180, 0.25);
}

.badge-asesor {
    background: rgba(6, 182, 212, 0.12);
    color: var(--info);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.badge-admin {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* --- Alerts --- */
.alert {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.alert-info {
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: var(--info);
}

/* --- Hero --- */
.hero {
    text-align: center;
    padding: 6rem 0 4rem;
    position: relative;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    background: rgba(26, 95, 180, 0.12);
    border: 1px solid var(--border-accent);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--accent-hover);
    font-weight: 600;
    margin-bottom: 1.5rem;
    animation: pulse-badge 3s ease-in-out infinite;
}

@keyframes pulse-badge {

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

    50% {
        box-shadow: 0 0 16px 2px var(--accent-glow);
    }
}

/* --- Features --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin: 3rem 0;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-accent);
    box-shadow: 0 12px 32px rgba(26, 95, 180, 0.12);
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: left;
}

.feature-card:hover::after {
    transform: scaleX(1);
}

.feature-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(26, 95, 180, 0.15);
    color: var(--accent-hover);
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* --- Referral Box --- */
.referral-box {
    background: linear-gradient(135deg, rgba(26, 95, 180, 0.08), rgba(0, 172, 193, 0.04));
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.referral-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
}

.referral-link-wrapper {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.referral-link-wrapper input {
    flex: 1;
    padding: 0.65rem 0.9rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace, var(--font);
    font-size: 0.85rem;
}

/* --- Leaderboard --- */
.leaderboard-list {
    list-style: none;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--border);
    transition: var(--transition-fast);
}

.leaderboard-item:hover {
    background: rgba(26, 95, 180, 0.04);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-rank {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    background: var(--bg-surface);
    color: var(--text-muted);
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.leaderboard-rank.top-1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1a2e;
    border: none;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.leaderboard-rank.top-2 {
    background: linear-gradient(135deg, #d1d5db, #9ca3af);
    color: #1a1a2e;
    border: none;
}

.leaderboard-rank.top-3 {
    background: linear-gradient(135deg, #d97706, #92400e);
    color: white;
    border: none;
}

.leaderboard-name {
    flex: 1;
    font-weight: 600;
    color: var(--white);
    font-size: 0.95rem;
}

.leaderboard-count {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent);
}

/* --- Tabs --- */
.tabs {
    display: flex;
    gap: 0.15rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.tab {
    padding: 0.65rem 1.1rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
}

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

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* --- Footer --- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4rem;
    position: relative;
    z-index: 1;
}

/* --- Copy Feedback --- */
.copy-feedback {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--success);
    color: white;
    padding: 0.7rem 1.3rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.88rem;
    z-index: 3000;
    animation: slideUp 2.2s ease forwards;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    15% {
        opacity: 1;
        transform: translateY(0);
    }

    85% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* --- Search --- */
.search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-bar input {
    flex: 1;
}

/* --- Notes --- */
.notes-list {
    list-style: none;
    margin-top: 0.5rem;
}

.note-item {
    padding: 0.5rem 0.7rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    border-left: 2px solid var(--accent);
}

.note-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* --- Utility --- */
.text-center {
    text-align: center;
}

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

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

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

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

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

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.d-flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

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

.justify-between {
    justify-content: space-between;
}

.w-full {
    width: 100%;
}

.gap-1 {
    gap: 0.5rem;
}

/* --- Page Transitions --- */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.stagger-1 {
    animation-delay: 0.05s;
}

.stagger-2 {
    animation-delay: 0.1s;
}

.stagger-3 {
    animation-delay: 0.15s;
}

.stagger-4 {
    animation-delay: 0.2s;
}

/* --- Responsive --- */
/* --- Share Buttons --- */
.share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    color: white;
    opacity: 0.9;
}

.share-whatsapp {
    background: #25d366;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
}

.share-telegram {
    background: #2aabee;
    box-shadow: 0 2px 8px rgba(42, 171, 238, 0.25);
}

.share-facebook {
    background: #1877f2;
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.25);
}

.share-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    box-shadow: 0 2px 8px rgba(220, 39, 67, 0.25);
}

/* ============================================
   LEAD PROGRESS — rediseño visual moderno
   ============================================ */

.lp-wrap {
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

/* ---- Status pill (lo primero que ves) ---- */
.lp-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.22rem 0.75rem 0.22rem 0.55rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    width: fit-content;
    letter-spacing: 0.1px;
}

.lp-pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
    animation: lp-blink 2.2s ease-in-out infinite;
}

@keyframes lp-blink {

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

    50% {
        opacity: 0.45;
        transform: scale(0.75);
    }
}

.lp-pill-nuevo {
    background: rgba(0, 210, 220, 0.1);
    color: #00d4eb;
    border: 1px solid rgba(0, 210, 220, 0.28);
}

.lp-pill-contactado {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.28);
}

.lp-pill-proceso {
    background: rgba(33, 150, 243, 0.1);
    color: #60b4ff;
    border: 1px solid rgba(33, 150, 243, 0.28);
}

.lp-pill-cerrado {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.28);
}

.lp-pill-descartado {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.28);
}

.lp-pill-espera {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

/* No blink en estados estáticos */
.lp-pill-cerrado .lp-pill-dot,
.lp-pill-descartado .lp-pill-dot {
    animation: none;
}

/* ---- Track de progreso ---- */
.lp-track {
    height: 7px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.lp-fill {
    height: 100%;
    width: 0;
    border-radius: 8px;
    transition: width 0.95s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Shimmer animado encima del fill */
.lp-fill::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    animation: lp-shimmer 2.2s ease-in-out infinite;
}

@keyframes lp-shimmer {
    0% {
        left: -60%;
    }

    100% {
        left: 120%;
    }
}

/* Colores del fill por estado */
.lp-fill-nuevo {
    background: linear-gradient(90deg, #0891b2, #06b6d4);
}

.lp-fill-contactado {
    background: linear-gradient(90deg, #d97706, #f59e0b);
}

.lp-fill-proceso {
    background: linear-gradient(90deg, #1a5fb4, #2196f3, #60b4ff);
    background-size: 200% 100%;
    animation: lp-gradient 3s ease infinite, lp-shimmer 2.2s ease-in-out infinite;
}

.lp-fill-cerrado {
    background: linear-gradient(90deg, #059669, #10b981, #34d399);
    background-size: 200% 100%;
}

.lp-fill-descartado {
    background: linear-gradient(90deg, #b91c1c, #ef4444);
}

.lp-fill-espera {
    background: linear-gradient(90deg, #334155, #64748b);
}

@keyframes lp-gradient {

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

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

/* ---- Labels de pasos ---- */
.lp-labels {
    display: flex;
    justify-content: space-between;
}

.lp-label {
    font-size: 0.6rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.18);
    text-transform: uppercase;
    letter-spacing: 0.15px;
    text-align: center;
    flex: 1;
    transition: color 0.3s, font-weight 0.3s;
}

.lp-label:first-child {
    text-align: left;
}

.lp-label:last-child {
    text-align: right;
}

.lp-label.lp-done {
    color: rgba(33, 150, 243, 0.55);
}

.lp-label.lp-current {
    color: #60b4ff;
    font-weight: 800;
    font-size: 0.62rem;
}

.lp-label.lp-ok {
    color: #34d399;
    font-weight: 800;
    font-size: 0.62rem;
}

.lp-label.lp-dead {
    color: rgba(248, 113, 113, 0.7);
    font-weight: 700;
}

/* --- Badges / Medallas rediseño --- */
.badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    padding: 0.25rem 0;
}

.medal-badge {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.1rem;
    min-width: 190px;
    flex: 1;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: default;
    animation: medal-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes medal-pop {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(8px);
    }

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

.medal-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
    opacity: 0.7;
}

.medal-badge:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

/* Glow orb de fondo al hover */
.medal-badge::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    right: -20px;
    top: -20px;
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.4s ease;
}

.medal-badge:hover::after {
    opacity: 0.35;
}

/* ---- Variantes de color ---- */
.medal-gold {
    border-color: rgba(251, 191, 36, 0.25);
}

.medal-gold::before {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.medal-gold::after {
    background: #fbbf24;
}

.medal-gold:hover {
    border-color: rgba(251, 191, 36, 0.45);
    box-shadow: 0 10px 28px rgba(251, 191, 36, 0.12);
}

.medal-orange {
    border-color: rgba(249, 115, 22, 0.25);
}

.medal-orange::before {
    background: linear-gradient(90deg, #f97316, #ea580c);
}

.medal-orange::after {
    background: #f97316;
}

.medal-orange:hover {
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow: 0 10px 28px rgba(249, 115, 22, 0.12);
}

.medal-cyan {
    border-color: rgba(6, 182, 212, 0.25);
}

.medal-cyan::before {
    background: linear-gradient(90deg, #06b6d4, #0891b2);
}

.medal-cyan::after {
    background: #06b6d4;
}

.medal-cyan:hover {
    border-color: rgba(6, 182, 212, 0.45);
    box-shadow: 0 10px 28px rgba(6, 182, 212, 0.12);
}

.medal-purple {
    border-color: rgba(139, 92, 246, 0.25);
}

.medal-purple::before {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.medal-purple::after {
    background: #8b5cf6;
}

.medal-purple:hover {
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 10px 28px rgba(139, 92, 246, 0.12);
}

.medal-green {
    border-color: rgba(16, 185, 129, 0.25);
}

.medal-green::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.medal-green::after {
    background: #10b981;
}

.medal-green:hover {
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.12);
}

.medal-trophy {
    border-color: rgba(251, 191, 36, 0.3);
    background: linear-gradient(135deg, var(--bg-surface), rgba(251, 191, 36, 0.05));
}

.medal-trophy::before {
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #fbbf24);
    background-size: 200% 100%;
    animation: shimmer-bar 2s linear infinite;
}

.medal-trophy::after {
    background: #fbbf24;
}

.medal-trophy:hover {
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 10px 28px rgba(251, 191, 36, 0.18);
}

@keyframes shimmer-bar {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.medal-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.04);
}

.medal-gold .medal-icon-wrap {
    background: rgba(251, 191, 36, 0.1);
}

.medal-orange .medal-icon-wrap {
    background: rgba(249, 115, 22, 0.1);
}

.medal-cyan .medal-icon-wrap {
    background: rgba(6, 182, 212, 0.1);
}

.medal-purple .medal-icon-wrap {
    background: rgba(139, 92, 246, 0.1);
}

.medal-green .medal-icon-wrap {
    background: rgba(16, 185, 129, 0.1);
}

.medal-trophy .medal-icon-wrap {
    background: rgba(251, 191, 36, 0.12);
}

.medal-text {
    flex: 1;
    min-width: 0;
}

.medal-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.15rem;
    line-height: 1.25;
}

.medal-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.35;
}

/* --- Modal de Bienvenida --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.3s ease;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: 90%;
    position: relative;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 80px rgba(26, 95, 180, 0.1);
}

@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
    }

    .navbar-links {
        display: none;
        width: 100%;
        flex-direction: column;
        padding-top: 0.5rem;
    }

    .navbar-links.open {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .referral-link-wrapper {
        flex-direction: column;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .bg-gradient-orb {
        width: 300px;
        height: 300px;
    }

    .brand-icon {
        width: 60px;
        height: 60px;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
    }

    .card {
        padding: 1.2rem;
    }

    .feature-card {
        padding: 1.2rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .modal-box {
        max-width: 95vw;
        padding: 1.5rem 1.2rem;
    }

    .leaderboard-count {
        font-size: 1rem;
    }

    .badges-grid {
        justify-content: center;
    }

    .medal-badge {
        min-width: 160px;
    }

    .lp-wrap {
        min-width: 160px;
    }

    .copy-feedback {
        right: 1rem;
        bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 3rem 0 2rem;
    }

    .bg-gradient-orb {
        width: 180px;
        height: 180px;
    }

    .splash-logo {
        width: 100px;
        height: 100px;
    }

    .splash-bar {
        width: 90px;
    }

    .brand-icon {
        width: 44px;
        height: 44px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    h3 {
        font-size: 1.1rem;
    }

    h4 {
        font-size: 0.95rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        max-width: 100%;
        font-size: 0.95rem;
    }

    .card {
        padding: 1rem;
    }

    .stat-card {
        padding: 0.85rem;
    }

    .modal-overlay {
        align-items: flex-end;
    }

    .modal-box {
        max-width: 100vw;
        width: 100%;
        margin: 0;
        border-radius: 1rem 1rem 0 0;
        padding: 1.2rem 1rem;
        position: fixed;
        bottom: 0;
        left: 0;
    }

    .table-wrapper {
        -webkit-overflow-scrolling: touch;
    }

    td, th {
        font-size: 0.78rem;
        padding: 0.4rem 0.5rem;
    }

    .medal-badge {
        min-width: 140px;
        padding: 0.7rem 0.8rem;
    }

    .lp-wrap {
        min-width: 130px;
    }

    .lp-label {
        font-size: 0.55rem;
    }

    .share-btn {
        font-size: 0.78rem;
        padding: 0.4rem 0.7rem;
    }

    .referral-box {
        padding: 1rem;
    }

    .footer {
        margin-top: 2rem;
    }

    .tab {
        font-size: 0.8rem;
        padding: 0.4rem 0.7rem;
    }
}