/* iProject3 — Panel de Gestión: estilos de las pantallas de acceso (login, 2 pasos, recuperación) */
:root {
    --blue-dark:  #013567;
    --blue-mid:   #01509e;
    --blue-light: #e8f0fb;
    --gray-bg:    #f0f4f8;
    --danger:     #dc2626;
    --warning:    #92400e;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    background: var(--gray-bg);
}

.login-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ---- Panel izquierdo — branding (oculto en móvil) ---- */
.brand-panel {
    flex: 1 1 46%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 56px 56px;
    color: #fff;
    background:
        radial-gradient(circle at 15% 20%, rgba(255,255,255,.08) 0, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(255,255,255,.06) 0, transparent 50%),
        linear-gradient(150deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
    overflow: hidden;
}

.brand-panel img {
    width: auto;
    height: 96px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    margin-bottom: 24px;
    flex-shrink: 0;
}

.brand-panel h2 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    max-width: 380px;
    margin-bottom: 14px;
}

.brand-panel p.subtitle {
    font-size: 14px;
    color: rgba(255,255,255,.75);
    max-width: 360px;
    line-height: 1.6;
    margin-bottom: 36px;
}

.brand-features { display: flex; flex-direction: column; gap: 16px; }

.brand-features li {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255,255,255,.92);
}

.brand-features .icon {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 9px;
    background: rgba(255,255,255,.12);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}

/* ---- Panel derecho — formulario ---- */
.form-panel {
    flex: 1 1 54%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: #fff;
}

.login-card {
    width: 100%;
    max-width: 380px;
    animation: fadeUp .4s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.logo-wrap-mobile { display: none; text-align: center; margin-bottom: 28px; }
.logo-wrap-mobile img { height: 56px; margin-bottom: 10px; }
.logo-wrap-mobile h1 { font-size: 17px; font-weight: 600; color: var(--blue-dark); }

.form-heading { margin-bottom: 28px; }
.form-heading h1 { font-size: 22px; font-weight: 700; color: #111827; margin-bottom: 6px; }
.form-heading p  { font-size: 13.5px; color: #6b7280; }

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.field { margin-bottom: 18px; }

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

.input-group .field-icon {
    position: absolute;
    left: 13px;
    width: 17px; height: 17px;
    color: #9ca3af;
    pointer-events: none;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1.5px solid #d1d5db;
    border-radius: 9px;
    font-size: 14px;
    color: #111827;
    transition: border-color .2s, box-shadow .2s, background .2s;
    background: #fafafa;
}

input:focus {
    outline: none;
    border-color: var(--blue-dark);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(1,53,103,.10);
}

.toggle-password {
    position: absolute;
    right: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 7px;
    border-radius: 6px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    transition: color .15s, background .15s;
}
.toggle-password:hover { color: var(--blue-dark); background: #f3f4f6; }
.toggle-password svg { width: 17px; height: 17px; }

.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--blue-dark);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover  { background: var(--blue-mid); }
.btn-login:active { transform: scale(.98); }

.alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 9px;
    font-size: 13px;
    margin-bottom: 18px;
}

.alert-error   { background: #fef2f2; border: 1px solid #fca5a5; color: var(--danger); }
.alert-warning { background: #fffbeb; border: 1px solid #fcd34d; color: var(--warning); }

footer {
    text-align: center;
    margin-top: 32px;
    font-size: 12px;
    color: #9ca3af;
}

/* ---- Responsive ---- */
@media (max-width: 880px) {
    .brand-panel { display: none; }
    .form-panel { flex: 1 1 100%; }
    .logo-wrap-mobile { display: block; }
}

/* ---- Componentes de 2 pasos y recuperación ---- */
input[type="email"], input[type="text"].plano {
    width: 100%; padding: 11px 14px 11px 40px; border: 1.5px solid #d1d5db; border-radius: 9px;
    font-size: 14px; color: #111827; background: #fafafa; transition: border-color .2s, box-shadow .2s, background .2s;
}
input.codigo {
    padding: 13px 14px; text-align: center; font-size: 26px; letter-spacing: .5em; font-weight: 600;
    font-variant-numeric: tabular-nums; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
}
.alert-success { background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.ayuda { font-size: 12px; color: #6b7280; margin-top: 6px; line-height: 1.45; }
.enlaces { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 13px; flex-wrap: wrap; }
.enlaces a { color: var(--blue-mid); text-decoration: none; font-weight: 500; }
.enlaces a:hover { text-decoration: underline; }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: #374151; margin: 4px 0 18px; font-weight: 400; }
.check input { width: auto; margin-top: 2px; padding: 0; }
.btn-sec {
    width: 100%; padding: 11px; background: #fff; color: var(--blue-dark); border: 1.5px solid #d1d5db; border-radius: 9px;
    font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 10px; text-align: center; text-decoration: none; display: block;
}
.btn-sec:hover { background: #f3f4f6; }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 4px 0 18px; padding: 16px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.qr-box svg { max-width: 100%; height: auto; }
.clave-manual { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 13px; letter-spacing: .08em; word-break: break-all; text-align: center; background: #f3f4f6; padding: 8px 10px; border-radius: 8px; color: #111827; user-select: all; }
.pasos { font-size: 13px; color: #374151; line-height: 1.6; margin: 0 0 16px 18px; }
.codigos-respaldo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 18px; }
.codigos-respaldo code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 15px; background: #f3f4f6; padding: 8px 10px; border-radius: 8px; text-align: center; letter-spacing: .06em; color: #111827; }
.fuerza { font-size: 12px; margin-top: 6px; color: #6b7280; }
