/* ====================================
   TANCAT - Sistema de Administración
   Archivo: styles.css
   Descripción: Estilos principales del sistema
   ==================================== */

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ====================================
   VARIABLES CSS (Paleta de colores TANCAT)
   ==================================== */
:root {
    --primary-dark: #2c3e50;
    --primary-medium: #34495e;
    --primary-light: #95a5a6;
    --accent-red: #e74c3c;
    --accent-red-dark: #c0392b;
    --accent-red-darker: #a93226;
    --text-secondary: #7f8c8d;
    --background-light: #f8f9fa;
    --background-lighter: #ecf0f1;
    --white: #ffffff;
    --success-green: #27ae60;
    --error-bg: #fdf2f2;
    --success-bg: #f2fdf2;
    --text-muted: #bdc3c7;
}

/* ====================================
   ESTILOS GENERALES
   ==================================== */
body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 50%, var(--primary-light) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ====================================
   CONTENEDOR PRINCIPAL DE LOGIN
   ==================================== */
.login-container {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    margin: 20px;
    animation: fadeIn 0.6s ease-out;
}

/* ====================================
   LOGO Y HEADER
   ==================================== */
.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    font-size: 36px;
    font-weight: bold;
    color: var(--accent-red);
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ====================================
   TEXTO DE BIENVENIDA
   ==================================== */
.welcome-text {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-text h2 {
    color: var(--primary-dark);
    font-size: 24px;
    margin-bottom: 10px;
}

.welcome-text p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ====================================
   FORMULARIO
   ==================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--primary-dark);
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--background-lighter);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: var(--background-light);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-red);
    background-color: var(--white);
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.2);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* ====================================
   BOTÓN DE LOGIN
   ==================================== */
.login-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-red-dark) 100%);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
    background: linear-gradient(135deg, var(--accent-red-dark) 0%, var(--accent-red-darker) 100%);
}

.login-btn:active {
    transform: translateY(0);
}

/* ====================================
   ENLACE DE CONTRASEÑA OLVIDADA
   ==================================== */
.forgot-password {
    text-align: center;
    margin-top: 20px;
}

.forgot-password a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: var(--accent-red);
}

/* ====================================
   DIVIDER
   ==================================== */
.divider {
    margin: 25px 0;
    text-align: center;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--background-lighter);
}

.divider span {
    background: white;
    padding: 0 15px;
    color: var(--text-secondary);
    font-size: 12px;
}

/* ====================================
   INFORMACIÓN DE SEDES
   ==================================== */
.sede-info {
    background: var(--background-light);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    border-left: 4px solid var(--accent-red);
}

.sede-info:first-of-type {
    margin-top: 15px;
}

.sede-info h4 {
    color: var(--primary-dark);
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: bold;
}

.sede-info p {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 3px;
}

/* ====================================
   FOOTER
   ==================================== */
.footer-info {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--background-lighter);
}

.footer-info p {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 5px;
}

/* ====================================
   ESTADOS DE VALIDACIÓN
   ==================================== */
.form-group.error input {
    border-color: var(--accent-red);
    background-color: var(--error-bg);
}

.form-group.success input {
    border-color: var(--success-green);
    background-color: var(--success-bg);
}

.error-message {
    color: var(--accent-red);
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

/* ====================================
   ESTADO DE LOADING
   ==================================== */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .login-btn {
    background: var(--primary-light);
    cursor: not-allowed;
}

/* ====================================
   ANIMACIONES
   ==================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */
@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .logo {
        font-size: 28px;
    }
    
    .welcome-text h2 {
        font-size: 20px;
    }
}

/* ====================================
   UTILIDADES
   ==================================== */
.text-center {
    text-align: center;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-15 {
    margin-bottom: 15px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-15 {
    margin-top: 15px;
}

.mt-20 {
    margin-top: 20px;
}