/* ============================================
   BF Admin - Estilos de Login
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-x: hidden;
}

.login-container {
    width: 100%;
    max-width: 450px;
    min-width: 0;
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    animation: slideIn 0.5s ease-out;
    overflow: hidden;
    min-width: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
    overflow: hidden;
    min-width: 0;
}

.login-header-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 3vw, 14px);
    margin-bottom: 10px;
    flex-wrap: nowrap;
    min-height: 0;
    min-width: 0;
}

.login-logo {
    width: auto;
    height: auto;
    max-width: min(160px, 32%);
    max-height: 72px;
    object-fit: contain;
    object-position: center;
    flex-shrink: 1;
    display: block;
    min-width: 0;
}

.login-header h1 {
    color: #1e40af;
    font-size: clamp(1.25rem, 4.5vw, 1.75rem);
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    min-width: 0;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #c33;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 12px;
    color: #666;
}

.login-footer p {
    margin: 4px 0;
}

.login-footer strong {
    color: #1e40af;
    font-weight: 600;
}

/* Tableta */
@media (max-width: 768px) {
    .login-container {
        max-width: 100%;
    }
    .login-box {
        padding: 32px 28px;
    }
    .login-header h1 {
        font-size: clamp(1.2rem, 4vw, 1.5rem);
    }
}

/* Móvil: evitar desbordes y ajustar tamaños */
@media (max-width: 480px) {
    body {
        padding: 12px;
        align-items: flex-start;
        padding-top: 24px;
    }

    .login-box {
        padding: 24px 20px;
    }

    .login-header-title {
        gap: 10px;
    }

    .login-logo {
        max-width: 28%;
        max-height: 48px;
    }

    .login-header h1 {
        font-size: 1.2rem;
    }

    .login-footer {
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .login-logo {
        max-width: 26%;
        max-height: 42px;
    }

    .login-header h1 {
        font-size: 1.1rem;
    }
}
