/* ══════════════════════════════════════════
   PIXAID — LoginStyle.css  (v5 — móvil corregido)
   ══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

:root {
    --orange:     #FF6E5D;
    --orange-lt:  #f9fafb;
    --orange-dk:  #ffa196;
    --pink:       #F85898;
    --pink-lt:    #ffeef6;
    --pink-bd:    #ffc2db;
    --hot:        #ff00aa;
    --purple:     #7c3aed;
    --purple-lt:  #e8e0f8;
    --purple-md:  #b388f0;
    --blue-bg:    #80C0FD;
    --gold:       #ffd700;
    --success:    #22c55e;
    --text:       #1a1a1a;
    --muted:      #6b7280;
    --border:     #e5e7eb;
    --bg:         #f9fafb;
    --pixel-font: 'Press Start 2P', monospace;
    --px-font:    'Courier New', monospace;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
}

.login-root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-body {
    flex: 1;
    display: flex;
    min-height: 100vh;
}

/* ══════════════════════════════════════════
   LEFT PANEL
   ══════════════════════════════════════════ */
.left {
    width: 40%;
    flex-shrink: 0;
    background: var(--orange);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 28px;
    position: relative;
    overflow: hidden;
    gap: 0;
}
.left::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0; width: 20px;
    background-image: repeating-conic-gradient(var(--orange) 0% 25%, var(--orange-lt) 0% 50%);
    background-size: 20px 20px;
}
.left::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 30% 35%, rgba(255,255,255,.12) 0%, transparent 55%);
}

.brand-logo-wrap {
    position: relative;
    margin-bottom: 20px;
    z-index: 1;
}
.brand-logo-ring {
    position: absolute;
    inset: -9px;
    border-radius: 10px;
    border: 2px dashed rgba(255, 255, 255, 0.705);
    animation: girar 12s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg) } }

.brand-logo-grid {
    width: 90px; height: 81px;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(9, 1fr);
    border-radius: 7px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.712);
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.377);
}

.left-text-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.brand-name {
    font-family: var(--pixel-font);
    font-size: 28px;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 3px;
    line-height: 1.3;
    text-shadow: 3px 3px 0 rgba(0,0,0,.2);
    margin-bottom: 5px;
}
.brand-sub {
    font-size: 10px;
    color: rgb(255, 255, 255);
    letter-spacing: 5px;
    margin-bottom: 12px;
}
.brand-slogan {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    max-width: 200px;
    line-height: 1.75;
    font-style: italic;
    margin-bottom: 18px;
}

.deco-dots { display: flex; gap: 6px; margin-bottom: 26px; }
.deco-dots span {
    width: 11px; height: 11px;
    border-radius: 2px;
    display: inline-block;
    border: 1.5px solid rgba(0,0,0,.18);
    animation: pulsar 2s ease-in-out infinite;
}
.deco-dots span:nth-child(2) { animation-delay: .3s }
.deco-dots span:nth-child(3) { animation-delay: .6s }
.deco-dots span:nth-child(4) { animation-delay: .9s }
.deco-dots span:nth-child(5) { animation-delay: 1.2s }
@keyframes pulsar {
    0%, 100% { transform: scale(1); opacity: 1 }
    50%       { transform: scale(1.3); opacity: .7 }
}

.mini-prog { width: 82%; max-width: 210px; z-index: 1; margin-bottom: 22px; }
.prog-bar-row { position: relative; height: 38px; display: flex; align-items: center; }
.prog-bar-track {
    position: absolute;
    left: 28px; right: 0; height: 10px;
    background: rgba(0,0,0,.15);
    border-radius: 99px; overflow: visible;
}
.prog-bar-fill {
    height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, var(--purple-md), var(--purple));
    position: relative; width: 68%;
}
.prog-pct-badge {
    position: absolute;
    right: -15px; top: 50%; transform: translateY(-50%);
    width: 29px; height: 29px;
    background: var(--purple); color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 6px; font-weight: 900; font-family: var(--px-font);
    box-shadow: 0 2px 8px rgba(124,58,237,.4);
}
.prog-heart { position: absolute; left: 0; top: 50%; transform: translateY(-50%); z-index: 2; }
.prog-label   { font-size: 12px; font-weight: 900; color: rgba(0,0,0,.6); margin-bottom: 2px; }
.prog-sub-txt { font-size: 10px; font-weight: 700; color: rgba(0,0,0,.45); font-family: var(--px-font); }

.demo-canvas-wrap {
    z-index: 1; border-radius: 10px; overflow: hidden;
    border: 2px solid rgba(0,0,0,.2);
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

/* ══════════════════════════════════════════
   RIGHT PANEL
   ══════════════════════════════════════════ */
.right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: var(--bg);
    overflow-y: auto;
}

.form-box { width: 100%; max-width: 400px; }

.form-checker {
    height: 20px; border-radius: 9px 9px 0 0;
    background-image: repeating-conic-gradient(var(--bg) 0% 25%, var(--orange-lt) 0% 50%);
    background-size: 20px 20px;
}

.form-card {
    background: #fff;
    border: 2px solid rgba(255,110,93,.3);
    border-radius: 14px 14px 14px 14px;
    padding: 28px 26px 24px; position: relative;
}


.form-title      { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 5px; line-height: 1.2; }
.form-title span { color: var(--orange); }
.form-subtitle   { font-size: 12px; color: var(--muted); margin-bottom: 20px; line-height: 1.5; }

.field-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.field-group label {
    font-size: 10px; font-weight: 800;
    letter-spacing: .8px; text-transform: uppercase; color: var(--muted);
}
.input-wrap { position: relative; }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.input-wrap input {
    width: 100%; padding: 12px 14px 12px 38px;
    background: #fffaf8; border: 1.5px solid rgba(255,110,93,.3);
    border-radius: 8px; color: var(--text); font-size: 14px;
    outline: none; font-family: inherit;
    transition: border-color .18s, box-shadow .18s; -webkit-appearance: none;
}
.input-wrap input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255,110,93,.15);
}
.input-wrap input::placeholder { color: #c4b5b0; }

.forgot {
    font-size: 11px; color: var(--orange); text-decoration: none;
    display: block; text-align: right;
    margin-top: -6px; margin-bottom: 16px;
}
.forgot:hover { text-decoration: underline; }

.btn-login {
    display: block; width: 100%; padding: 13px;
    background: var(--orange); color: #fff;
    border: 2px solid #000; border-radius: 10px;
    font-size: 11px; font-weight: 700; font-family: 'Press Start 2P';
    letter-spacing: 1px; cursor: pointer; text-align: center;
    box-shadow: 5px 0 0 0 #000, 2px 2px 5px rgba(0,0,0,.18);
    transition: background .18s, transform .12s; -webkit-appearance: none;
}
.btn-login:hover  { background: var(--bg);
    color: var(--orange); transform: translateY(-1px); }
.btn-login:active { transform: translateY(1px); box-shadow: 2px 0 0 0 #000; }
.btn-login:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.sep { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.sep span { font-size: 11px; color: var(--orange); white-space: nowrap; }
.sep::before, .sep::after { content: ''; flex: 1; height: 1px; background: rgba(255,110,93,.25); }

.social-row { display: flex; gap: 10px; margin-bottom: 16px; }
.btn-social {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px; border-radius: 8px;
    border: 1.5px solid var(--border); background: #fffaf8;
    font-size: 13px; font-weight: 700; color: var(--text);
    cursor: pointer; font-family: inherit; transition: all .18s; -webkit-appearance: none;
}
.btn-social:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-lt); }

.form-footer { text-align: center; font-size: 12px; color: var(--muted); }
.form-footer a { color: var(--orange); text-decoration: none; font-weight: 700; }
.form-footer a:hover { text-decoration: underline; }

.alerta {
    display: none; color: #9a3412; background: #fff7ed;
    border: 1px solid #fed7aa; border-radius: 8px;
    padding: 8px 12px; font-size: 12px; font-weight: 700;
    text-align: center; margin-bottom: 14px;
}
.alerta.visible { display: block; }

/* ══════════════════════════════════════════
   TABLET  (700px – 1024px)
   ══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .left { width: 42%; padding: 36px 22px; }
    .brand-name { font-size: 22px; }
    .brand-logo-grid { width: 76px; height: 68px; }
}

/* ══════════════════════════════════════════
   MÓVIL  (≤ 700px)
   ══════════════════════════════════════════ */
@media (max-width: 700px) {
    html, body { overflow: auto; height: auto; }

    .login-root { min-height: 100vh; height: auto; }

    .login-body {
        flex-direction: column;
        min-height: 100vh;
        height: auto;
    }

    /* Panel naranja — más padding vertical para que respire */
    .left {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 18px;
        padding: 32px 24px 44px;
        flex-shrink: 0;
    }

    /* Checkerboard en la parte inferior */
    .left::after {
        right: 0; left: 0;
        top: auto; bottom: 0;
        width: 100%; height: 20px;
    }

    .brand-logo-wrap { margin-bottom: 0; }
    .brand-logo-ring { inset: -6px; }
    .brand-logo-grid { width: 56px; height: 50px; }

    .left-text-group { align-items: flex-start; gap: 3px; }

    .brand-name   { font-size: 20px; letter-spacing: 2px; margin-bottom: 2px; }
    .brand-sub    { font-size: 8px; letter-spacing: 3px; margin-bottom: 5px; }
    .brand-slogan { display: none; }

    .deco-dots      { margin-bottom: 0; gap: 5px; }
    .deco-dots span { width: 9px; height: 9px; }

    .mini-prog, .demo-canvas-wrap { display: none; }

    /* Formulario centrado vertical y horizontal */
    .right {
        flex: 1;
        align-items: center;
        justify-content: center;
        padding: 28px 20px 36px;
        overflow-y: auto;
    }

    .form-box     { max-width: 100%; }
    .form-checker { height: 21px; }
    .form-card    { padding: 20px 18px 20px; }
    .form-title   { font-size: 18px; }
    .form-subtitle { font-size: 11px; margin-bottom: 16px; }
    .field-group  { margin-bottom: 11px; }

    .input-wrap input { padding: 11px 13px 11px 36px; font-size: 14px; }

    .btn-login   { font-size: 15px; padding: 13px; }
    .sep         { margin: 13px 0; }
    .social-row  { margin-bottom: 12px; }
    .btn-social  { padding: 9px 10px; font-size: 12px; }
    .form-footer { font-size: 11px; }
}

/* ══════════════════════════════════════════
   MUY PEQUEÑO  (≤ 380px)
   ══════════════════════════════════════════ */
@media (max-width: 380px) {
    .brand-name      { font-size: 16px; }
    .brand-logo-grid { width: 42px; height: 38px; }
    .left            { padding: 24px 16px 34px; gap: 14px; }
    .form-card       { padding: 16px 14px 16px; }
    .btn-login       { font-size: 13px; padding: 11px; }
    .form-title      { font-size: 16px; }
}