/* login.css — pantalla de ingreso de PSK Racing.
   Diseño split-screen: panel de marca (naranja) + panel de formulario (oscuro). */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, sans-serif;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.login-container {
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    display: flex;
}

/* ---------- Panel izquierdo: marca ---------- */
.brand-panel {
    width: 45%;
    background: linear-gradient(135deg, #ff6b35 0%, #d35400 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px;
    position: relative;
    overflow: hidden;
}

.brand-panel .stripes {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg, transparent, transparent 10px,
                rgba(0,0,0,.05) 10px, rgba(0,0,0,.05) 20px);
}

.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.logo-box {
    width: 300px;
    max-width: 100%;
    background: rgba(255,255,255,.12);
    border: 3px solid rgba(255,255,255,.25);
    border-radius: 24px;
    margin: 0 auto 32px;
    padding: 26px;
    box-shadow: 0 16px 48px rgba(0,0,0,.3), inset 0 4px 12px rgba(255,255,255,.1);
}

.logo-box img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.35));
}

.brand-desc {
    font-size: 18px;
    color: rgba(255,255,255,.95);
    line-height: 1.6;
    max-width: 340px;
    margin: 0 auto;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0,0,0,.25);
}

/* ---------- Panel derecho: formulario ---------- */
.form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px;
    background: linear-gradient(rgba(15,15,15,.55), rgba(15,15,15,.72)),
                url('../img/fotos/login.jpeg') center / cover no-repeat;
}

.form-wrapper {
    width: 100%;
    max-width: 420px;
    background: rgba(18,18,18,.88);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 24px 60px rgba(0,0,0,.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.form-header { margin-bottom: 32px; }

.form-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.5px;
    margin-bottom: 8px;
}

.form-header p {
    font-size: 15px;
    color: #888;
}

.error-alert {
    background: rgba(255,68,68,.15);
    border: 1px solid rgba(255,68,68,.35);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ff7a7a;
    font-size: 14px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #bbb;
    margin-bottom: 8px;
    letter-spacing: .3px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    background: #242424;
    border: 2px solid #333;
    border-radius: 8px;
    font-size: 15px;
    color: #fff;
    outline: none;
    transition: border-color .2s ease, background .2s ease;
    font-family: inherit;
}

.form-group input:focus {
    border-color: #ff6b35;
    background: #2a2a2a;
}

.form-group input::placeholder { color: #666; }

.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 84px; }

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    border: none;
    border-radius: 6px;
    color: #aaa;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 10px;
    transition: background .2s ease, color .2s ease;
}

.toggle-password:hover { background: #444; color: #fff; }

.btn-submit {
    width: 100%;
    padding: 16px;
    margin-top: 4px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    letter-spacing: .5px;
    text-transform: uppercase;
    box-shadow: 0 6px 20px rgba(255,107,53,.3);
    transition: transform .2s ease, box-shadow .2s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(255,107,53,.45);
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 26px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #333;
}

.divider span {
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

.google-wrap {
    display: flex;
    justify-content: center;
}

.google-error {
    background: rgba(255,68,68,.15);
    border: 1px solid rgba(255,68,68,.35);
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 14px;
    color: #ff7a7a;
    font-size: 13px;
    text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .login-container { flex-direction: column; }
    .brand-panel { width: 100%; padding: 40px 32px; }
    .logo-box { width: 240px; padding: 20px; margin-bottom: 18px; }
    .brand-desc { font-size: 15px; }
    .form-panel { padding: 40px 32px; }
}

@media (max-width: 640px) {
    body { overflow: auto; }
    .login-container { min-height: 100vh; height: auto; }
    .brand-panel { padding: 30px 22px; }
    .logo-box { width: 200px; }
    .form-panel { padding: 28px 18px; }
    .form-wrapper { padding: 28px 22px; }
    .form-header h2 { font-size: 24px; }
}
