/* ============================================
   ESCAKEKAS — Cuenta (Login / Registro)
   ============================================ */

.cuenta-page {
    min-height: calc(100vh - var(--header-h) - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px;
    background: var(--gradient-hero);
}

.cuenta-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 900px;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--bg-card);
}

/* Card del formulario */
.cuenta-card { padding: 48px 40px; }

.cuenta-header { text-align: center; margin-bottom: 32px; }
.cuenta-icon { font-size: 2.5rem; display: block; margin-bottom: 8px; }
.cuenta-header h1 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--purple-dark);
    margin-bottom: 4px;
}
.cuenta-header p { color: var(--text-lighter); font-size: .9rem; }

/* Formulario */
.cuenta-form .form-group { margin-bottom: 18px; }
.cuenta-form label {
    display: block;
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 6px;
}

.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon > svg {
    position: absolute;
    left: 14px;
    color: var(--text-lighter);
    pointer-events: none;
    transition: var(--transition);
    z-index: 1;
}

.input-icon input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1.5px solid rgba(45, 27, 105, .12);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    transition: var(--transition);
}

.input-icon input:focus {
    outline: none;
    border-color: var(--purple-light);
    box-shadow: 0 0 0 4px rgba(107, 66, 184, .1);
    background: var(--bg-card);
}

.input-icon input:focus ~ svg,
.input-icon:focus-within > svg { color: var(--purple-light); }

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-lighter);
    padding: 4px;
    display: flex;
    transition: var(--transition);
}
.toggle-password:hover { color: var(--purple-light); }

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

/* Botón principal */
.btn--cuenta {
    width: 100%;
    padding: 14px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn--cuenta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(74, 44, 138, .3);
}

.btn--cuenta:active { transform: translateY(0); }

/* Divider */
.cuenta-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.cuenta-divider::before,
.cuenta-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(45, 27, 105, .08);
}

.cuenta-divider span {
    font-size: .8rem;
    color: var(--text-lighter);
    font-weight: 500;
}

/* Footer */
.cuenta-footer { text-align: center; }
.cuenta-footer p { font-size: .875rem; color: var(--text-light); }

.cuenta-link {
    color: var(--purple-light);
    font-weight: 600;
    transition: var(--transition);
}
.cuenta-link:hover { color: var(--purple-dark); }

/* Checkbox */
.checkbox-cuenta {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: .8rem;
    color: var(--text-light);
    line-height: 1.4;
}

.checkbox-cuenta input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--purple-light);
    margin-top: 1px;
    flex-shrink: 0;
}

/* Panel decorativo */
.cuenta-deco {
    background: var(--gradient-promo);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}

.cuenta-deco::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    top: -80px;
    right: -80px;
}

.cuenta-deco::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .03);
    bottom: -60px;
    left: -60px;
}

.cuenta-deco__content {
    position: relative;
    z-index: 1;
    color: #fff;
    text-align: center;
}

.cuenta-deco__emoji { font-size: 3rem; display: block; margin-bottom: 16px; }

.cuenta-deco__content h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.cuenta-deco__content p {
    font-size: .875rem;
    opacity: .85;
    line-height: 1.6;
    margin-bottom: 24px;
}

.cuenta-deco__features { display: flex; flex-direction: column; gap: 10px; }

.cuenta-deco__feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    padding: 10px 16px;
    background: rgba(255, 255, 255, .08);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(4px);
    transition: var(--transition);
}

.cuenta-deco__feature:hover { background: rgba(255, 255, 255, .14); }

/* Alertas */
.cuenta-alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.cuenta-alert--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.cuenta-alert--success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ============================================
   DASHBOARD
   ============================================ */
.dash-page {
    align-items: flex-start;
    padding-top: 100px;
}

.dash-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    max-width: 1100px;
    width: 100%;
}

/* Sidebar */
.dash-sidebar {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px 20px;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 100px;
}

.dash-avatar {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(45, 27, 105, .08);
}

.dash-avatar__circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.dash-avatar h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--purple-dark);
    margin-bottom: 2px;
}

.dash-avatar p {
    font-size: .78rem;
    color: var(--text-lighter);
    word-break: break-all;
}

.dash-nav { display: flex; flex-direction: column; gap: 4px; }

.dash-nav__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-light);
    transition: var(--transition);
}

.dash-nav__link:hover {
    background: rgba(107, 66, 184, .06);
    color: var(--purple-light);
}

.dash-nav__link.active {
    background: rgba(107, 66, 184, .1);
    color: var(--purple-light);
    font-weight: 600;
}

.dash-nav__link--logout {
    margin-top: 16px;
    color: #dc2626;
}
.dash-nav__link--logout:hover { background: #fef2f2; color: #dc2626; }

/* Content */
.dash-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    box-shadow: var(--shadow-lg);
    min-height: 500px;
}

.dash-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--purple-dark);
    margin-bottom: 4px;
}

.dash-subtitle {
    color: var(--text-lighter);
    font-size: .9rem;
    margin-bottom: 28px;
}

/* Cards */
.dash-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.dash-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border-radius: var(--radius-sm);
    border: 1.5px solid rgba(45, 27, 105, .08);
    transition: var(--transition);
}

.dash-card:hover {
    border-color: rgba(107, 66, 184, .2);
    box-shadow: 0 4px 12px rgba(107, 66, 184, .08);
}

.dash-card__icon { font-size: 1.8rem; }

.dash-card__num {
    display: block;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--purple-dark);
}

.dash-card__label {
    font-size: .75rem;
    color: var(--text-lighter);
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* Section */
.dash-section h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--purple-dark);
    margin-bottom: 16px;
}

/* Empty state */
.dash-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-lighter);
}

.dash-empty__icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

.dash-empty p { margin-bottom: 20px; font-size: .95rem; }

/* Tabs */
.dash-tab { display: none; }
.dash-tab.active { display: block; }

/* Dashboard form */
.dash-form { max-width: 500px; }
.dash-form .form-group { margin-bottom: 18px; }
.dash-form label {
    display: block;
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 6px;
}

.dash-form__section {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--purple-dark);
    margin: 24px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1.5px solid rgba(45, 27, 105, .08);
}

.dash-form__section:first-of-type { margin-top: 0; }

/* Dash card link */
.dash-card--link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* Sidebar badge */
.dash-nav__badge {
    margin-left: auto;
    background: var(--gradient-primary);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
    min-width: 22px;
    text-align: center;
}

/* ============================================
   FAVORITOS PAGE
   ============================================ */
.fav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.fav-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1.5px solid rgba(45, 27, 105, .08);
    transition: var(--transition);
    position: relative;
}

.fav-card:hover {
    border-color: rgba(107, 66, 184, .15);
    box-shadow: 0 4px 12px rgba(107, 66, 184, .06);
}

.fav-card__image {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(107, 66, 184, .06), rgba(94, 232, 240, .06));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fav-card__emoji { font-size: 2rem; }

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

.fav-card__category {
    display: block;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-lighter);
    margin-bottom: 2px;
}

.fav-card__name {
    font-family: var(--font-display);
    font-size: .95rem;
    color: var(--purple-dark);
    margin-bottom: 4px;
    line-height: 1.3;
}

.fav-card__name a {
    color: inherit;
    transition: var(--transition);
}

.fav-card__name a:hover { color: var(--purple-light); }

.fav-card__price {
    font-size: .9rem;
    font-weight: 600;
    color: var(--purple-light);
}

.fav-card__remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(220, 38, 38, .06);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    opacity: 0;
    transition: var(--transition);
}

.fav-card:hover .fav-card__remove { opacity: 1; }
.fav-card__remove:hover { background: rgba(220, 38, 38, .15); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .cuenta-container {
        grid-template-columns: 1fr;
        max-width: 480px;
    }

    .cuenta-deco { display: none; }

    .cuenta-card { padding: 36px 24px; }

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

    .dash-container {
        grid-template-columns: 1fr;
    }

    .dash-sidebar {
        position: static;
        padding: 20px;
    }

    .dash-avatar { margin-bottom: 16px; padding-bottom: 16px; }

    .dash-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .dash-nav__link {
        padding: 8px 12px;
        font-size: .8rem;
    }

    .dash-nav__link svg { display: none; }

    .dash-nav__link--logout { margin-top: 0; }

    .dash-content {
        padding: 24px 20px;
        min-height: auto;
    }

    .dash-cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .cuenta-page { padding: 100px 12px 40px; }
    .cuenta-card { padding: 28px 18px; }
    .cuenta-header h1 { font-size: 1.3rem; }
}
