/* ============================================
   Variables CSS
   ============================================ */
:root {
    --primary: #0078D4;
    --primary-hover: #0063B1;
    --text-main: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border: #CCCCCC;
    --border-focus: #0078D4;
    --error: #D32F2F;
    --error-bg: #FFEBEE;
    --bg-card: #F5F5F5;
    --input-bg: #FFFFFF;
}

/* ============================================
   Reset y Configuración Base
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

/* Patrón de fondo sutil */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 48%, rgba(30, 58, 138, 0.02) 50%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(220, 38, 38, 0.02) 50%, transparent 52%);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   Contenedor Principal
   ============================================ */
.login-container {
    max-width: 580px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* ============================================
   Card de Login
   ============================================ */
.login-card {
    background: #FFFFFF;
    border-radius: 8px;
    border: 1px solid #D9D9D9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ============================================
   Header del Card
   ============================================ */
.card-header {
    background: #F8F9FA;
    padding: 40px 30px 30px;
    text-align: center;
    border-bottom: 1px solid #E0E0E0;
}

.main-logo {
    max-width: 420px;
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.main-title {
    font-size: 28px;
    font-weight: 400;
    color: var(--text-main);
    margin: 0;
}
.main-title {
     font-size: 2.1rem;
     font-weight: 800;
     color: var(--primary);
     text-align: center;
     margin-bottom: 10px;
     letter-spacing: 0.5px;
     text-transform: uppercase;
     background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
     background-clip: text;
}

/* ============================================
   Formulario
   ============================================ */
.login-form {
    padding: 30px 40px;
}

.form-group {
    margin-bottom: 20px;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-main);
    background: var(--input-bg);
    border: 2px solid var(--border);
    border-radius: 4px;
    outline: none;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
}

.form-input::placeholder {
    color: #999999;
    text-transform: uppercase;
    font-size: 13px;
}

.form-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: #666666;
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--primary);
}

/* ============================================
   Checkbox
   ============================================ */
.checkbox-group {
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-main);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* ============================================
   Botón Submit
   ============================================ */
.btn-submit {
    width: 100%;
    padding: 14px 20px;
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-submit:hover {
    background: var(--primary-hover);
}

.btn-submit:active {
    transform: translateY(1px);
}

.btn-submit:disabled {
    background: #CCCCCC;
    cursor: not-allowed;
}

/* ============================================
   Mensaje de Error
   ============================================ */
.error-message {
    margin-top: 16px;
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 4px;
    background: var(--error-bg);
    border-left: 4px solid var(--error);
    animation: shake 0.4s;
}

.error-message.show {
    display: flex;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.error-message i {
    font-size: 18px;
    color: var(--error);
    flex-shrink: 0;
}

.error-text {
    font-size: 14px;
    color: #C62828;
    font-weight: 500;
    line-height: 1.4;
}

/* ============================================
   Links del Formulario
   ============================================ */
.form-links {
    padding: 20px 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.link-primary {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.link-primary:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.link-secondary {
    color: var(--text-secondary);
    font-size: 13px;
}

.link-secondary a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.link-secondary a:hover {
    text-decoration: underline;
}

/* ============================================
   Footer del Card
   ============================================ */
.card-footer {
    background: #F8F9FA;
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid #E0E0E0;
}

.copyright {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.browser-info {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.browser-info i {
    font-size: 14px;
    margin: 0 2px;
}

.fa-chrome {
    color: #4285F4;
}

.fa-firefox {
    color: #FF7139;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 640px) {
    body {
        padding: 10px;
    }

    .login-card {
        border-radius: 6px;
    }

    .card-header {
        padding: 30px 20px 25px;
    }

    .main-logo {
        max-width: 320px;
    }

    .main-title {
        font-size: 24px;
    }

    .login-form {
        padding: 25px 20px;
    }

    .form-links {
        padding: 15px 20px 25px;
    }

    .card-footer {
        padding: 15px 20px;
    }

    .browser-info {
        font-size: 10px;
    }
}

@media (max-width: 400px) {
    .main-logo {
        max-width: 280px;
    }

    .main-title {
        font-size: 22px;
    }

    .form-input {
        font-size: 13px;
        padding: 12px 14px;
    }

    .btn-submit {
        font-size: 14px;
        padding: 12px 16px;
    }
}