/* ============================================================
   assets/css/auth.css
   Estilos para las páginas de login y selección de sucursal
   ============================================================ */

body.auth-body {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    padding: 2rem 2rem 1.5rem;
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo {
    display: inline-flex;
    margin-bottom: .75rem;
}

.auth-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: .25rem;
}

.auth-subtitle {
    font-size: .85rem;
    color: #64748b;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: .125rem;
}

/* Adaptar form-group al auth */
.auth-form .form-group {
    margin-bottom: .875rem;
}

.auth-form .form-input {
    padding: .625rem .875rem;
    font-size: .9rem;
}

/* Botón toggle contraseña */
.toggle-password {
    position: absolute;
    right: .625rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: .25rem;
    display: flex;
    border-radius: 4px;
    transition: color .15s;
}
.toggle-password:hover { color: #475569; }

/* Botón submit con loading */
.btn-full { margin-top: .25rem; }

.btn-loading {
    display: flex;
    align-items: center;
    gap: .375rem;
}

.auth-footer {
    text-align: center;
    font-size: .72rem;
    color: #94a3b8;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

/* ----- Selección de sucursal ----- */
.sucursal-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin: .875rem 0;
}

.sucursal-item {
    position: relative;
}

.sucursal-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.sucursal-label {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.sucursal-label:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.sucursal-item input[type="radio"]:checked + .sucursal-label {
    border-color: #2563eb;
    background: #eff6ff;
}

.sucursal-radio-dot {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s;
}

.sucursal-item input[type="radio"]:checked + .sucursal-label .sucursal-radio-dot {
    border-color: #2563eb;
    background: #2563eb;
    box-shadow: inset 0 0 0 3px #fff;
}

.sucursal-info { flex: 1; }
.sucursal-nombre { font-weight: 600; font-size: .9rem; color: #0f172a; }
.sucursal-direccion { font-size: .78rem; color: #64748b; margin-top: .1rem; }

.sucursal-badge-principal {
    font-size: .68rem;
    background: #eff6ff;
    color: #1d4ed8;
    padding: .15em .5em;
    border-radius: 99px;
    font-weight: 700;
}

/* ----- Responsive ----- */
@media (max-width: 420px) {
    .auth-container {
        padding: 1.5rem 1.25rem 1.25rem;
        border-radius: 12px;
    }
    .auth-title { font-size: 1.05rem; }
}
