/**
 * eCommerce Demo - Login Page Stylesheet
 * Premium ML-inspired: yellow bg, floating shapes, glass card, warm accents
 */

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

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

:root {
    --lg-yellow: #ffe600;
    --lg-yellow-dark: #e6cf00;
    --lg-yellow-glow: rgba(255,230,0,0.25);
    --lg-orange: #f59e0b;
    --lg-orange-dark: #d97706;
    --lg-blue: #3483fa;
    --lg-blue-dark: #2968c8;
    --lg-dark-1: #0f172a;
    --lg-dark-2: #1e293b;
    --lg-dark-3: #020617;
    --lg-card: rgba(255,255,255,0.95);
    --lg-text: #1f2937;
    --lg-text-soft: #6b7280;
    --lg-text-muted: #9ca3af;
    --lg-border: #e5e7eb;
    --lg-border-focus: #f59e0b;
    --lg-error: #dc2626;
    --lg-error-bg: #fef2f2;
    --lg-error-border: #fecaca;
    --lg-success: #16a34a;
    --lg-success-bg: #f0fdf4;
    --lg-success-border: #bbf7d0;
    --lg-radius: 12px;
    --lg-radius-lg: 24px;
    --lg-transition: 0.2s cubic-bezier(.4,0,.2,1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #ffe600 0%, #ffd000 30%, #f5c400 60%, #eab308 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--lg-text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ====== Animated Background with Floating Shapes ====== */
.lg-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

/* Floating shapes — solid glass on yellow bg */
.lg-bg__shape {
    position: absolute;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.35);
}

/* Shape 1 — grande, esquina superior izquierda */
.lg-bg__shape:nth-child(1) {
    width: 380px; height: 380px;
    top: -100px; left: -80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(245,158,11,0.12));
    animation: lgFloat1 18s infinite ease-in-out;
}
/* Shape 2 — mediano, esquina inferior derecha */
.lg-bg__shape:nth-child(2) {
    width: 300px; height: 300px;
    bottom: -60px; right: -50px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(234,179,8,0.2), rgba(217,119,6,0.1));
    animation: lgFloat2 22s infinite ease-in-out;
    animation-delay: -4s;
}
/* Shape 3 — blob, centro-derecha */
.lg-bg__shape:nth-child(3) {
    width: 220px; height: 180px;
    top: 40%; right: 5%;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: linear-gradient(160deg, rgba(255,255,255,0.3), rgba(245,158,11,0.08));
    animation: lgFloat3 25s infinite ease-in-out;
    animation-delay: -8s;
}
/* Shape 4 — pequeño circulo, arriba-derecha */
.lg-bg__shape:nth-child(4) {
    width: 120px; height: 120px;
    top: 12%; right: 18%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(234,179,8,0.15));
    animation: lgFloat1 15s infinite ease-in-out;
    animation-delay: -2s;
}
/* Shape 5 — mediano, abajo-izquierda */
.lg-bg__shape:nth-child(5) {
    width: 200px; height: 200px;
    bottom: 15%; left: 5%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(255,255,255,0.15));
    animation: lgFloat2 20s infinite ease-in-out;
    animation-delay: -6s;
}
/* Shape 6 — pequeño blob, centro-izquierda */
.lg-bg__shape:nth-child(6) {
    width: 90px; height: 90px;
    top: 55%; left: 12%;
    border-radius: 40% 60% 55% 45% / 55% 40% 60% 45%;
    background: linear-gradient(135deg, rgba(255,255,255,0.35), rgba(245,158,11,0.1));
    animation: lgFloat3 14s infinite ease-in-out;
    animation-delay: -3s;
}
/* Shape 7 — grande blob, arriba-centro */
.lg-bg__shape:nth-child(7) {
    width: 260px; height: 200px;
    top: -30px; left: 45%;
    border-radius: 60% 40% 50% 50% / 40% 60% 40% 60%;
    background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(234,179,8,0.1));
    animation: lgFloat1 28s infinite ease-in-out;
    animation-delay: -12s;
}
/* Shape 8 — mediano circulo, abajo-centro */
.lg-bg__shape:nth-child(8) {
    width: 160px; height: 160px;
    bottom: 5%; left: 40%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(217,119,6,0.12));
    animation: lgFloat2 17s infinite ease-in-out;
    animation-delay: -9s;
}

/* Animacion 1: diagonal + rotacion suave */
@keyframes lgFloat1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(40px, -30px) rotate(5deg); }
    50%  { transform: translate(-20px, 25px) rotate(-3deg); }
    75%  { transform: translate(25px, 35px) rotate(8deg); }
}
/* Animacion 2: vertical + escala */
@keyframes lgFloat2 {
    0%, 100% { transform: translateY(0) scale(1); }
    30%  { transform: translateY(-35px) scale(1.08); }
    60%  { transform: translateY(20px) scale(0.94); }
    80%  { transform: translateY(-15px) scale(1.03); }
}
/* Animacion 3: circular + rotacion inversa */
@keyframes lgFloat3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    20%  { transform: translate(30px, -20px) rotate(-8deg); }
    40%  { transform: translate(-15px, -35px) rotate(5deg); }
    60%  { transform: translate(-30px, 15px) rotate(-12deg); }
    80%  { transform: translate(20px, 30px) rotate(3deg); }
}

/* Subtle grid pattern overlay */
.lg-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.35) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
}

/* ====== Main Content ====== */
.lg-wrap {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px 20px;
    min-height: 100vh;
}

/* ====== Branding ====== */
.lg-brand {
    text-align: center;
    margin-bottom: 32px;
    animation: lgFadeDown 0.6s ease;
}
.lg-brand__logo {
    width: 180px;
    height: 180px;
    border-radius: 30px;
    object-fit: contain;
    background: #fff;
    padding: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12), 0 0 0 4px rgba(255,255,255,0.6), 0 0 60px rgba(255,230,0,0.2);
    margin: 0 auto 22px;
    border: 3px solid rgba(255,255,255,0.7);
    transition: transform 0.3s, box-shadow 0.3s;
}
.lg-brand__logo:hover {
    transform: scale(1.08);
    box-shadow: 0 14px 48px rgba(0,0,0,0.15), 0 0 0 4px rgba(255,255,255,0.8), 0 0 80px rgba(255,230,0,0.3);
}
.lg-brand__logo--placeholder {
    width: 180px;
    height: 180px;
    border-radius: 30px;
    background: linear-gradient(135deg, #fff, rgba(255,255,255,0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 22px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12), 0 0 0 4px rgba(255,255,255,0.6);
    border: 3px solid rgba(255,255,255,0.7);
}
.lg-brand__title {
    font-size: 26px;
    font-weight: 800;
    color: #3d2e00;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(255,255,255,0.3);
}
.lg-brand__subtitle {
    font-size: 14px;
    color: rgba(61,46,0,0.55);
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* ====== Glass Card ====== */
.lg-card {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--lg-radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.5);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    animation: lgSlideUp 0.5s cubic-bezier(.16,1,.3,1);
}

@keyframes lgSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes lgFadeDown {
    from { opacity: 0; transform: translateY(-15px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lg-card__body {
    padding: 36px 32px 30px;
}

.lg-card__title {
    font-size: 24px;
    font-weight: 800;
    color: var(--lg-text);
    margin-bottom: 4px;
    line-height: 1.15;
    letter-spacing: -0.5px;
    text-align: center;
}
.lg-card__subtitle {
    font-size: 14px;
    color: var(--lg-text-soft);
    margin-bottom: 28px;
    line-height: 1.5;
    text-align: center;
}

/* ====== Alerts ====== */
.lg-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.45;
    animation: lgAlertIn 0.3s ease;
}
@keyframes lgAlertIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.lg-alert__icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}
.lg-alert--error {
    background: var(--lg-error-bg);
    color: var(--lg-error);
    border: 1px solid var(--lg-error-border);
}
.lg-alert--success {
    background: var(--lg-success-bg);
    color: var(--lg-success);
    border: 1px solid var(--lg-success-border);
}

/* ====== Form Fields ====== */
.lg-field {
    margin-bottom: 20px;
}
.lg-field__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--lg-text);
    margin-bottom: 6px;
}
.lg-field__wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.lg-field__icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--lg-text-muted);
    pointer-events: none;
    transition: color var(--lg-transition);
}
.lg-field__input {
    width: 100%;
    padding: 14px 14px 14px 44px;
    border: 2px solid var(--lg-border);
    border-radius: var(--lg-radius);
    font-size: 15px;
    font-family: inherit;
    color: var(--lg-text);
    background: #fff;
    transition: border-color var(--lg-transition), box-shadow var(--lg-transition);
    outline: none;
}
.lg-field__input:focus {
    border-color: var(--lg-border-focus);
    box-shadow: 0 0 0 4px rgba(245,158,11,0.12);
}
.lg-field__input:focus ~ .lg-field__icon,
.lg-field__wrap:focus-within .lg-field__icon {
    color: var(--lg-orange);
}
.lg-field__input::placeholder {
    color: #c4c9d2;
}

/* Toggle password */
.lg-field__toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--lg-text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color var(--lg-transition);
}
.lg-field__toggle:hover { color: var(--lg-orange); }
.lg-field__hint {
    font-size: 12px;
    color: var(--lg-text-muted);
    margin-top: 5px;
}
.lg-field__hint--error {
    color: var(--lg-error);
}

/* ====== Strength Meter ====== */
.lg-strength {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}
.lg-strength__bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    transition: background var(--lg-transition);
}
.lg-strength__bar.active { background: #dc2626; }
.lg-strength[data-level="2"] .lg-strength__bar.active { background: #f59e0b; }
.lg-strength[data-level="3"] .lg-strength__bar.active { background: #16a34a; }
.lg-strength__text {
    font-size: 11px;
    color: var(--lg-text-muted);
    margin-top: 4px;
    text-align: right;
}

/* ====== Buttons ====== */
.lg-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: var(--lg-radius);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--lg-transition);
    text-decoration: none;
    line-height: 1.2;
    position: relative;
    overflow: hidden;
}
.lg-btn--primary {
    background: linear-gradient(135deg, var(--lg-orange) 0%, var(--lg-orange-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(245,158,11,0.3);
}
.lg-btn--primary:hover {
    box-shadow: 0 6px 20px rgba(245,158,11,0.4);
    transform: translateY(-1px) scale(1.01);
}
.lg-btn--primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(245,158,11,0.2);
}
.lg-btn--primary:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
/* Shine effect */
.lg-btn--primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}
.lg-btn--primary:hover::after {
    left: 100%;
}
.lg-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
/* Loading override */
.lg-btn--loading {
    pointer-events: none;
    color: transparent !important;
}
.lg-btn--loading::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lgSpin 0.6s linear infinite;
    z-index: 2;
}
.lg-btn--loading::after {
    display: none;
}
@keyframes lgSpin {
    to { transform: rotate(360deg); }
}

/* ====== Card Footer ====== */
.lg-card__footer {
    padding: 16px 32px;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.lg-card__footer-text {
    font-size: 13px;
    color: var(--lg-text-muted);
}
.lg-card__footer-link {
    color: var(--lg-orange-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: color var(--lg-transition);
}
.lg-card__footer-link:hover {
    color: var(--lg-orange);
    text-decoration: underline;
}
.lg-card__guide-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 100px;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    animation: lgGlowGuide 2.5s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}
.lg-card__guide-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(245,158,11,0.45);
    text-decoration: none;
    color: #ffffff;
}
.lg-card__guide-btn svg {
    width: 16px;
    height: 16px;
}
@keyframes lgGlowGuide {
    0%, 100% { box-shadow: 0 2px 8px rgba(245,158,11,0.3); }
    50% { box-shadow: 0 4px 20px rgba(245,158,11,0.55), 0 0 30px rgba(245,158,11,0.15); }
}

/* ====== Demo Credentials Banner ====== */
.lg-demo-credentials {
    background: linear-gradient(135deg, #eff6ff, #ede9fe);
    border: 1px solid #c7d2fe;
    border-radius: var(--lg-radius);
    padding: 14px 18px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all var(--lg-transition);
}
.lg-demo-credentials:hover {
    border-color: #818cf8;
    box-shadow: 0 2px 12px rgba(99,102,241,0.15);
    transform: translateY(-1px);
}
.lg-demo-credentials__header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #4338ca;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.lg-demo-credentials__row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.lg-demo-credentials__label {
    font-size: 12px;
    color: var(--lg-text-soft);
    font-weight: 500;
    min-width: 65px;
}
.lg-demo-credentials__value {
    font-size: 13px;
    font-weight: 600;
    color: var(--lg-text);
    background: rgba(255,255,255,0.7);
    padding: 2px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Fira Code', monospace;
}
.lg-demo-credentials__hint {
    font-size: 11px;
    color: #ffffff;
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    padding: 6px 16px;
    border-radius: 100px;
    letter-spacing: 0.3px;
    animation: lgPulseHint 2s ease-in-out infinite;
}
@keyframes lgPulseHint {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(99,102,241,0); }
}

/* ====== Page Footer ====== */
.lg-footer {
    position: relative;
    z-index: 2;
    padding: 16px;
    text-align: center;
    font-size: 12px;
    color: rgba(61,46,0,0.4);
    flex-shrink: 0;
}

/* ====== User Info Strip ====== */
.lg-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f9fafb;
    border-radius: var(--lg-radius);
    margin-bottom: 22px;
    border: 1px solid #f3f4f6;
}
.lg-user-info__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--lg-orange), var(--lg-orange-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 800;
    flex-shrink: 0;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}
.lg-user-info__details {
    min-width: 0;
    flex: 1;
}
.lg-user-info__name {
    font-size: 14px;
    font-weight: 700;
    color: var(--lg-text);
    line-height: 1.3;
}
.lg-user-info__email {
    font-size: 12px;
    color: var(--lg-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lg-user-info__change {
    font-size: 12px;
    color: var(--lg-orange-dark);
    text-decoration: none;
    font-weight: 600;
    flex-shrink: 0;
    transition: color var(--lg-transition);
}
.lg-user-info__change:hover { color: var(--lg-orange); text-decoration: underline; }

/* ====== Step Transition ====== */
.lg-step { display: none; }
.lg-step.active { display: block; animation: lgSlideUp 0.35s cubic-bezier(.16,1,.3,1); }

/* ====== Powered by badge ====== */
.lg-powered {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 10;
    padding: 6px 12px;
    background: rgba(255,255,255,0.4);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    font-size: 11px;
    color: rgba(61,46,0,0.45);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}
.lg-powered:hover {
    background: rgba(255,255,255,0.6);
    color: rgba(61,46,0,0.7);
}
.lg-powered svg {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

/* ====== Responsive ====== */
@media (max-width: 480px) {
    .lg-wrap {
        padding: 20px 14px 16px;
        justify-content: flex-start;
        padding-top: 40px;
    }
    .lg-card {
        border-radius: 16px;
    }
    .lg-card__body {
        padding: 28px 22px 24px;
    }
    .lg-card__footer {
        padding: 12px 22px;
    }
    .lg-card__title {
        font-size: 20px;
    }
    .lg-brand__logo,
    .lg-brand__logo--placeholder {
        width: 140px;
        height: 140px;
        border-radius: 24px;
        font-size: 40px;
    }
    .lg-brand__title {
        font-size: 22px;
    }
    .lg-brand__subtitle {
        font-size: 12px;
    }
    .lg-bg__shape:nth-child(1) { width: 250px; height: 250px; }
    .lg-bg__shape:nth-child(2) { width: 200px; height: 200px; }
    .lg-bg__shape:nth-child(3) { width: 140px; height: 110px; }
    .lg-bg__shape:nth-child(4) { width: 80px; height: 80px; }
    .lg-bg__shape:nth-child(5),
    .lg-bg__shape:nth-child(6),
    .lg-bg__shape:nth-child(7),
    .lg-bg__shape:nth-child(8) { display: none; }
    .lg-powered { display: none; }
}

@media (max-width: 360px) {
    .lg-card__body {
        padding: 22px 18px 20px;
    }
    .lg-field__input {
        font-size: 14px;
        padding: 12px 12px 12px 40px;
    }
}

/* ====== Shake Animation ====== */
@keyframes lgShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}
