/* ========================================
   ESTILOS MODERNOS PARA LOGIN - SIGAFIRMA
   Estilo Filament/Laravel
   ======================================== */

/* Importar fuente Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #861236;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Contenedor del formulario */
.form-signin {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    margin: auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--gray-200);
}

/* Logo */
.form-signin > div[style*="text-align: center"] {
    margin-bottom: 2rem !important;
}

.form-signin img {
    width: 70% !important;
    max-width: 280px;
    height: auto;
}

/* Títulos */
.form-signin h1 {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--gray-900);
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: -0.025em;
}

/* Labels */
.form-signin label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    display: block;
}

.form-signin .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Form groups */
.form-signin .form-group {
    margin-bottom: 1.25rem;
}

/* Inputs modernos */
.form-signin .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--gray-900);
    background-color: white;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    transition: border-color 0.15s ease-in-out, 
                box-shadow 0.15s ease-in-out;
    font-family: var(--font-family);
}

.form-signin .form-control:focus {
    color: var(--gray-900);
    background-color: white;
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(134, 18, 54, 0.1);
    z-index: 2;
}

.form-signin .form-control::placeholder {
    color: var(--gray-400);
    opacity: 1;
}

/* Quitar estilos específicos de email/password */
.form-signin input[type="text"],
.form-signin input[type="email"],
.form-signin input[type="password"] {
    margin-bottom: 0;
    border-radius: 8px !important;
}

/* Mensajes de error */
.form-signin .help-block {
    color: #dc2626;
    font-size: 0.8125rem;
    margin-top: 0.5rem;
    text-align: left;
    font-weight: 500;
}

.form-signin .has-error .form-control {
    border-color: #dc2626;
}

.form-signin .has-error .form-control:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Botón moderno */
.form-signin button[type="submit"] {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.5;
    color: white;
    background-color: #861236 !important;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 0.5rem;
    font-family: var(--font-family);
    letter-spacing: 0.025em;
}

.form-signin button[type="submit"]:hover {
    background: #6e0f2b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(134, 18, 54, 0.2);
}

.form-signin button[type="submit"]:active {
    transform: translateY(0);
    background: #5a0c23;
    box-shadow: 0 2px 4px rgba(134, 18, 54, 0.2);
}

.form-signin button[type="submit"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(134, 18, 54, 0.2);
}

/* Estilos obsoletos que necesitamos sobrescribir */
.form-signin .btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
}

.form-signin .btn-dark,
.form-signin .btn-block {
    width: 100%;
}

/* Link de recuperación de contraseña */
.form-signin a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.form-signin a:hover {
    color: #6e0f2b;
    text-decoration: underline;
}

.form-signin .text-center {
    text-align: center;
}

.form-signin .mt-3 {
    margin-top: 1.5rem;
}

.form-signin .mb-3 {
    margin-bottom: 1.5rem;
}

.form-signin .text-dark {
    color: var(--gray-700) !important;
}

/* Responsive */
@media (max-width: 480px) {
    .form-signin {
        padding: 2rem 1.5rem;
        max-width: 100%;
    }
    
    .form-signin img {
        width: 80% !important;
    }
}

/* Checkbox (si se usa "Recordarme") */
.form-signin .checkbox {
    font-weight: 400;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.form-signin .checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-signin .checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--gray-300);
    cursor: pointer;
}

/* Animación de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-signin {
    animation: fadeInUp 0.5s ease-out;
}

/* Ocultar debug toolbar en login */
#yii-debug-toolbar {
    display: none !important;
}
