/* =============================================
   YASKAWA DESIGN SYSTEM — CSS MEJORADO v2
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

/* ──────────────────────────────────────────────
   VARIABLES / TOKENS DE DISEÑO
────────────────────────────────────────────── */
:root {
    /* ── COLORES DE MARCA ── */
    --color-primary:        #0052A5;
    --color-primary-dark:   #003870;
    --color-primary-mid:    #0068CC;
    --color-accent:         #00C4F4;
    --color-danger:         #E5001F;
    --color-success:        #00C48C;
    --color-gold:           #F5A623;

    /* ── FONDOS ── */
    --bg-page:              #070C14;
    --bg-card:              #0F1927;
    --bg-inner:             #162233;
    --bg-input:             #1A2A3D;
    --bg-hover:             rgba(0, 82, 165, 0.06);
    --bg-glass:             rgba(15, 25, 39, 0.85);

    /* ── BORDES ── */
    --border:               rgba(0, 82, 165, 0.2);
    --border-blue:          rgba(0, 82, 165, 0.35);
    --border-accent:        rgba(0, 196, 244, 0.3);
    --border-subtle:        rgba(255, 255, 255, 0.06);

    /* ── TEXTO ── */
    --text-primary:         #E8F1FF;
    --text-muted:           #7A9BBF;
    --text-dim:             #3D5A7A;
    --text-white:           #FFFFFF;

    /* ── TIPOGRAFÍA ── */
    --font-display:         'Bebas Neue', sans-serif;
    --font-body:            'DM Sans', sans-serif;
    --font-mono:            'JetBrains Mono', monospace;

    /* ── BORDER RADIUS ── */
    --radius-xs:            4px;
    --radius-sm:            8px;
    --radius-md:            12px;
    --radius-lg:            18px;
    --radius-xl:            24px;
    --radius-full:          999px;

    /* ── SOMBRAS ── */
    --shadow-blue:          0 8px 40px rgba(0, 82, 165, 0.3), 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-cyan:          0 0 30px rgba(0, 196, 244, 0.15), 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-dark:          0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-sm:            0 2px 8px rgba(0, 0, 0, 0.3);

    /* ── GRADIENTES ── */
    --gradient-primary:     linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    --gradient-accent:      linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
    --gradient-header:      linear-gradient(160deg, rgba(0, 8, 22, 0.97) 0%, rgba(0, 30, 72, 0.92) 100%);
    --gradient-card-blue:   linear-gradient(145deg, rgba(0, 82, 165, 0.15) 0%, rgba(0, 196, 244, 0.05) 100%);
}

/* ──────────────────────────────────────────────
   RESET & BASE
────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 82, 165, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 82, 165, 0.04) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 82, 165, 0.12), transparent);
    pointer-events: none;
    z-index: 0;
}

/* ──────────────────────────────────────────────
   ANIMACIONES
   CORRECCIÓN: Se usa la propiedad standalone `scale`
   en lugar de `transform: scale()` para evitar
   conflictos con transform (translateY, etc.) en
   estados hover/active.
────────────────────────────────────────────── */
@keyframes pulse {
    0%   { scale: 1; }
    50%  { scale: 0.92; }
    100% { scale: 1; }
}

/* Se aplica la animación con will-change para
   que el navegador la componga en su propia capa
   y no interfiera con otros transforms */
.logo-hexagon {
    animation: pulse 1.2s ease-in-out infinite;
    will-change: scale;
}

.auth-footer a {
    display: inline-block;
    animation: pulse 1.3s ease-in-out infinite;
    will-change: scale;
}

.copy-btn {
    animation: pulse 1.2s ease-in-out infinite;
    will-change: scale;
}

/* Al hacer hover se pausa la animación para que
   el efecto hover tome el control limpiamente */
.copy-btn:hover,
.auth-footer a:hover {
    animation-play-state: paused;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 196, 244, 0.8); transform: scale(1); }
    50%       { box-shadow: 0 0 18px rgba(0, 196, 244, 1); transform: scale(1.2); }
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: var(--color-primary); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

/* ──────────────────────────────────────────────
   HEADER
────────────────────────────────────────────── */
.header {
    position: relative;
    z-index: 10;
    background: var(--gradient-header),
                url('https://images.unsplash.com/photo-1565043589221-1a6fd9ae45c7?q=80&w=2670&auto=format&fit=crop') center/cover no-repeat;
    padding: 20px 20px 80px;
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
    overflow: hidden;
    color: var(--text-white);
}

.header::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-accent);
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(0, 196, 244, 0.06) 1px, transparent 1px);
    background-size: 20px 20px;
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
}

.header-inner {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 34px; height: 34px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-white);
    box-shadow: 0 4px 16px rgba(0, 82, 165, 0.6);
    position: relative;
    overflow: hidden;
}

.brand-icon::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 45%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: inherit;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 4px;
    color: var(--text-white);
    line-height: 1;
}

.brand-name span { color: var(--color-accent); }

.header-right {
    text-align: right;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
    font-family: var(--font-mono);
}

.header-right strong {
    display: block;
    color: var(--color-accent);
    font-size: 0.85rem;
    font-weight: 600;
}

.header-right .version-tag {
    display: inline-block;
    background: rgba(0, 82, 165, 0.2);
    border: 1px solid var(--border-blue);
    border-radius: var(--radius-full);
    padding: 2px 10px;
    font-size: 0.62rem;
    letter-spacing: 1.5px;
    color: var(--color-accent);
    backdrop-filter: blur(8px);
}

.header-title {
    position: relative;
    z-index: 2;
    margin-top: 24px;
}

.header-title .page-tag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--color-accent);
    letter-spacing: 3px;
    opacity: 0.8;
}

.header-title h1 {
    font-family: var(--font-display);
    font-size: 2.4rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    line-height: 1;
    margin-top: 4px;
}

.header-title p {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.78rem;
    letter-spacing: 1px;
    margin-top: 5px;
    font-family: var(--font-mono);
}

/* ──────────────────────────────────────────────
   DASHBOARD HEADER
────────────────────────────────────────────── */
.dashboard-header {
    background: var(--gradient-header),
                url('https://images.unsplash.com/photo-1565043589221-1a6fd9ae45c7?q=80&w=2670&auto=format&fit=crop') center/cover no-repeat;
    width: 100%;
    padding: 28px 20px 80px;
    position: relative;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    color: var(--text-white);
    overflow: hidden;
}

.dashboard-header::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-accent);
}

.dashboard-header::before {
    content: '';
    position: absolute;
    inset: 0;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    z-index: 1;
    background-image: radial-gradient(circle, rgba(0, 196, 244, 0.06) 1px, transparent 1px);
    background-size: 20px 20px;
}

.header-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-left .logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.header-left .logo-text {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 4px;
    color: var(--text-white);
}

.project-info {
    position: relative;
    z-index: 2;
    margin-top: 18px;
}

.project-info h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 1.5px;
}

.progress-bar-container {
    background: rgba(255, 255, 255, 0.1);
    height: 3px;
    border-radius: 2px;
    margin-top: 10px;
    position: relative;
}

.progress-bar-fill {
    background: var(--gradient-accent);
    height: 100%;
    width: 70%;
    border-radius: 2px;
    position: relative;
    box-shadow: 0 0 12px rgba(0, 196, 244, 0.5);
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    right: -4px; top: -4px;
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 10px rgba(0, 196, 244, 0.8);
    animation: pulse-dot 2s infinite;
}

/* ──────────────────────────────────────────────
   AUTH CARD (login / register)
────────────────────────────────────────────── */
.header-container {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 30px;
    color: var(--text-white);
    z-index: 10;
    position: relative;
    animation: fadeDown 0.6s ease both;
}

.logo-hexagon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.logo-hexagon img {
    max-width: 130px;
    height: auto;
    filter: brightness(0) invert(1);
}

.brand-subtitle {
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.6;
    margin-top: 4px;
    color: var(--color-accent);
    font-family: var(--font-mono);
}

.auth-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 480px;
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
    padding: 36px 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-blue);
    position: absolute;
    bottom: 0;
    height: 70vh;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.auth-title {
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    margin-bottom: 28px;
    font-family: var(--font-mono);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
    font-family: var(--font-mono);
}

.auth-footer a:hover {
    opacity: 0.8;
    animation-play-state: paused;
}

/* ──────────────────────────────────────────────
   FORMULARIOS / INPUTS
────────────────────────────────────────────── */
.form-group {
    margin-bottom: 16px;
    position: relative;
}

.form-control {
    width: 100%;
    padding: 14px 14px 14px 46px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control::placeholder { color: var(--text-dim); }

.form-control:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(0, 196, 244, 0.1);
}

.input-icon {
    position: absolute;
    left: 15px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.password-toggle {
    position: absolute;
    right: 15px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.password-toggle:hover { color: var(--color-accent); }

.select-wrapper { position: relative; }
.select-wrapper select { appearance: none; -webkit-appearance: none; }

/* ──────────────────────────────────────────────
   BOTONES
────────────────────────────────────────────── */
.btn-primary {
    width: 100%;
    padding: 15px;
    background: var(--color-primary);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    transition: background 0.25s, transform 0.1s, box-shadow 0.2s;
}

.btn-primary::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.4s;
}

.btn-primary::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.btn-primary:hover  { background: var(--color-primary-mid); box-shadow: var(--shadow-blue); }
.btn-primary:hover::before { left: 100%; }
.btn-primary:active { transform: scale(0.98); }

.btn-buy {
    width: 100%;
    background: var(--color-primary);
    color: var(--text-white);
    border: none;
    padding: 13px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}

.btn-buy::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 50%);
    pointer-events: none;
}

.btn-buy:hover  { background: var(--color-primary-mid); box-shadow: var(--shadow-blue); }
.btn-buy:active { transform: scale(0.98); }

/* ──────────────────────────────────────────────
   COPY BTN — la animación pulse usa `scale`
   standalone para no pisar el transform de hover
────────────────────────────────────────────── */
.copy-btn {
    padding: 10px 18px;
    background: var(--color-primary);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    transition: background 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    /* La animación pulse ya está declarada arriba */
}

.copy-btn::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 60%);
    pointer-events: none;
}

.copy-btn:hover {
    background: var(--color-primary-mid);
    box-shadow: 0 4px 16px rgba(0, 82, 165, 0.5);
    animation-play-state: paused;
}

.copy-btn.copied {
    background: var(--color-success);
    animation-play-state: paused;
}

.share-btn {
    flex: 1;
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-inner);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.share-btn:hover { border-color: var(--color-accent); color: var(--color-accent); background: rgba(0, 196, 244, 0.05); }

/* ──────────────────────────────────────────────
   QUICK ACTIONS
────────────────────────────────────────────── */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 16px;
    margin-top: -30px;
    position: relative;
    z-index: 5;
    margin-bottom: 24px;
}

.action-btn {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
}

.action-icon {
    width: 68px;
    height: 68px;
    background: #111827;
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    border: 1.5px solid #00eaff;

    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon::after {
    content: "";
    position: absolute;
    width: 28px;
    height: 28px;
    background: #0b1120; /* mismo color del fondo */
    border-radius: 50%;
    top: -14px;
    right: -14px;
}
.action-icon::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 40%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: inherit;
}

.action-icon::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.2s;
}

.action-btn:hover  .action-icon        { transform: translateY(-4px); box-shadow: var(--shadow-cyan); }
.action-btn:hover  .action-icon::after { opacity: 1; }
.action-btn:active .action-icon        { transform: scale(0.94); }

.action-btn span {
    font-weight: 500;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.2;
}

.bg-purple { background: linear-gradient(145deg, #7B2FF7, #4A1AB5); box-shadow: 0 6px 20px rgba(123, 47, 247, 0.35); }
.bg-blue   { background: linear-gradient(145deg, var(--color-primary-mid), var(--color-primary-dark)); box-shadow: 0 6px 20px rgba(0, 82, 165, 0.4); }
.bg-orange { background: linear-gradient(145deg, #F07826, #B85500); box-shadow: 0 6px 20px rgba(240, 120, 38, 0.35); }
.bg-teal   { background: linear-gradient(145deg, var(--color-accent), #007DB8); box-shadow: 0 6px 20px rgba(0, 196, 244, 0.3); }
.bg-green  { background: linear-gradient(145deg, #00D49A, #009470); box-shadow: 0 6px 20px rgba(0, 212, 154, 0.3); }
.bg-red    { background: linear-gradient(145deg, var(--color-danger), #8C001A); box-shadow: 0 6px 20px rgba(229, 0, 31, 0.35); }

/* ──────────────────────────────────────────────
   INFO CARDS
────────────────────────────────────────────── */
.info-cards-container {
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    gap: 12px;
    margin-bottom: 20px;
   
    
}

.info-card {
    color: var(--text-white);
    padding: 20px 16px;
    border-radius: var(--radius-lg);
    corner-shape: scoop;
    box-shadow: var(--shadow-blue);
    position: relative;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.info-card::before {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.info-card:hover { transform: translateY(-2px); }
.info-card:nth-child(1) { background: var(--gradient-primary); }
.info-card:nth-child(2) { background: linear-gradient(145deg, #0068CC 0%, var(--color-primary-dark) 100%); }

.info-card h3 {
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 6px;
    font-family: var(--font-mono);
}

.info-card .amount {
    font-family: var(--font-display);
    font-size: 1.7rem;
    letter-spacing: 1px;
    line-height: 1;
}

.info-card .currency {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-top: 3px;
    font-family: var(--font-mono);
}

.info-card .user-avatar {
    position: absolute;
    right: 14px; bottom: 14px;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    overflow: hidden;
}

.info-card .user-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ──────────────────────────────────────────────
   SHARE CARD / REFERRAL CARD
────────────────────────────────────────────── */
.share-card,
.referral-card {
    background: var(--bg-card);
    margin: 0 0 20px 0;
    padding: 20px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.share-card::before,
.referral-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-accent);
}

.referral-card::after {
    content: '\f0c1';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 20px; top: 50%;
    transform: translateY(-50%);
    font-size: 5rem;
    color: rgba(0, 82, 165, 0.05);
    pointer-events: none;
}

.referral-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    text-align: left;
}

.referral-icon {
    width: 38px; height: 38px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: var(--text-white);
    flex-shrink: 0;
    position: relative; overflow: hidden;
}

.referral-icon::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 40%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: inherit;
}

.referral-header h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.referral-header p {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 1px;
    font-family: var(--font-mono);
}

.share-input-group,
.referral-input-wrap {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.share-input-group:focus-within,
.referral-input-wrap:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(0, 196, 244, 0.1);
}

.referral-prefix {
    padding: 12px 14px;
    font-size: 0.68rem;
    color: var(--text-dim);
    white-space: nowrap;
    border-right: 1px solid var(--border);
    background: var(--bg-inner);
    font-family: var(--font-mono);
    flex-shrink: 0;
}

.share-input-group span,
.referral-code {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--color-accent);
    font-weight: 600;
    letter-spacing: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: transparent;
    border: none;
    outline: none;
    text-align: left;
}

.share-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* ──────────────────────────────────────────────
   STATS
────────────────────────────────────────────── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 10px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    cursor: default;
}

.stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity 0.25s;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-cyan);
}

.stat-card:hover::before { opacity: 1; }

.stat-num {
    font-family: var(--font-display);
    font-size: 1.9rem;
    letter-spacing: 1px;
    line-height: 1;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.6rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-mono);
}

.stat-icon { font-size: 0.9rem; color: var(--color-primary); margin-bottom: 6px; }

/* ──────────────────────────────────────────────
   NIVELES DE EQUIPO
────────────────────────────────────────────── */
.levels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.level-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 10px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
    cursor: pointer;
}

.level-card::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 2px;
    opacity: 0;
    transition: opacity 0.25s;
}

.level-1::after { background: var(--text-dim); }
.level-2::after { background: var(--gradient-accent); }
.level-3::after { background: linear-gradient(90deg, var(--color-gold), #E8A500); }

.level-card:hover { transform: translateY(-4px); }
.level-card:hover::after { opacity: 1; }

.level-card.featured {
    background: var(--gradient-card-blue);
    border-color: var(--color-primary);
    box-shadow: 0 0 24px rgba(0, 82, 165, 0.18);
}

.level-card.featured::before {
    content: '';
    position: absolute; top: 8px; right: 8px;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 8px var(--color-accent);
    animation: pulse-dot 2s infinite;
}

.level-badge {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.1rem;
}

.level-1 .level-badge { background: rgba(61, 90, 122, 0.2); color: var(--text-dim); }
.level-2 .level-badge { background: rgba(0, 82, 165, 0.2); color: var(--color-accent); }
.level-3 .level-badge { background: rgba(245, 166, 35, 0.15); color: var(--color-gold); }

.level-name {
    font-family: var(--font-display);
    font-size: 0.82rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.level-count {
    font-family: var(--font-display);
    font-size: 2.2rem;
    line-height: 1;
    margin-bottom: 2px;
}

.level-1 .level-count { color: var(--text-dim); }
.level-2 .level-count { background: var(--gradient-accent); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.level-3 .level-count { color: var(--color-gold); }

.level-sub { font-size: 0.58rem; color: var(--text-dim); letter-spacing: 0.5px; font-family: var(--font-mono); }

.refund-chip {
    display: inline-block;
    background: rgba(0, 196, 244, 0.08);
    border: 1px solid var(--border-accent);
    color: var(--color-accent);
    font-size: 0.58rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-top: 8px;
    letter-spacing: 0.5px;
    font-family: var(--font-mono);
}

/* ──────────────────────────────────────────────
   COMISIONES
────────────────────────────────────────────── */
.commission-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
}

.commission-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(90deg, rgba(0, 82, 165, 0.1) 0%, transparent 100%);
    display: flex; align-items: center; gap: 10px;
    position: relative;
}

.commission-header::before {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--gradient-accent);
}

.commission-header i { color: var(--color-accent); }

.commission-header h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.commission-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 18px;
    border-bottom: 1px solid rgba(0, 82, 165, 0.08);
    transition: background 0.15s;
}

.commission-row:last-child { border-bottom: none; }
.commission-row:hover { background: var(--bg-hover); }

.commission-left { display: flex; align-items: center; gap: 12px; }

.commission-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-lv1 { background: var(--text-dim); }
.dot-lv2 { background: var(--color-accent); box-shadow: 0 0 8px var(--color-accent); }
.dot-lv3 { background: var(--color-gold); box-shadow: 0 0 8px var(--color-gold); }

.commission-info h4 { font-size: 0.85rem; font-weight: 500; color: var(--text-primary); margin-bottom: 2px; }
.commission-info p  { font-size: 0.68rem; color: var(--text-muted); font-family: var(--font-mono); }

.commission-pct {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.commission-pct span { font-size: 0.72rem; font-weight: 400; color: var(--text-dim); font-family: var(--font-body); }

/* ──────────────────────────────────────────────
   LISTA DE MIEMBROS
────────────────────────────────────────────── */
.members-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
}

.members-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(90deg, rgba(0, 82, 165, 0.1), transparent);
}

.members-header h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.badge-count {
    background: rgba(0, 82, 165, 0.15);
    color: var(--color-accent);
    border: 1px solid rgba(0, 82, 165, 0.25);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
}

.member-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0, 82, 165, 0.06);
    transition: background 0.15s;
}

.member-item:last-child { border-bottom: none; }
.member-item:hover { background: var(--bg-hover); }

.member-avatar {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-white);
    flex-shrink: 0;
    border: 1px solid rgba(0, 82, 165, 0.4);
    position: relative; overflow: hidden;
}

.member-avatar::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 40%;
    background: rgba(255, 255, 255, 0.12);
}

.member-info { flex: 1; }
.member-name { font-weight: 500; font-size: 0.88rem; color: var(--text-primary); margin-bottom: 2px; }
.member-phone { font-size: 0.68rem; color: var(--text-muted); font-family: var(--font-mono); }
.member-right { text-align: right; }

.member-level {
    font-size: 0.58rem; font-weight: 600;
    letter-spacing: 1px; text-transform: uppercase;
    padding: 2px 7px; border-radius: var(--radius-xs);
    margin-bottom: 4px; display: inline-block;
    font-family: var(--font-mono);
}

.lv1 { background: rgba(61, 90, 122, 0.15); color: var(--text-dim); }
.lv2 { background: rgba(0, 196, 244, 0.1); color: var(--color-accent); }
.lv3 { background: rgba(245, 166, 35, 0.12); color: var(--color-gold); }

.member-date { font-size: 0.62rem; color: var(--text-dim); font-family: var(--font-mono); }

.empty-state { padding: 40px 20px; text-align: center; }
.empty-state i { font-size: 2.5rem; color: var(--border); margin-bottom: 12px; display: block; }
.empty-state p { color: var(--text-muted); font-size: 0.82rem; font-family: var(--font-mono); }

/* ──────────────────────────────────────────────
   PLANES DE INVERSIÓN
────────────────────────────────────────────── */
.plans-section { padding: 20px 16px; width: 100%; box-sizing: border-box; }
.plans-grid { display: grid; grid-template-columns: 1fr; gap: 18px; width: 100%; }

.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1), box-shadow 0.3s;
    color: var(--text-primary);
    position: relative;
}

.plan-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--gradient-accent);
    z-index: 1;
}

.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-blue); border-color: var(--border-blue); }
.plan-card:active { transform: scale(0.99); }

.plan-image { width: 100%; height: 180px; object-fit: cover; filter: brightness(0.6) saturate(0.7); display: block; }

.plan-info { padding: 20px; }

.plan-info h3 {
    font-family: var(--font-display);
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 1.3rem;
    letter-spacing: 2px;
}

.plan-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }

.stat-item { display: flex; flex-direction: column; }

.stat-label {
    font-size: 0.6rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
    font-family: var(--font-mono);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.stat-value.highlight {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-value.gold { color: var(--color-gold); }

/* ──────────────────────────────────────────────
   PERFIL
────────────────────────────────────────────── */
.profile-info-card {
    background: var(--bg-card);
    margin: 0 16px 20px;
    padding: 28px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    text-align: center;
    box-shadow: var(--shadow-dark);
}

.profile-avatar {
    font-size: 3.8rem;
    color: var(--color-accent);
    margin-bottom: 16px;
    filter: drop-shadow(0 0 16px rgba(0, 196, 244, 0.3));
}

.profile-details { text-align: left; margin-top: 20px; }

.profile-item {
    display: flex; align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.profile-item:last-child { border-bottom: none; }

.profile-item-icon {
    width: 38px; height: 38px;
    background: var(--bg-inner);
    border: 1px solid var(--border-blue);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    margin-right: 14px; flex-shrink: 0;
}

.profile-item-icon i { color: var(--color-accent); font-size: 1rem; }
.profile-item-content { display: flex; flex-direction: column; flex: 1; }

.profile-item-label {
    font-size: 0.62rem; color: var(--text-dim);
    letter-spacing: 1.5px; text-transform: uppercase;
    margin-bottom: 3px; font-family: var(--font-mono);
}

.profile-item-value { font-size: 0.9rem; color: var(--text-primary); font-weight: 400; }

.profile-actions { margin: 0; padding: 0 16px; }

.profile-action-btn {
    display: flex; align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 16px 18px; margin-bottom: 10px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    width: 100%; box-sizing: border-box;
}

.profile-action-btn:hover { background: var(--bg-inner); border-color: var(--border-blue); }
.profile-action-btn:active { transform: scale(0.98); }

.profile-btn-icon {
    width: 42px; height: 42px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    margin-right: 14px; flex-shrink: 0;
}

.profile-btn-icon i { color: var(--text-white); font-size: 1.2rem; }
.profile-action-btn span { flex: 1; font-size: 0.9rem; font-weight: 500; text-align: left; color: var(--text-primary); }
.profile-action-btn .arrow-icon { color: var(--text-dim); font-size: 0.85rem; margin-left: 10px; }

/* ──────────────────────────────────────────────
   BOTTOM NAVIGATION
────────────────────────────────────────────── */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(11, 18, 32, 0.95);
    border-top: 1px solid var(--border);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    display: flex; justify-content: space-around;
    padding: 12px 10px 18px;
    z-index: 100;
    backdrop-filter: blur(20px);
}

.nav-item {
    color: var(--text-dim);
    text-align: center;
    text-decoration: none;
    font-size: 0.58rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    flex: 1;
    transition: color 0.2s;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    font-family: var(--font-mono);
}

.nav-item i { font-size: 1.1rem; }
.nav-item:hover { color: var(--text-muted); }

.nav-item.active { color: var(--color-accent); }
.nav-item.active i { filter: drop-shadow(0 0 6px rgba(0, 196, 244, 0.8)); }

/* ──────────────────────────────────────────────
   UTILIDADES
────────────────────────────────────────────── */
.section-title {
    font-family: var(--font-display);
    font-size: 0.9rem; font-weight: 400;
    letter-spacing: 3px; text-transform: uppercase;
    color: var(--text-dim);
    margin: 24px 0 12px;
    display: flex; align-items: center; gap: 8px;
}

.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.section-title i { color: var(--color-primary); font-size: 0.85rem; }

.divider {
    height: 1px; background: var(--border);
    margin: 16px 0; position: relative;
}

.divider::before {
    content: '';
    position: absolute; left: 0; top: 0;
    width: 40px; height: 1px;
    background: var(--gradient-accent);
}

.badge { display: inline-block; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.65rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; font-family: var(--font-mono); }
.badge-active  { background: rgba(0, 196, 244, 0.1); color: var(--color-accent); border: 1px solid var(--border-accent); }
.badge-warning { background: rgba(245, 166, 35, 0.1); color: var(--color-gold); border: 1px solid rgba(245, 166, 35, 0.25); }
.badge-error   { background: rgba(229, 0, 31, 0.1); color: #FF3347; border: 1px solid rgba(229, 0, 31, 0.25); }

.toast {
    position: fixed;
    bottom: 90px; left: 50%; transform: translateX(-50%);
    background: var(--color-success);
    color: var(--text-white);
    padding: 10px 22px;
    border-radius: var(--radius-full);
    font-size: 0.8rem; font-weight: 600;
    z-index: 999; opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none; white-space: nowrap;
    font-family: var(--font-mono);
    letter-spacing: 1px;
}

.toast.show { opacity: 1; }

/* ──────────────────────────────────────────────
   RESPONSIVE MÓVIL
────────────────────────────────────────────── */
@media (max-width: 768px) {
    body { background: var(--bg-page); }

    .dashboard-header { padding: 20px 14px 65px 14px; }
    .project-info h2  { font-size: 0.95rem; }

    .action-icon { width: 60px; height: 60px; font-size: 1.5rem; border-radius: var(--radius-sm); }
    .quick-actions { margin-top: 20px; gap: 6px; }
    .action-btn span { font-size: 0.65rem; }

    .info-cards-container { padding: 0 10px; gap: 10px; }
    .info-card { padding: 14px; }
    .info-card .amount { font-size: 1.4rem; }

    .share-card,
    .referral-card {
        margin: 0 0 16px 0;
        border-radius: var(--radius-md);
        padding: 16px 14px;
    }

    .share-input-group,
    .referral-input-wrap { flex-wrap: nowrap; }

    .share-row { flex-direction: column; gap: 8px; }
    .share-btn { padding: 12px; }

    .levels-grid { gap: 8px; }
    .level-card  { padding: 14px 8px; }
    .level-count { font-size: 1.8rem; }

    .stats-row { gap: 8px; }
    .stat-num  { font-size: 1.6rem; }

    .dashboard-header { height: 160px !important; padding-bottom: 15px !important; }

    .profile-info-card { margin: -50px 0 15px 0; padding: 20px 14px; border-radius: 0; width: 100%; }
    .profile-avatar { font-size: 3rem; margin-bottom: 14px; }

    .profile-actions { margin: 0; padding: 0; width: 100%; }

    .profile-action-btn {
        padding: 15px 16px; margin-bottom: 0;
        border-radius: 0;
        border-bottom: 1px solid var(--border);
        border-left: none; border-right: none; border-top: none;
    }

    .profile-action-btn:last-child { border-bottom: none; margin-bottom: 80px; }

    .bottom-nav { padding: 10px 8px 16px; }
    .nav-item   { font-size: 0.55rem; }
    .nav-item i { font-size: 1rem; }
}